Repository navigation
Conversation
…ed, starting and status-less rows
…ow-up is still being prepared
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
🟢 e2e stories (Haiku): 14 passed22 agent steps · 7 replayed from cache · 15 model calls · 47.1k tokens (25% cached) All 14 tests in 9 files
e2e 0.20.0 · 1m 17s · web · run artifacts 🟢 e2e Electron stories (Haiku): 3 passed3 agent steps · 3 model calls · 7.9k tokens (22% cached) All 3 tests in 3 files
e2e 0.20.0 · 21.5s · electron · run artifacts 🟢 e2e agent repros (Haiku): no tests selectedSpend: $0.00 of the $1.00 cap (proxy ledger) e2e 0.20.0 · 6.5s · 2 targets (web, phone) · run artifacts |
Summary
The cleanup of a reported workflow task no longer removes the task while the user's queued follow-up is still being prepared. Before, the check for unsent user input saw the queue and the held inputs, but not a message that had left the queue and not yet published. The cleanup then went on to remove the workspace, which disposes the session that holds the message. This PR also corrects one field doc and adds three test rows that #8076 left open.
Background
#8076 let a stream's decision skip the plan-like probe where its answer changes nothing. Reviewing it left three items:
ChildStreamEndState.isPlanLikedoc said a reported row's final response never reads the probe. A final response that carries apropose_planresult still does (probeDecidesReport).nonreport, while the row still readsreported.AgentSession.hasPendingUserInput, which the cleanup asks, did not count a manual send that is being prepared.userInputBlocksGoalAdvancementalready counted it with its own extra clause.Implementation
agentSession.ts:hasPendingUserInput()also returns true while a manual send sits inpreparingQueuedInput.userInputBlocksGoalAdvancement()now delegates to it (the same condition as before).taskService.ts: comments only. TheisPlanLikefield doc and the comment aboveprobeDecidesReportnow state why apropose_planresult reads the probe: it decides whether the handler resolves the decision now.taskService.reportDecisionHold.test.ts: three rows for a final response on a queued, starting and status-less row (the helper'sstatusAtEndacceptsnullto remove the status), and one real-host test of the cleanup race.Validation
hasQueuedMessagesis false), then releases the cleanup. It asserts thatworkspaceService.removeis never called and that the row survives the follow-up's dispatch. With thehasPendingUserInputchange reverted, both cases (plan,explore) fail withExpected: 0, Received: 1on theremovecall count.readChildStreamEndReport. Reading the probe only for running, awaiting_report and interrupted rows turns the three new rows red. Requiring a status turns the status-less row red. Reading it only for running rows turns five rows red (the three new ones, awaiting_report and interrupted).remove()wait, and the row stayed while the send prepared. The lifecycle lock covers that path, so this PR changes only the queued path.Risks
Low. One behavior change: a workflow-owned reported leaf whose cleanup runs while the user's queued follow-up is preparing now stays until the next cleanup trigger. The follow-up's own report is that trigger. This is the same trade-off the code already accepts for queued and held input.
hasPendingUserInputhas two other readers. The goal-advancement check keeps its condition. The goal-continuation eligibility flaghasQueuedMessagescan now read true while a manual send is preparing, and that path was already busy throughisBusy()(queue-dispatched sends set PREPARING before dispatch).Generated with
xum• Model:anthropic:claude-sonnet-5-5• Thinking:xhigh• Cost:$56.01