Skip to content

Stop implement leaves that never edit, and catch ZWSP loops - #438

Merged
TheGreatAxios merged 1 commit into
mainfrom
thrash-implement-never-edited
Aug 9, 2026
Merged

Stop implement leaves that never edit, and catch ZWSP loops#438
TheGreatAxios merged 1 commit into
mainfrom
thrash-implement-never-edited

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • intent=implement never-edited salvage: tool-using implement leaves that never call edit_file/write_file/delete_file no longer report as successful complete. They salvage as never-edited, which hard-blocks identical re-dispatch (same ledger path as never-acted/thrash).
  • ZWSP-resistant repetition detection: stream normalizer strips format characters (ZWSP, BOM, bidi marks, soft hyphen, word joiner) so invisible separators cannot evade the KMP loop detector — observed in live thrash fleets under ~/.corbits/projects/*.
  • Docs updated in ARCHITECTURE + PRODUCT.

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
  • CI typecheck/build (main currently has pre-existing vendor dual-package noise; not introduced here)
  • Unit coverage for never-edited / complete-with-edit / never-acted precedence / ZWSP loop / hard-block list

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.
@TheGreatAxios
TheGreatAxios merged commit 264a365 into main Aug 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant