According to the man page, overlay -# arguments should accept a spawn-id, but it only allows an integer (line 3254 in exp_command.c) and spawn ids are strings in the form "exp#", not simple integers.

If I try to use just the number after "exp", the overlay command doesn't work either. Probably, a call to Tcl_GetChannelHandle on the "exp#" channel type is missing. Also the overlay command should only accept "exp#" type handles.