[WIP] Fix claude_harness.cjs misclassification of error_max_turns exits#29605
Closed
[WIP] Fix claude_harness.cjs misclassification of error_max_turns exits#29605
Conversation
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/acd38477-c928-4dd2-ad45-319d3ab8f5a4 Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
…into ClaudeEngine - Create actions/setup/js/claude_harness.cjs: wraps Claude Code CLI with retry logic; detects 'error_max_turns' (deterministic max_turns exit) and does NOT retry via --continue, fixing the 3x wasted retry cascade - Create actions/setup/js/claude_harness.test.cjs: 22 tests covering error_max_turns pattern detection, retry policy, and --prompt-file resolution - Update pkg/workflow/claude_engine.go: - Implement HarnessProvider (GetHarnessScriptName → 'claude_harness.cjs') - Replace shell expansion '$(cat prompt.txt)' with --prompt-file flag - Add GH_AW_NODE_BIN export to AWF PathSetup for reliable node resolution - Update tests: expect --prompt-file and harness in claude execution steps - Recompile all workflows to pick up the harness and PathSetup changes Agent-Logs-Url: https://github.com/github/gh-aw/sessions/acd38477-c928-4dd2-ad45-319d3ab8f5a4 Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.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.
actions/setup/js/claude_harness.cjswith:error_max_turnsdetection (the core fix) — not retriable via--continue--continue--prompt-fileresolution for Claude (positional arg)copilot_harness.cjsactions/setup/js/claude_harness.test.cjswith 22 testspkg/workflow/claude_engine.goto implementHarnessProviderand wire harnessGetHarnessScriptName()returning"claude_harness.cjs""$(cat prompt.txt)"shell expansion with--prompt-fileflagGH_AW_NODE_BINin AWF PathSetup for reliable node binary resolutionclaude_engine_test.goandengine_agent_import_test.gomake agent-finish— all Claude tests pass, pre-existingcreate_issue.test.cjsfailures unrelated to this PR