Stop implement leaves that never edit, and catch ZWSP loops - #438
Merged
Conversation
intent=implement was prompt-only: a leaf that only read/searched then wrote a "plan" looked like a successful complete to the parent. Track editedPaths already recorded by thrash state and salvage as never-edited when requireEdit is on and no write/edit/delete happened. Hard-block identical re-dispatch for that salvage the same way as never-acted. Also strip format characters (ZWSP, BOM, bidi marks, soft hyphen) in the stream repetition normalizer so invisible separators cannot break periodicity detection — observed in live thrash fleets.
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.
Summary
intent=implementnever-edited salvage: tool-using implement leaves that never calledit_file/write_file/delete_fileno longer report as successfulcomplete. They salvage asnever-edited, which hard-blocks identical re-dispatch (same ledger path as never-acted/thrash).~/.corbits/projects/*.Why
Live coordinator fleets were thrashing: implement workers read/planned then "completed" without edits (parent saw success), and some stream loops injected U+200B between identical windows to dodge repetition stop.
Test plan
bun test ./src/subagent/repetition.test.ts ./src/subagent/index.test.ts ./src/subagent/thrash.test.ts— 119 pass