Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 27, 2026

Claude Code CLI 2.1.20+ provides --debug-file for 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.log

    • Removed: 2>&1 | tee /tmp/gh-aw/agent-stdio.log
    • Added: --debug-file /tmp/gh-aw/agent-stdio.log
    • Applies to both AWF-wrapped and direct execution paths
  • Test Updates: Modified TestClaudeExecutionLogCapture to expect --debug-file instead of tee redirection

Before/After

Before:

claude --debug --verbose ... "$(cat prompt.txt)" 2>&1 | tee /tmp/gh-aw/agent-stdio.log

After:

claude --debug-file /tmp/gh-aw/agent-stdio.log --verbose ... "$(cat prompt.txt)"

The --debug-file flag implicitly enables debug mode and handles file writing internally, eliminating pipe complexity while preserving stdout for JSON output monitoring.

Original prompt

Review Claude code latest flags, specially the --debug-file flag to be able to render the logs automatically .


✨ 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

  • Type: patch
  • Description: Switch Claude CLI log capture to use --debug-file /tmp/gh-aw/agent-stdio.log instead of shell redirection.

Ahoy! This treasure was crafted by 🏴‍☠️ Changeset Generator

Copilot AI and others added 3 commits January 27, 2026 21:38
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>
Copilot AI changed the title [WIP] Review --debug-file flag for automatic log rendering Use Claude CLI --debug-file flag for native log capture Jan 27, 2026
Copilot AI requested a review from pelikhan January 27, 2026 21:53
@pelikhan pelikhan added the smoke label Jan 27, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions
Copy link
Contributor

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰

@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Contributor

Smoke tests:
✅ GitHub MCP review (last 2 merged PRs)
✅ safeinputs-gh PR list
✅ Serena activate_project
✅ Playwright github.com title
✅ Tavily search
✅ File write/read
✅ Discussion query + comment
Overall: PASS

AI generated by Smoke Codex

@github-actions
Copy link
Contributor

Smoke Test Results - Copilot Engine

Status: ✅ PASS

Test Result
GitHub MCP
Safe Inputs GH CLI
Serena MCP
Playwright
File Writing
Bash Tool
Discussion Interaction

Run: §21415766752

cc @pelikhan @Copilot

AI generated by Smoke Copilot

@github-actions
Copy link
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions
Copy link
Contributor

Smoke Test Results

Last 2 Merged PRs:

Test Result
GitHub MCP
Safe Inputs GH CLI
Serena MCP
Make Build
Playwright
Tavily Web Search
File Writing
Bash Tool
Discussion Interaction

Overall Status: PASS

AI generated by Smoke Claude

@pelikhan
Copy link
Contributor

@copilot ensure the new log file is parsed and included in this report. https://github.com/githubnext/gh-aw/actions/runs/21415766761/job/61663815195

Copy link
Contributor Author

Copilot AI commented Jan 27, 2026

@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 /tmp/gh-aw/agent-stdio.log via the --debug-file flag, and the "Parse agent logs for step summary" step reads from the same file using GH_AW_AGENT_OUTPUT: /tmp/gh-aw/agent-stdio.log. The logs are parsed by parse_claude_log.cjs and included in the workflow step summary.

@pelikhan pelikhan marked this pull request as ready for review January 27, 2026 22:11
@pelikhan pelikhan merged commit 29d8240 into main Jan 27, 2026
91 checks passed
@pelikhan pelikhan deleted the copilot/review-flags-in-clause-code branch January 27, 2026 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants