Repository navigation
Refuse lost later planner amendments and give repairs room for the reply - #2407
Merged
Merged
Conversation
The base worker regression refused crew-0-a.md under crew-0-*.md. Commit 461fcd9 introduced exact/prefix matching and accepted unvalidated scopes; dedbfef normalized scope spellings without interpreting glob syntax. Share segment matching and scope validation across worker guards, scheduler collisions, retry detection, quick-task admission and the harness rig. Reject unsafe plans with repairable reasons and refuse symlink escapes, including dangling links. Keep exact absolute quick-task scope normalization compatible. Potential pattern intersections serialize conservatively. No recursive **. The worker regression was red before implementation. Target tests pass five times; all named tests in the affected session files and amendment file pass. Source and packed manual checks pass. Fixed and lean prefix totals each fall 10 bytes; their existing budget failures remain. Changelog check rejects the required pr: 0 placeholder as expected. No budgets or tests were weakened. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
As in the shell, a wildcard or class never matches a segment that starts with a dot unless the pattern segment starts with one too, so * never reaches .git, .env or .codeaf. Git hooks run code, and a scope that reads as narrow must not reach them. .env* still names .env.local. Co-Authored-By: Claude Opus 5.5 <[email protected]>
An empty opening fell through synthesis with no results, marked the root done, and announced an unsaved stop. End it through the existing failed-with-detail path and save one assistant notice. Admit retries only for live families that created no workers, through normal budget checks, with a new run and no carried output. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The planner introduced in 461fcd9 discarded finish reasons and accepted empty syntax repairs. Retain response metadata, retry a lost opening once with more output room, and preserve the cut-off detail through the empty-crew notice and fresh-run recovery path from #2403. Complete explicit empty plans and later planner calls keep their existing behavior. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Later planner calls bypassed the opening-only lost-reply guards, allowing cut-off replies and empty syntax repairs to settle as no change. Reuse the existing failure detection so the run notes the refusal, keeps its plan, and continues. Give syntax repair max(8192, twice reported completion tokens), preserving a larger requested recovery cap. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nner-lost-amendment
The glob scope check pushed newQuickSpec to 18 decisions against a ceiling of 15. The check is now its own function, refuseUnsafeScopes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nner-lost-amendment
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # internal/session/orchestrate_test.go
With the Library re-land also in the manual, the word pulled "what happens if it will not stop" away from the keys page. Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # internal/session/orchestrate_test.go
# Conflicts: # internal/orchestrate/orchestrate.go # internal/session/orchestrate.go # internal/session/orchestrate_test.go
…nner-lost-amendment
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.
What changes
Builds on #2404. That PR handles a cut-off or empty reply from the opening planner call. Later planner calls (amendments while a run is going) skipped those checks. A later reply cut off at the output limit, or a syntax repair that came back empty, was saved as "no change". The run lost the amendment without saying so.
{}from the planner is still "no change".max(8192, 2 × the reply's completion tokens), or a larger cap if the call already asked for one. Before, it reused the original cap even when that was smaller than the reply.No limit constant changes. The provider and spending checks still apply.
Tests
TestLaterPlannerRejectsLostRepliesAndContinues: a cut-off later reply, an empty one, and a repair that comes back empty. Each one leaves a note, keeps the plan, and the next round runs.TestPlannerRepairBudgetCoversOriginalCompletion: the repair asks for at least twice the reply's completion tokens and keeps a larger cap that was already requested.cmd/codeaf,internal/orchestrate,internal/tui3andinternal/manualpass.internal/sessionfails only on the five tests that already fail on app/v3, which Split long session and automation functions under the ending ceiling #2395–Classify stage, plan and share tools for program holds #2397 fix.🤖 Generated with Claude Code