Add 'Finished with errors' state for error_during_execution (issue #1088)#1089
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: #1088
…tion handling
- Fix bug where gh-upload-log failed with "Unknown argument: ''" error when
verbose=false. The issue was caused by template literal interpolation
`${verbose ? '--verbose' : ''}` passing an empty string as an argument.
Now using array-based command building to filter out empty arguments.
- Add improved handling for `error_during_execution` result subtype from
Claude CLI. This subtype indicates work may have been done before the
error, so it should be treated as a warning rather than a hard failure.
- Add tests for log upload command construction to prevent regression.
Fixes #1088
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
8f255b3 to
5411e77
Compare
This reverts commit 89c68eb.
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
Please double check original issue requirements. I don't like how we do error handling. The operation looks success, but it was rendered failed in the comment. Instead I think it is critical to mark it as Ensure all changes are correct, consistent and fully meet the requirements. |
|
🤖 AI Work Session Started Starting automated work session at 2026-01-09T21:01:02.711Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback. |
Issue #1088 requested that when error_during_execution occurs, the result should be marked as "Finished with errors" with a warning emoji (⚠️ ) instead of showing as failed (🚨). Changes: - claude.lib.mjs: Track errorDuringExecution flag in result, log "Claude command finished with errors" for this subtype - github.lib.mjs: Add new comment format "⚠️ Solution Draft Finished with Errors" for errorDuringExecution state - solve.mjs: Extract and pass errorDuringExecution flag - solve.results.lib.mjs: Accept and pass errorDuringExecution to attachLogToGitHub This differentiation allows users to understand that: -⚠️ Warning = work may have been completed before error - 🚨 Failed = error prevented work from being completed 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…js size The file exceeded the 1500 line limit after adding errorDuringExecution tracking. This commit extracts the duplicated cost comparison logic (~40 lines) into a reusable displayCostComparison() helper function. This reduces the file from 1507 to 1487 lines while maintaining the same functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
Summary
error_during_executionsubtype is detectederror_during_executionwas treated the same as complete failures, showing 🚨 "Solution Draft Failed"Changes
errorDuringExecutionflag whenerror_during_executionsubtype is detected, include in return value, log "Claude command finished with errors" instead of success messageerrorDuringExecutionstate with informative noteerrorDuringExecutionflag from tool resulterrorDuringExecutiontoattachLogToGitHubExample Output
When
error_during_executionoccurs, the PR comment will show:Technical Details
Also includes a refactor to extract duplicated cost comparison logic into a
displayCostComparison()helper function, reducingclaude.lib.mjsfrom 1507 to 1487 lines to stay under the 1500 line limit.Test plan
npm test,npm run lint)Closes #1088
🤖 Generated with Claude Code