Skip to content

Fix false max-turns detection in Codex output - #22

Merged
danii1 merged 1 commit into
mainfrom
fix/max-turns-false-positive
Aug 19, 2026
Merged

Fix false max-turns detection in Codex output#22
danii1 merged 1 commit into
mainfrom
fix/max-turns-false-positive

Conversation

@danii1

@danii1 danii1 commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Same class of false positive as #15 (usage-limit detection). DEV-70's Codex run finished the Turborepo work, then DevIntern classified it as max-turns exhaustion because the detector substring-matched this repo's own source and oxlint dumps (due to max turns reached...).

  • require Claude's Error: Reached max turns (N) (and close variants) to match a complete diagnostic line, not an arbitrary transcript substring
  • skip scanning for harnesses that cannot pass --max-turns (today only Claude Code sets supportsMaxTurns)
  • do not treat stderr as trusted; Codex writes its tool transcript there, which is why stderr-only would not have prevented DEV-70
  • share source/diff/search-line filtering with the usage-limit detector
  • log the matched line when a run is classified as max-turns

Why not stderr-only

#15 already rejected "stderr is diagnostic." Codex exec dumps command/tool output on stderr. The DEV-70 false positive lived in that transcript.

Verification

  • focused detector + harness tests: passed
  • pre-commit format, lint, and typecheck: passed

Match Claude's turn-limit diagnostic as a complete line and skip
harnesses that cannot pass --max-turns. Substring scans of Codex tool
transcripts were classifying this repo's own source and lint dumps as
max-turns exhaustion.

Signed-off-by: devintern-internal[bot] <4622575+devintern-internal[bot]@users.noreply.github.com>
@danii1
danii1 merged commit 8009e8f into main Aug 19, 2026
1 check 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