Repository navigation
fix(ci): measure agent context without changing the budget snapshot - #784
Merged
Merged
Conversation
Competing text changes conflict when both commits update a shared byte snapshot. Compare source measurements from the proposed merge and its pinned base, with the existing maintainer label for growth. Carry-Group: build-ci Carry-Fix: #751 GPT-6.2 Sol via Codex in LastCode
Remove the checked-in snapshot equality assertion from PR tests. Keep the tool registration invariant and document how checkpoint regeneration and PR budget checks apply to text changes. Carry-Group: incubator Carry-Fix: #751 GPT-6.2 Sol via Codex in LastCode
Retargeting can change the comparison without a new head. Give title and body edits a separate skipped check to preserve the last budget result. GPT-6.2 Sol via Codex in LastCode Carry-Group: build-ci Carry-Fix: #751
Let the completed carry tree regenerate its own context snapshot with the existing frozen install. Fold the file into the last carry group before recording the candidate used by smoke and publication. GPT-6.2 Sol via Codex in LastCode Carry-Group: build-ci Carry-Fix: #751
Record where the checkpoint refreshes the derived budget in each flow. GPT-6.2 Sol via Codex in LastCode Carry-Group: incubator Carry-Fix: #751
lastobelus
marked this pull request as ready for review
November 20, 2026 08:38
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. |
Owner
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? 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". |
This was referenced Nov 20, 2026
lastobelus
added a commit
that referenced
this pull request
Nov 21, 2026
## Problem When an Action's process is lost (for example, an environment restart), its retained follow-up stays open and every saved Action in that thread is blocked. The composer has **Resume agent** and **Discard** buttons for this, but agents had no tool for it. An agent in that state could only report that it was stuck. Refs #681. ## What changed - **Two caller-only MCP tools:** `resume_interrupted_action` and `discard_interrupted_action`. Both take no arguments and call the existing `ActionResume` service methods (`resumeInterrupted`, `discardInterrupted`). - **Resume** queues the retained result and follow-up, like **Resume agent**. It does not rerun the command. Resume now refuses when ended ownership disposes the retained follow-up instead of reporting false success. Delivery and rollback stay under the existing lock. - **Discard** drops the follow-up so new Actions can launch, like **Discard**. It does not record that the command succeeded. - **Where each tool acts:** only on the calling thread's own Action. A mediated Action is recovered in the parent's thread and a child-owned one in the child's. - **Blocked messages point to recovery:** the blocked `list_project_actions` reason and the `action_already_running` launch refusal now name the composer **Resume agent** / **Discard** and both tools. The `list_project_actions` tool description mentions both tools too. - **Runbook:** a short section in `docs/internals/resumable-project-actions-setup.md`, "An interrupted Action blocks new launches", linked from the existing disabled-listing troubleshooting entry. - **Evals:** three cases in `evals/mcp-tool-use/cases/action-resume.ndjson`: resume, discard then start a different Action, and an ordinary-work control. ## What stays the same - **Availability:** recovery still works only while result delivery is available. It cannot clear a follow-up that is already running or pending. - **Guards:** owner obligations and permission guards are unchanged. - **Evidence:** `inspect_action_run` still shows the retained output and the lost outcome (`process_lost`). ## Not covered - **#681 stays open.** This PR fixes manual recovery only. Automatic notification when a process is lost is a separate change. ## Context budget The two recovery tools previously measured a 1505-byte catalog increase. CI now measures the proposed merge against its exact base; the `agent-context-increase` label is on the PR. This PR leaves the tracked budget snapshot unchanged for checkpoint regeneration. ## Validation - **Regression tests:** the missing-tool regressions failed on base. - **`ActionResume` suite:** 65 passed on the fix, including an owner-ended recovery case that failed before the review fix. - **`vp run check:changed origin/lastcode/main`:** passed format, lint, knip, GraphQL and typecheck of 3 packages, plus 75 tests in 3 files. - **Focused model evals** (3 cases × 3 samples, gpt-6.1-sol at xhigh; tool replies are simulated): | Case | Before | After | |---|---|---| | Interrupted-recovery cases | 0/6 | 6/6 | | Ordinary-work control | 3/3 | 3/3 | - **Full MCP model eval:** completed on `23ecb669431114b7001ff40d10db8f0223727280` with GPT-6.1 Sol at high effort and GPT-6.1 Terra as shell simulator. All 328 cases ran in 82 shards: 669 samples, 616 passed, 53 failed, 0 errored; 306 cases passed and 22 failed by majority. The three added recovery/control cases passed 6/6, and no other case called either recovery tool. The failures concern existing workflow, preview, native-agent and routing expectations. The closest Action ownership and background-wait failures also fail by majority on base with the same checks; the ordinary Action-launch control passes 2/2 on both. No full-suite pass is claimed. - **Local review:** finished with no blocker or should-level findings in the final round. Opus approved; Terra's two pre-existing persistence nits were moved to follow-ups. - **Checkpoint replay:** exact same-base compiled tree passed at `25120a5c9afdb03061fc62768188e3085ce6155a..c356191`. The source commit stays in Incubator because its child-ownership lifecycle and eval fixtures arrive there. - **Local Quick CI:** two optional attempts were blocked by base advancement; no local Quick CI pass is claimed. Exact-head GitHub CI and Codex review remain required. Local review: 3 rounds with GPT-6.1 Terra (xhigh) and Claude Opus 5.5 (high), approved. The six reviewed source, test, doc and eval files are byte-for-byte unchanged after replaying only this PR's two commits onto checkpoint base `79923ec1bac55be01b61588a09424021b093771e`. The budget snapshot matches the base, following #784. The scoped pre-push check passed on this head with 75 tests. Nonblocking follow-ups from local review: - F1: keep the conservative destructive hint for queued agent work; no permission change. - F2: replay actual blocked-result wording in model eval fixtures. - F3: make ended-owner refusal copy more specific. - F4: pre-existing initial metadata-publication failure can leave delivery pending. - F5: pre-existing accepted-dispatch/failed-save path can offer discard after queueing. - F6: add direct failed-delivery rollback coverage beyond the busy/read-unavailable guard. Implemented with GPT-6.1 Sol (xhigh) through the Codex harness; recovery wording by Claude Opus 5.5. Carry-Source-Ref: refs/lastcode/carry-sources/pr-779/23ecb669431114b7001ff40d10db8f0223727280 Carry-Source-Base: 79923ec Carry-Source-Head: 23ecb66
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.
Related to #751
Problem
Agent-facing text PRs update the same three totals, so independent changes can conflict on a generated file.
Change
agent-context-increaselabel for growth in any value.Verification
Local review: 1 round with GPT-6.1 Terra (xhigh), approved.
GPT-6.2 Sol via Codex in LastCode