You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Split out of #272 / PR #275, which fixes the same gate for every daemon-created Codex session but cannot fix this one.
Equally broken before and after PR #275 — this path is genuinely untouched by it. Before, the gate looked for codex in the session's cmd=, and a pane-created session does have a cmd= (zmx records one for attach) but it is the wrapper /bin/zsh -i -l -c '<script>', past zmx's 256-byte cap, so it arrives as cmd=/bin/zsh -i -l -c... and never matched either. After, the gate looks for an agent= label the pane does not write. Same outcome, different reason.
What happens
node send and message-edge delivery to a remote, attended Codex loop silently do nothing. No error, no queue, no retry — ZmxSessionLauncher.sendRemote gates the send on aliveCheckCommand, and for a Codex node that check demands proof the session is running Codex:
aliveCheck && { send && submit }
Why this path is not covered
GhosttyTerminalView.defersCodexLaunchToDaemon is true only for goalBased and timeBased loops. A turn-based or sketch Codex loop is launched by the pane, with zmx attach <name> <agent argv> — so the daemon's ensure never runs for it, and the ensure is the only thing that writes the agent= label PR #275 introduced.
Codex loop
Session created by
Stamped?
Remote send gate
goal / time-based
daemon ensure
yes
works
turn-based / sketch
pane attach
no
silently drops
Fix directions
Stamp pane-created sessions. The pane launched the agent itself, so it has the same positive proof the daemon has — it can run zmx set <name> agent=codex alongside the attach (as a separate command, not inside the typed argv, which is where MAX_CANON bites — see Multi-KB --goal text is silently truncated by canonical-mode tty (MAX_CANON) at launch #57 and the note in agentLabelCommand).
Or narrow the send gate: an attended loop's session is not the daemon's to relaunch, so the send could fall back to the name-only check for nodes the pane owns. Weaker, since it re-admits the bare attach shell for that case.
The first is the honest one and mirrors what the daemon already does.
Scope note
Local sends are unaffected: they check sessionExists rather than this gate.
Split out of #272 / PR #275, which fixes the same gate for every daemon-created Codex session but cannot fix this one.
What happens
node sendand message-edge delivery to a remote, attended Codex loop silently do nothing. No error, no queue, no retry —ZmxSessionLauncher.sendRemotegates the send onaliveCheckCommand, and for a Codex node that check demands proof the session is running Codex:Why this path is not covered
GhosttyTerminalView.defersCodexLaunchToDaemonis true only forgoalBasedandtimeBasedloops. A turn-based or sketch Codex loop is launched by the pane, withzmx attach <name> <agent argv>— so the daemon's ensure never runs for it, and the ensure is the only thing that writes theagent=label PR #275 introduced.Fix directions
zmx set <name> agent=codexalongside the attach (as a separate command, not inside the typed argv, which is whereMAX_CANONbites — see Multi-KB --goal text is silently truncated by canonical-mode tty (MAX_CANON) at launch #57 and the note inagentLabelCommand).The first is the honest one and mirrors what the daemon already does.
Scope note
Local sends are unaffected: they check
sessionExistsrather than this gate.