Repository navigation
fix(cookbook): keep mailbox-chat mail when delivery to Claude fails - #896
Merged
Merged
Conversation
the Claude waiter acked a message before writing it to the hook's stderr, so a pipe Claude had already closed lost that message for good. It now writes and flushes first, then acks and sets the busy mark. A failed write or flush exits 0 and leaves the mail in the mailbox. the Codex SessionStart hook could let Codex's background memory session, which starts with no transcript, replace the pane's registered thread with one `codex queue` cannot reach. The hook now ignores a start without a transcript and keeps the registered thread. both skill files show the sent summary in italics, and the Claude side quotes a received message as an italic blockquote.
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.
two delivery fixes for the
two-agent-mailbox-chatrecipe, ported from the same fixes in my personal chat skill, plus its italic chat lines.Claude mail lost on a closed pipe. The Claude waiter acked a message before writing it to the hook's stderr, so a pipe Claude had already closed lost that message for good. It now writes and flushes first, then acks and sets the busy mark. A failed write or flush exits 0 and leaves the mail in the mailbox.
Codex thread replaced by the memory session. Codex's background memory session fires
SessionStartin the pane with no transcript, and the hook could register it in place of the interactive thread, so delivery fails and the mail stays in agterm's mailbox. The hook now ignores a start without a transcript and keeps the registered thread.Italics. Both skill files show the sent summary in italics, and the Claude side quotes a received message as an italic blockquote, so chat lines stand apart from the agent's own text.
Each fix has a regression test that failed before it. The skill's urgent mail (
say --urgent) is left out: it needs a second consumer for each mailbox, coordinated with agterm'son messagehook, and the recipe has no chat record to gate that on.