Repository navigation
fix(cookbook): stop mailbox-chat misrouting under the Codex shared daemon - #979
Merged
Merged
Conversation
…emon A Codex started without --no-daemon runs its hooks and commands in the shared app-server, which carries the AGTERM_* ids of the pane that started it. The SessionStart hook registered every such thread under that pane with the daemon's pid, so the starting pane's mail went to whichever thread started last, and the registration never went stale because the daemon outlives every TUI. `say` and `status` from such a Codex sent as the starting pane. The hook now skips a start whose nearest codex is the app-server, a registration held by the app-server is ignored, and own_identity refuses under it with an error naming --no-daemon. A daemon-backed Codex reports receiver: none and its mail waits in its own mailbox. Related to #977
Deploying agterm with
|
| Latest commit: |
c6a6d62
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ab065c9d.agterm.pages.dev |
| Branch Preview URL: | https://mailbox-chat-daemon-guard.agterm.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
the two-agent-mailbox-chat recipe misroutes mail when Codex runs on its shared app-server daemon, which is what a plain
codexdoes without--no-daemon. The daemon runs every client's hooks and commands with theAGTERM_*ids of the pane that started it, so the Codex SessionStart hook registered each new thread under that pane with the daemon's pid. The starting pane's mail then went to whichever thread started last, and the registration never expired because the daemon outlives every Codex TUI.sayandstatusfrom such a Codex also sent as the starting pane.The recipe now detects the daemon (the nearest
codexancestor runs theapp-serversubcommand) and refuses to act from it:say,statusanddeliverunder the daemon exit with an error naming--no-daemonA daemon-backed Codex now reports
receiver: noneand its mail waits in its own mailbox until it is restarted with the launch line from Setup.--no-daemonand plain-shell use are unchanged. The README's Limits section says this.The root cause is upstream, openai/codex#48500.
Related to #977