Repository navigation
loopguard: a productive turn is not a loop (fixes #128) - #138
Merged
Merged
Conversation
Claude Code gives a successful call no exit status (a non-zero exit comes as PostToolUseFailure), so the guard read every success by its output: a green Playwright run whose exit prints libuv's "Assertion failed", or source read with cat that mentions an Error, counted as failing. - A successful Claude Code shell call counts as exit 0 where that status covers the command (exit_status_covers): one command, an && chain, or earlier commands that only read, move about, set up or report; heredoc bodies are input, not commands. The history import's envelope replay does the same. - git checkout -- / git restore counts as an edit only for a file the turn edited. - Every test run the turn tracker knows counts in SpiralState.test_runs in the plugin (the redirect's "N verification(s)"); dotenv ... -- is a launcher, and Playwright's summary decides a piped run. - Test fixtures send a failing Claude Code call as PostToolUseFailure, as Claude Code does. SpiralState, ERR_RE and the stuck rules are unchanged, so the experiments read as before. Replayed: 3,806 SWE-bench Claude Code sessions, failing outputs 7,730 -> 4,660, gate 11.9% -> 9.7%, stuck 113 -> 82, ended well 91.6% both; 682 local interactive turns, failing outputs 1,586 -> 594, gate 68 -> 25 turns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Claude Code gives a successful call no exit status (a non-zero exit comes as PostToolUseFailure), so the guard read every success by its output: a green Playwright run whose exit prints libuv's "Assertion failed", or source read with cat that mentions an Error, counted as failing.