Use Claude CLI --debug-file flag for native log capture#12116
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
|
🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰 |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
Smoke tests:
|
Smoke Test Results - Copilot EngineStatus: ✅ PASS
Run: §21415766752 cc @pelikhan
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
Smoke Test ResultsLast 2 Merged PRs:
Overall Status: PASS
|
|
@copilot ensure the new log file is parsed and included in this report. https://github.com/githubnext/gh-aw/actions/runs/21415766761/job/61663815195 |
The log file is already configured correctly. Claude writes debug logs to |
Claude Code CLI 2.1.20+ provides
--debug-filefor native debug log writing. This replaces shell redirection for cleaner, more reliable log capture.Changes
Claude Engine: Replace
--debug+ shell redirection with--debug-file /tmp/gh-aw/agent-stdio.log2>&1 | tee /tmp/gh-aw/agent-stdio.log--debug-file /tmp/gh-aw/agent-stdio.logTest Updates: Modified
TestClaudeExecutionLogCaptureto expect--debug-fileinstead ofteeredirectionBefore/After
Before:
After:
claude --debug-file /tmp/gh-aw/agent-stdio.log --verbose ... "$(cat prompt.txt)"The
--debug-fileflag implicitly enables debug mode and handles file writing internally, eliminating pipe complexity while preserving stdout for JSON output monitoring.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Changeset
--debug-file /tmp/gh-aw/agent-stdio.loginstead of shell redirection.