feat(handoff): add secret-safe resume checkpoints (#1040)#1110
Merged
shaun0927 merged 5 commits intoMay 13, 2026
Conversation
Introduce an opt-in TaskRun store and MCP tool surface so long-running user goals can persist progress, help state, checkpoints, and evidence without changing existing browser tool behavior. Constraint: Builds on issue #1039 while avoiding duplication of open task-ledger PR #911. Rejected: Requiring Postgres or a Bytebot-style desktop task service | conflicts with OpenChrome's local MCP/CDP-first design. Confidence: high Scope-risk: moderate Directive: Keep TaskRun as goal-level metadata; do not move browser execution or #855 async task scheduling into this layer. Tested: npm test -- --runTestsByPath tests/core/task-run/storage.test.ts tests/tools/task-run-tools.test.ts --runInBand; npm run build; npm run lint:changed Not-tested: Live MCP round-trip against a running Chrome daemon. Co-authored-by: OmX <omx@oh-my-codex.dev>
Add a storage-only handoff lifecycle that records secret-safe before/after state, timeout/cancel transitions, and a single TaskRun evidence pointer when linked. This keeps manual intervention resumable without adding desktop/noVNC infrastructure or changing existing browser tool behavior. Constraint: Stack on #1039 TaskRun evidence rather than duplicate async task ledger/dashboard work from #855/#865/#863. Rejected: Persist raw DOM, cookies, storage values, or screenshots inline | secret exposure and payload bloat would harm long-running harness safety. Confidence: high Scope-risk: narrow Directive: Keep handoff artifacts caller-supplied and redacted unless a later browser-capture PR can prove secret-safe extraction. Tested: npm test -- --runTestsByPath tests/core/handoff/storage.test.ts tests/tools/handoff-tools.test.ts tests/core/task-run/storage.test.ts tests/tools/task-run-tools.test.ts --runInBand Tested: npm run build Tested: npm run lint:changed Co-authored-by: OmX <omx@oh-my-codex.dev>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one. |
This was referenced May 12, 2026
eae252c to
4ba6bf6
Compare
Owner
Author
Merge rationale (stack consolidation)Intent. Closes #1040 — adds opt-in Why this is correct.
CI. Targets the task-run lifecycle feature branch; CI workflow only runs on |
This was referenced May 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Progress / Review status
Auto-refreshed 2026-05-13 — owner comments cleaned up to reduce review noise.
feat/1040-handoff-resume→feat/1039-task-run-lifecycle5efe0bc— Enable bounded human takeover recoveryOwner comment cleanup: 0 issue + 0 inline review comments deleted. Outstanding feedback from automated/external reviewers above is unchanged.
Summary
oc_handoff_start/status/finish/canceltools for secret-safe human takeover checkpoints.url,title,origin, counts/keys, fingerprint, screenshot ref), with redaction before metadata/events are written.oc_handoff_finish, computes a bounded before/after delta and appends exactly onekind: "handoff"evidence pointer to the linked TaskRun whenrun_idis supplied.Closes #1040.
Stacked on #1083 /
feat/1039-task-run-lifecycle; merge #1083 first.Direction / duplicate check before implementation
Success criteria
Verification performed
npm test -- --runTestsByPath tests/core/handoff/storage.test.ts tests/tools/handoff-tools.test.ts tests/core/task-run/storage.test.ts tests/tools/task-run-tools.test.ts --runInBandnpm run buildnpm run lint:changedReal OpenChrome verification after merge
oc_task_run_startwith goal: "manual login resume smoke".oc_handoff_startwith the returnedrun_id,reason: "manual login required", and a safebeforesnapshot such as{ "url": "https://example.test/login", "title": "Login", "cookie_count": 0 }.oc_handoff_finishwith anaftersnapshot such as{ "url": "https://example.test/account", "title": "Account", "cookie_count": 1, "local_storage_keys": ["session_state"] }.oc_task_run_getfor the original run and verifylast_evidence[0].kind === "handoff",refequals thehandoff_id, andsummarycontains the URL/title/cookie-count delta.$OPENCHROME_HOME/handoffs/<handoff_id>/and confirm no raw token/password/cookie/storage values are present.ttl_ms: 1000, wait over one second, calloc_handoff_status, and verify it transitions toTIMED_OUTand cannot be finished.Out of scope