Skip to content

fix(cookbook): keep mailbox-chat mail when delivery to Claude fails - #896

Merged
umputun merged 1 commit into
masterfrom
mailbox-chat-skill-fixes
Nov 5, 2026
Merged

umputun merged 1 commit into
masterfrom
mailbox-chat-skill-fixes

Conversation

@umputun

@umputun umputun commented Nov 5, 2026

Copy link
Copy Markdown
Owner

two delivery fixes for the two-agent-mailbox-chat recipe, 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 SessionStart in 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's on message hook, and the recipe has no chat record to gate that on.

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.
Copilot AI balanced review requested due to automatic review settings November 5, 2026 19:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@umputun
umputun merged commit 412eb92 into master Nov 5, 2026
8 checks passed
@umputun
umputun deleted the mailbox-chat-skill-fixes branch November 5, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants