GeezerVison is showing github.com — fix(server): held agent messages no longer block settling by mkantautas · Pull Request #24891 · pingdotgg/t3code
Conversation
mkantautas
commented
Oct 25, 2026
•
edited by maria-rcks
Loading
Uh oh!
There was an error while loading. Please reload this page.
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
- Extended the existing held-queue lifecycle regression to cover an MCP agent message, a scheduled prompt created with user provenance, a system message, and a mixed human/agent queue.
- Negative control on main at 3d00499: the regression fails with
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.
- current head
fca88e640c: blacksmith vp run check:changed refs/remotes/github/main passed formatting, lint, knip, graphql, affected-package typechecks, and 131 tests. all 29 PR checks are green.
- Earlier settle-related suite run: 133 tests passed across five files. No client rendering changes or live-install validation.
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-sol in the codex harness.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Approved at 7fafbe1
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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Oct 25, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
Settlement now classifies more queued messages as automatic and cancels matching queued runs. Tests cover automatic messages and verify that rejected settlement leaves queued user and agent messages in place.
Changes: Queued message settlement
| Layer / File(s) |
Summary |
Automatic message classification and settlement tests apps/server/src/orchestration-v2/Orchestrator.ts, apps/server/src/orchestration-v2/runtimeLayer.test.ts |
Messages created by non-users or carrying a scheduled-task ID now qualify as automatic, alongside messages with notification or delegated-completion data. Tests cover notification, agent, scheduled, and user messages. They verify that rejected settlement leaves the thread unsettled and preserves queued message IDs. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers: juliusmarminge, t3dotgg, yash-singh1
Merge Risk: Minimal · up to 04d8c
-
Held messages from agents and scheduled tasks no longer prevent a thread from settling, while a queued human message still blocks settlement and is preserved. No merge-blocking risk was identified.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title names the main change: held agent messages no longer block thread settling, in the server. It matches the raw summary, which says non-user authors and scheduled-task provenance now count as … |
| Description check |
 |
The description follows the template sections: Problem, Change, Scope, and Verification. The Problem section states the expected and actual behavior clearly. The Change section explains the fix and wh… |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
Full details: Title check
-
Explanation
The title names the main change: held agent messages no longer block thread settling, in the server. It matches the raw summary, which says non-user authors and scheduled-task provenance now count as automatic messages, so settling no longer stops on them. The title is short, uses a conventional commit prefix, and is specific enough for a teammate scanning history.
Full details: Description check
-
Explanation
The description follows the template sections: Problem, Change, Scope, and Verification. The Problem section states the expected and actual behavior clearly. The Change section explains the fix and why the human-queue guard stays. The Scope section explains why the change is a small obvious-bug fix and links no issue, which the template allows. The Verification section lists focused regression tests, a negative control on main, and runtime checks with observed results. It also states what was not exercised. The author gave no issue link, but the template accepts a reason for small obvious fixes. The description is mostly complete.
Finishing Touches
-
Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between fca88e6 and 04d8c27.
Files selected for processing: 2
-
apps/server/src/orchestration-v2/Orchestrator.ts
apps/server/src/orchestration-v2/runtimeLayer.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
maria-rcks
commented
Oct 26, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Note Written by gpt-6.1-sol on behalf of Maria
kept @mkantautas's implementation and commit, merged current main (04a21bb1c1ce), and simplified the regression's nested provenance branches into a lookup table. the production fix remains the original two provenance conditions; human queues, running work and approvals keep their existing guards.
verification at 790a82a50ab509684e478542ed5736eeed868c9c:
- the regression fails with current main's settlement guard, with the expected queued-message error.
- blacksmith: all 89 runtime-layer tests pass;
vp run check:changed passes format, lint, both knip checks, graphql, affected typechecks and 102 tests across three files.
- github checks on this head are green. two independent gpt-6.1-sol source reviews found no blocking issues; the existing bot review has no actionable findings.
- chrome: the same held scheduled-provenance message blocks settle with main's guard, then settles through the real sidebar action with this fix. a client-authored human message still blocks settlement. screenshots use matching thread data.
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.



|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
maria-rcks
commented
Oct 28, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Note Written by gpt-6.1-sol on behalf of Maria
Verified in a real dev environment
Verified head fca88e640cdd11c09af4ba1d7f4a10a849c5b99a on Linux with the real dev web client, Playwright from the repo, /usr/bin/google-chrome, and Codex gpt-6.1-sol through the local proxy. No replay provider, mocks, fixtures, or direct state writes. Created the project and turns through the app; sent automatic messages through the actual CLI/MCP path.
- Reproduced on
github/main at 8b44f42b14: start Codex running sleep 180, queue an agent message with thread send, stop in the UI, then settle. Settlement rejects with has a queued message; the agent message stays queued.
- Stopped main's server before starting the exact PR head. With the same app-created thread/data, the sidebar settle action succeeds and cancels the held agent run. Screenshots below show matching data.
- Un-settle works and the same thread starts another real Codex turn on the PR head.
- Queue a human instruction with Ctrl-click in the composer and an agent message through CLI/MCP, then stop. Settle rejects and preserves both messages. Remove only the human message, then settle: the agent run is cancelled and the thread settles.
- Read-only persisted-state inspection confirms queued automatic runs were cancelled without starting. The human run was cancelled by removal before the remaining agent run was cancelled by settlement.
- Blacksmith:
vp test run apps/server/src/orchestration-v2/runtimeLayer.test.ts -t 'settles past held automatic messages' passes (1 focused regression). GitHub's current checks pass or are skipped; no code changes were needed.
Short command transcript (IDs shortened):
thread send --base-dir /home/user/main/.t3 <thread> 'automatic held queue probe' --json
status=queued delivery=queued run=ordinal:2
main: thread show --json
model=gpt-6.1-sol status=queued settled=false
PR, after UI settle: thread show --json
model=gpt-6.1-sol status=cancelled settled=true
PR, mixed queue: UI settle rejects; both queued messages remain
PR, remove human then settle: thread show --json
status=cancelled settled=true
persisted automatic runs ordinal:2 and ordinal:4
status=cancelled queueHeld=true startedAt=null



The short recording removes navigation/loading frames between settlement and reopening the thread. Uploaded playback and seeking were checked.
Not verified
Native 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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Evidence
Start a Replay question turn, queue an agent status update through CLI/MCP, press Stop, then hover the sidebar row and click Settle. Both sides use fresh synthetic data, Chromium, a 1280×800 viewport, and light theme.
Scenario source · Manual seed script and interaction instructions
The scenario reproduced the base failure but did not finish its head assertions; the head result above was confirmed in a separate direct browser pass.
Not shown:
- Mixed human-plus-agent queues and preservation of the entire queue when a human instruction is present were not exercised.
- System messages, scheduled prompts, and failed-thread settlement were not exercised; this proof covers a stopped thread with an ordinary agent-authored message.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:XS
0-9 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|