Repository navigation
fix(goals): pause terminal failures and clarify goal states - #155694
Conversation
Pause goals atomically when their run fails or times out after retries. Keep retryable failures active, and preserve newer goal intent. Show running goals in green and paused goals in yellow, with reasons on hover/focus and in expanded details.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Keep the real handler and session-goal regressions in bounded sibling suites, sharing session-view fixtures. Preserve coverage without growing existing over-cap test modules.
|
Codex review: needs maintainer review before merge. Reviewed September 22, 2026, 8:42 AM ET / 12:42 UTC (Revision 2). ClawSweeper reviewWhat this changesPauses goals after terminal run failures or timeouts and updates goal indicators, accessible status notes, documentation, and regression coverage. Merge readiness✅ Ready for maintainer review Keep open: current main still lacks terminal-failure goal pausing. The focused repair remains useful, and this review found no actionable correctness or security defects. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway records agent-run outcomes and authoritative session goals. The Control UI consumes those session snapshots to display goal status, elapsed time, and available controls. flowchart TD
A[Agent lifecycle event] --> B[Retry and terminal classification]
B --> C[Session and stale-event checks]
C --> D[Commit run outcome and goal pause]
D --> E[Publish session snapshot]
E --> F[Chat and session goal indicators]
F --> G[Explicit resume control]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +37, Tests +265, Docs +10. Total +312 across 13 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep terminal goal transitions in the authoritative lifecycle commit and let every client display the same paused state with explicit resume. Do we have a high-confidence way to reproduce the issue? Yes, from source: a terminal failure on a session with an active goal updates the run status on current main but leaves the goal active. No runtime reproduction was executed here. Is this the best way to solve the issue? Yes. Reusing the existing goal transition inside lifecycle persistence avoids client-specific state and preserves retry handling, accounting, and newer intent. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d2b9c87ac5ad. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
* commit '739e2410702e0b1ad1d17a6dac07ddc0ab6dbebb': (140 commits) fix(ui): pause passive polling in hidden tabs (#155617) improve(android): keep chat photos outside text bubbles (#155338) fix(ui): preserve saved project after discovery failure (#155619) feat: compare Kitchen Sink Gateway resource costs (#155734) test(gateway): arm clock-jump claim after readiness (#155748) chore(ui): refresh control ui locales (#155700) fix(ci): join archive placement fixtures before teardown (#155751) fix(matrix): keep bot discovery off the Gateway thread (#152122) fix(agents): reconcile late requester recovery receipts (#155357) test(gateway): guard embeddings HTTP fixture lifetimes fix: isolate triage fixture acquisition and cleanup (#155736) refactor(sessions): hydrate saved transcripts off thread (#153325) fix: Claude MCP turns abort before tool timeout (#155663) fix(goals): pause terminal failures and clarify goal states (#155694) fix(test): preserve watcher errors when diagnostic capture fails (#155383) ci: move native runtime proofs to release validation (#155606) fix(auth): decouple compaction from profile rotation (#155204) fix(agents): admit compaction outside retired plugin generations (#151232) perf(ui): reduce automatic session list refetches (#155705) test: avoid unused source repos in release input fixtures (#155733) ...
…#155694) * fix(goals): pause terminal failures and clarify goal states Pause goals atomically when their run fails or times out after retries. Keep retryable failures active, and preserve newer goal intent. Show running goals in green and paused goals in yellow, with reasons on hover/focus and in expanded details. * test(goals): split terminal and roster goal coverage Keep the real handler and session-goal regressions in bounded sibling suites, sharing session-view fixtures. Preserve coverage without growing existing over-cap test modules.
What Problem This Solves
Fixes goals still appearing active after their run has exhausted retries or timed out.
User Impact
Goals now pause after a terminal failure and remain paused until explicitly resumed. Running goals show a green target; paused goals show a yellow pause icon and a frozen timer. The compact status label exposes the reason on hover or keyboard focus, with the full note available in expanded details.
Why This Change Was Made
The Gateway records the goal pause together with the authoritative failed-run state, so every client receives the same result. Retryable errors remain active, and delayed failures cannot undo a newer resume or replacement goal. Objectives and usage accounting are preserved.
Evidence
Desktop component screenshots
The paused reason is available on keyboard focus or hover:
Screenshots are inspected synthetic real-component fixtures. The mobile expanded fixture clips its right edge, so full mobile layout is not claimed.
CI follow-up
Current-head CI investigation
managed-child-process.test.ts/ “shares listeners across parallel inherit commands even when another spawn throws”. The output-spy assertion timed out; all 12 stdout and stderr fixture lines are present in the job log before the deadline.d72709c2b7fe5b6538ec8a45c713ffeaf986335e. The bounded full-file replay passed all 115 tests in 51.52 seconds (53.37 seconds including runner; the inherited-output case took 195 milliseconds). The original 76-file shard concurrency/order has not been reproduced. No product or test fix is claimed, and this PR does not change either file. This historical failure remains documented; the later full exact-head CI run passed. No repair to the untouched fixture is claimed.Final qualification
cea5bd38cb5e5c5fd37c560a01f133a4de694338, with enforced CI, dependency-review, and security-sensitive-review gates successful.scoped-clean, no findings at the explicitly selected P0-only threshold. This does not claim automated P1–P3 clearance. Independent source review found no blocking issue.