Repository navigation
fix(comms): clear false r-q signal for silenced & callback-child jobs; raise comms limit to 20 - #395
Merged
Conversation
… mailbox delivery Two production stall fixes from the 2026-09-22 incident where 12 task_reply events sat undelivered in gate's mailbox for 36h: 1. Pending delivery stall watchdog (repair.py): repair only covered 'running' delivery jobs. A pending (accepted/queued) delivery whose mailbox claim keeps failing (conflicting lease, head race) stalled forever with no recovery path. repair_agent_reply_delivery_head now detects a pending delivery older than REPLY_DELIVERY_PENDING_STALL_SECONDS (300s), verifies it never reached the provider (no job_started / provider acceptance evidence, or claim blocked by a conflicting lease), and releases the reply head so the next tick re-prepares and re-claims the delivery. Emits reply_delivery_pending_stall_repaired for audit. 2. Comms visibility (project_view/service.py): _is_business_comms_job excluded reply_delivery jobs entirely, so queued replies were invisible in the Comms queue. Pending delivery jobs now appear as their own row (business_status=delivering) with reply_delivery_source_job_id linking back to the source ask. Terminal delivery jobs remain hidden behind the source row. Tests: test_reply_delivery_pending_stall_repair.py covers stalled repair after threshold, fresh pending untouched, and comms row surfacing. Co-Authored-By: Claude Code <noreply@anthropic.com>
Claude Code now renders the composer top border with an embedded session title (e.g. '─── release-verification-closure-purring-key ─'). The strict plain-dash border match failed closed with composer_layout_unknown, which blocked all reply deliveries to claude agents and wedged mailboxes. Accept border lines with a left dash run, optional embedded title text, and a trailing dash run of any length. Verified against a live pane: state empty / claude_blank (previously composer_layout_unknown).
…observation
Newer Codex builds (agt3 pane, Oct 2026) render the composer placeholder
('Implement {feature}') without the dim attribute and reword it, and render
model/workspace status fields ('combo/model default · ~/workspace') without
dimming the separator. Both layouts failed closed with
composer_layout_unknown, which wedged deliveries in clear_unconfirmed loops.
- Accept the known native placeholder texts ('Ask Codex to do anything',
'Implement {feature}') regardless of dim attribute, at the initial cursor
with an empty composer region below. Anything else still fails closed.
- Verified against a live pane: state empty / codex_placeholder.
- Update opaque-footer tests: a known placeholder at the initial cursor is
empty evidence on its own; human draft lines still fail closed.
- Bump package.json to 8.7.9 (missed in the version bump commit).
…-q; comms limit 8->20 - _expects_reply_delivery now excludes COMPLETED silence_on_success jobs (no delivery obligation by design) and callback-chain children (their reply feeds the parent via continuation, deliver_to_caller=False). Callback-child detection checks callback edges by child_job_id and, via the attempt store, by child_message_id — chain continuation jobs share the parent message id. - PROJECT_VIEW_COMMS_LIMIT 8 -> 20 so completed rows scroll instead of being truncated at the top of the Comms list. - Regression tests: silence-success and callback-child COMPLETED jobs now project execution_phase=terminal instead of reply_queued; bounded-tail and adaptive-budget expectations updated for the new limit. Co-Authored-By: Claude Code <noreply@anthropic.com>
This was referenced Oct 19, 2026
spitzheffel
pushed a commit
to spitzheffel/claude_code_bridge
that referenced
this pull request
Oct 19, 2026
spitzheffel
pushed a commit
to spitzheffel/claude_code_bridge
that referenced
this pull request
Oct 19, 2026
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.
Problem
In the sidebar Comms list, some terminal jobs stay stuck at
r-q(execution_phasereply_queued/ reasonreply_delivery_pending) forever, and the operator sees agents as undelivered even though all queues are drained. Two job classes are affected:--silencejobs that completed successfully — by design they never deliver a reply (silence_on_success=True), but_expects_reply_deliverystill projectedreply_expected=True, so the phase stayedreply_queuedwith no delivery job to ever clear it.--callback/chain) child jobs — their reply feeds the parent through the callback continuation protocol withdeliver_to_caller=False; they likewise never get a caller delivery job, so they sat atr-qforever.Observed live: 4 rows across pm/ag2/ag3/gate stuck at
r-qwhile every mailbox showedqueue_depth=0, pending_reply=0— display bug only, pipeline healthy.Fix
_expects_reply_deliverynow returns False for COMPLETED silence-on-success jobs and for callback-chain children.callback_edge_for_child_job, then falls back through the attempt store tocallback_edge_for_child_message— chain continuation jobs are recorded as retries of the parent message, so message-id matching is essential.PROJECT_VIEW_COMMS_LIMIT8 → 20 so completed rows scroll into view instead of being truncated.Commits (cherry-picked onto current main)
feat(comms): surface pending reply deliveries and auto-repair stalled mailbox delivery— pending-reply projection + auto-repair for genuinely stalled deliveries (companion to the false-signal fix; shipped in our 8.7.9)fix(claude): accept titled composer borders in draft observationandfix(codex): recognize undimmed placeholders and status bars— draft-observation robustness fixes for provider draft detectionfix(project-view): silence & callback-child jobs no longer stuck at r-q; comms limit 8->20— the main fixTesting
test_project_view_comms_silence_success_not_reply_queuedandtest_project_view_comms_callback_child_not_reply_queued— both red on main, green with the fix.test/test_ccbd_project_view.pybounded-tail / adaptive-budget expectations updated for the new limit.main(2 known flaky rust-helper env tests pass in isolation; failures are pre-existing and unrelated).r-qrows projectterminal.🤖 Generated with Claude Code