Repository navigation
fix: resume goals in existing local Codex sessions - #186524
roboclaw-bot merged 4 commits into
Conversation
|
🦞👀 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. |
Codex Review SummaryThis 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: blocked before merge. What this changesThis PR enables explicit Goal Start and Resume in existing local Codex conversations through the shared native admission and acknowledgment path. Example: An operator pauses “Finish the release checklist,” edits its objective, and selects Resume in an existing local Codex conversation.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this PR provides distinct, useful local Codex Goal support with no verified introduced defect, but expanding the intentional runtime-support boundary needs an owner decision. Priority: P2 Decision needed
Before merge
FindingsNone. Agent review detailsHow this fits togetherGateway Goal requests pass through session authorization, runtime selection, native input admission, and the existing transcript transaction before returning a durable operation receipt. flowchart LR
A[Operator Goal request] --> B[Gateway authorization]
B --> C[Runtime and placement selection]
C --> D[Native input admission]
D --> E[Goal and transcript transaction]
E --> F[Operation acknowledgment]
D --> G[Codex execution]
Technical reviewBest possible solution: Approve the focused support extension and retain one native admission owner for local and worker Codex Goals. Do we have a high-confidence way to reproduce the issue? Current-main source rejects recorded local Codex Goal admission through its intentional worker-only native predicate; the contributor also supplies a matching base-red public-RPC result. Is this the best way to solve the issue? The implementation is a small, coherent extension of existing native admission, persistence, and acknowledgment owners rather than a parallel Goal implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 945f6dde06e2. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +9, Tests +321, Docs +5. Total +335 across 9 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 29, 2026, 12:26 AM ET / 04:26 UTC (Revision 2). |
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
Allow explicit Goal Start and Resume in existing idle local Codex sessions through the existing native input transaction and acknowledgment path. Retain worker-only source authority, same-session identity/history, current-objective lookup, and durable idempotent receipts. Exact-head CI passes all 44 Goal cases. The native inherited-CI exception records the unchanged baseline lint failure; CI is not described as green. Fresh independent P0-P2 source review found no actionable defects. The contributor real-model proof remains prior-head evidence. Worked on by: @jjjhenriksen (implementation). Worked on by: @brokemac79 (maintainer acceptance and landing direction). Co-authored-by: brokemac79 <[email protected]>
Allow explicit Goal Start and Resume in existing idle local Codex sessions through the existing native input transaction and acknowledgment path. Retain worker-only source authority, same-session identity/history, current-objective lookup, and durable idempotent receipts. Exact-head CI passes all 44 Goal cases. The native inherited-CI exception records the unchanged baseline lint failure; CI is not described as green. Fresh independent P0-P2 source review found no actionable defects. The contributor real-model proof remains prior-head evidence. Worked on by: @jjjhenriksen (implementation). Worked on by: @brokemac79 (maintainer acceptance and landing direction). Co-authored-by: brokemac79 <[email protected]> Backport to 2026.11.6: preserve existing local session identity and native-writer admission; keep cloud-worker source checks worker-only. Exact Codex 0.169 contract inspected at d32063f96c2dff1dc96af839b3952abb6acfeda4. No schema or dependency changes. Source-commit: f2e7dcc Co-authored-by: RomneyDa <[email protected]>
Related: #180208, #185273.
What Problem This Solves
Fixes: Goal Start and Resume reject existing local Codex sessions even though ordinary turns in those conversations work.
User Impact
Operators can resume the same local Codex goal with its identity, objective, and history retained, using the existing budget-accounting rules. Resume asks the model to read the current saved goal before working, so an objective edited while paused takes effect.
Why This Change Was Made
Use the existing native input commit and acknowledgement path for both local and cloud-worker Codex sessions, while keeping worker transcript authority specific to workers. Select native admission before built-in admission so an existing session with no recorded harness cannot enter both paths. Existing session identity, operator authority, busy-work, placement, and native thread-ownership checks remain enforced.
Difference from #180208: that PR continues an active local Codex goal after a normal turn ends. This PR handles explicit Start/Resume admission in an existing conversation. It is independent of the continuation patch and adds no automatic pursuit or restart replay.
Maintainer decision
@brokemac79 accepted the focused support extension for explicit Goal Start and Resume in existing idle local Codex sessions and requested landing through the normal maintainer process on October 30, 2026. Maintainer review and landing discussion.
Worked on by: @jjjhenriksen (implementation).
Worked on by: @brokemac79 (maintainer acceptance and landing direction).
Evidence
Final maintainer review (October 30, head
c2c5269fbc3e): direct owner/caller review and a fresh helper-isolated autoreview of all nine changed files against baseacf995b629063dd5ac1db2737fd561b491566d6b, including complete admission/commit-owner context, found no actionable P0-P2 defects. This was a source review, not a new test run. No code or branch refresh was needed.Exact-head CI: run 40797953270, attempt 1 completed. The successful Goal test shard executed all 44 Goal cases, including built-in, recorded-Codex, and unrecorded-Codex Resume variants; build and type jobs also passed. Aggregate CI remains failed, not green.
Inherited-CI disposition:
check-lint-core-2fails on the unchangedeslint(curly)error atsrc/agents/tools/sessions-send-tool.admission.test.ts:722, with two existing max-lines warnings insession-manager-core.tsandsession-manager.ts. Independent main run 40796541972 has the same diagnostics. The failing files, lint runner/configuration, manifest, and lockfile are byte-identical between that baseline, the actual tested main parente25c026e, and tested merge3c1afb51. The native inherited-failure exception retains this failed CI; it does not waive review or security.Live-proof boundary: the contributor real-Gateway/native-model pause/edit/Resume proof below is prior-head evidence and was not independently rerun for this landing. Current-head CI supplies the production-RPC regression coverage.
Conflict update (
c2c5269fbc3): merged upstreammainatacf995b629063dd5ac1db2737fd561b491566d6band resolved six conflicts after upstream retired restart-safe admission and moved the Goal commit guard. Local Codex selection still precedes built-in local input admission; worker transcript authority remains worker-only. The merged fix: goals fail to resume after stopping a run #185273 Resume-after-Stop fix and typed invalid-goal errors are retained.Current-candidate validation: 44/44 public Goal admission/continuation regressions passed, including built-in, recorded local Codex, unrecorded local Codex, worker setup/revocation controls, identity/history retention, and idempotent replay (152.83s including cold worker preparation). Core and Gateway-server test typechecks, targeted core/root-test lint, formatting of all nine PR files, Goal MDX validation, and whitespace checks passed. Lint used the repository's source-backed core/root-test configurations after a broader configuration encountered pre-existing borrowed dependency links; no dependency links or lint guards were changed.
Independent review: a separate native read-only reviewer assessed the full nine-file candidate against
acf995b629063dd5ac1db2737fd561b491566d6bat P0–P2 and found no actionable defects. Static review only; the shared autoreview helper could not launch because itscodexexecutable was unavailable. This is not a helper-validated clean report. Current-head CI has now completed with the inherited lint failure described above; scope acceptance and fresh independent review are recorded above. No fresh hosted re-review was requested. The prior real-model scenario below has not been rerun after this integration; previous-head proof is retained with that boundary.Prior-head review follow-up (
0fdc43d4672): fixed ClawSweeper's documentation finding by aligning the Control UI eligibility paragraph with existing local Codex admission and keeping native admission separate from worker setup. Focused docs formatting, MDX validation, and whitespace checks pass. This is documentation only; runtime and real-model proof are unchanged. ClawSweeper accepted the supplied live behavior proof and identified no runtime defect. Hosted CI and the publishedopenclaw/ci-gatepassed on prior head0fdc43d4672835a8d77271939ad62eb25b896c48(CI run, published gate). That prior-head CI completed with no pending or failed checks; it is not current-head CI proof. ClawSweeper has not re-reviewed this documentation-only follow-up: its dispatch was deduplicated withreview_request_required. The earlier hosted Codex review failed without publishing findings and is not claimed as passed. Current scope acceptance and final independent review are recorded above.CI lint repair (
9f0f056c391): reproduced thecheck-lintfailure from run40632910651using the same root-test lint wrapper. Changed only two accesses to the__openclawwire field from dot to bracket notation; the wrapper now passes. Runtime code and proof assertions are unchanged, so the real-model evidence below remains applicable. The subsequent hostedcheck-lintjob passed on9f0f056c391.Base red: the production Goal RPC regression rejected local Codex Resume with
requires an idle built-in local session with recoverable history. The built-in variant passed.Real behavior, passed: a built production Gateway and real native Codex model, using disposable staged native auth and isolated Gateway state, started a synthetic goal; an operator paused and edited it; public Resume then caused real
get_goallookup and completion of that same goal. The new final marker existed only in the edited objective. Goal ID, creation time, session ID, objective, and prior stored history were retained. Replaying the same Resume operation returned its receipt with no new run or messages.The first live attempt exposed overlapping built-in/native admission for an unrecorded harness; that producer defect was repaired and added as a third regression variant. Authentication-only fixture failures were resolved by using the supported native home route with the live-test owner's staged HOME; credential portability policy was not relaxed.
44/44 Goal admission/queue/SQLite regressions passed (wall 123.90s, Vitest 119.45s); the final focused built-in/recorded-Codex/unrecorded-Codex variants also passed (61.33s wall). Hosted CI completed successfully; the linked run provides timing.
The complete live scenario passed in 54.67s (test 36.40s), including model effects, visible reply, history, and replay checks.
Production runtime build, core and Gateway-server test typechecks, focused lint/format, whitespace check, and fresh independent source review passed.
Sanitized live receipt (synthetic identifiers omitted):
{"proof":"local-codex-same-goal-resume","followedEditedObjective":true,"preservedHistory":true,"completed":true,"replayedWithoutNewRun":true}Reproduce with an available native Codex model and live-test auth:
OPENCLAW_LIVE_TEST=1 OPENCLAW_LIVE_CODEX_GOAL_RESUME=1 \ OPENCLAW_LIVE_CODEX_HARNESS_MODEL='<configured-native-model>' \ node scripts/run-vitest.mjs run --config test/vitest/vitest.live.config.ts \ test/gateway-local-codex-goal-resume.live.test.ts --maxWorkers=1The history assertion excludes only
__openclaw.transcriptPosition.source, the projected display-generation cursor defined bysession-accessor.sqlite-display-position.ts; every other original message field remains compared. Replay compares the complete raw history after settlement.Scope: no production Gateway restart/deployment or existing user-goal mutation. A genuinely claimed native thread still refuses work; this does not bypass that guard. No claim of restart recovery or automatic local continuation.
Simplification: reuse the native commit/ACK owner, with a local/worker admission mode instead of a second persistence path. Production delta +56/-47, test delta +424/-103, docs +8/-3 (against integrated base
acf995b6290).