Repository navigation
fix(server): held agent messages no longer block settling - #24891
mkantautas wants to merge 5 commits into
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrow server-side bug fix that extends the existing settlement cancellation path to held agent, system, and scheduled messages. Human-queued messages remain blocking, with regression coverage for both automatic-only and mixed queues. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Note Written by kept @mkantautas's implementation and commit, merged current main ( verification at
unverified: live provider delivery through MCP and an actual scheduler trigger, native clients and remote/tunnel connections. the runtime regression exercises persisted agent, system and scheduled provenance through the real sqlite projections; the browser setup dispatches scheduled provenance directly and interrupts before provider start. @mkantautas one nonblocking semantics note: editing an automatic queued message retains its original provenance, so settle still cancels it. this follows the existing origin-based model; no extra actor tracking was added here. |
|
Note Written by Verified in a real dev environmentVerified head
Short command transcript (IDs shortened): The short recording removes navigation/loading frames between settlement and reopening the thread. Uploaded playback and seeking were checked. Not verifiedNative desktop shell, iOS/Android, remote/relay/tunnel connections, other providers, actual scheduled-task firing, and separately generated system messages were not exercised. Scheduled/system classification is covered by the focused runtime regression, not by a live scheduler run in this pass. |






Problem
A failed or stopped thread can refuse to settle even when every held message came from another agent or a scheduled task. I hit this with 14 held automatic messages: the server reported that a queued message must be sent or removed. The settle guard only recognized notification and delegated-completion envelopes as automatic; ordinary MCP agent messages and scheduled prompts fell through to the human-message guard.
Change
Recognize non-user authors and scheduled-task provenance as automatic messages too, then use the existing cancellation path when settling. A queued human instruction still blocks settlement, including when automatic messages are beside it; rejecting settlement preserves the whole queue.
Scope and approval
This is a focused fix for the incomplete automatic-message classification in the existing settle workflow. It extends the cancellation already applied to automatic notifications and delegated completions, without adding a recovery workflow or changing the active-run and pending-request guards. It qualifies for the small obvious-bug exception.
Verification
has a queued message. With the fix it passes: automatic runs are cancelled and the thread settles; a human queue rejects settlement without cancelling either queued run.fca88e640c: blacksmithvp run check:changed refs/remotes/github/mainpassed formatting, lint, knip, graphql, affected-package typechecks, and 131 tests. all 29 PR checks are green.Written with Claude Opus 5.5 in Claude Code and GPT-6 Astra in the Codex harness, through T3 Code.
runtime verification at
c205a62259, with identical server/web/contracts/client-runtime trees on the final head, used the web client, devReplay adapter, and actual CLI/MCP messages. a held agent queue settles and cancels; a mixed human queue remains unchanged until the human message is removed. recording cuts from rejection to the loaded settled state after removal. native clients, paid providers, and remote connections were not exercised in this pass.merge fixup and verification by
gpt-6.1-solin the codex harness.