Repository navigation
Relocate Claude debug log outside agent data directory - #59450
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
✅ Ponytail Reviewer completed successfully! Lean already. Ship. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "ab.chatgpt.com"See Network Configuration for more information.
|
|
🔍 Design Decision Gate 🏗️ is checking for design decision records on this pull request... |
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality Sentinel skipped because pre-fetch PR data was unavailable: unable to fetch test file diff Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "github.com"See Network Configuration for more information.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅ Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "github.com"See Network Configuration for more information.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
Comment MemoryNote This comment is managed by comment memory.It stores persistent context for this thread in the code block at the top of this comment.
|
There was a problem hiding this comment.
Verdict
Non-blocking change. The debug-log relocation looks internally consistent across the Claude engine, generated workflow output, and artifact declarations.
Highlights
I checked the only plausible failure mode here — breaking the AWF host/container artifact contract by moving the file out of /tmp/gh-aw/agent — and this patch updates every relevant surface in the diff: host-side pre-creation, --debug-file, declared output files, generated workflow golden output, and tests. The grumpy sub-agent raised the same concern, but it does not hold up against the actual wiring in buildClaudeFullCommand and GetDeclaredOutputFiles.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 34.3 AIC · ⌖ 7.34 AIC · ⊞ 23.5K
Comment /review to run again
There was a problem hiding this comment.
Reviewed the Claude debug log relocation (/tmp/gh-aw/agent/claude-debug.log → /tmp/gh-aw/claude-debug.log). Applied impeccable harden/audit lenses (bug-fix/path-change scope).
Findings:
- Core change in
claude_engine.gois consistent: constant,PathSetupmkdir/touch, and printf format string all updated in sync. - Matching test updates in
claude_engine_test.go,claude_engine_network_test.go,logs_test.go, and theclaude.goldenfixture (mkdir path, --debug-file path, umask touch, artifact upload path) all correctly reflect the new location. - No other Go source references the old
/tmp/gh-aw/agent/claude-debug.logpath;constants.TmpGhAwAgentDiris still used correctly elsewhere for genuine user-data paths (unrelated to this fix). - Ran
go test ./pkg/workflow/...— all tests pass.
No blocking issues found; the change is minimal, self-consistent, and fully covered by tests/golden fixtures.
🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · copilot · sonnet50 · 34.7 AIC · ⌖ 13.4 AIC · ⊞ 8.3K
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /codebase-design to check the debug-log relocation for architectural fit.
📋 Analysis
What changed
claudeDebugLogFile moved from /tmp/gh-aw/agent/claude-debug.log to /tmp/gh-aw/claude-debug.log, with matching updates to:
PathSetupmkdir/touch commands inclaude_engine.go- All 62 generated
.lock.ymlfixtures (mechanical, consistent with the source change) - Unit test assertions (
claude_engine_test.go,claude_engine_network_test.go,logs_test.go) - The wasm golden fixture
Why this holds up
/tmp/gh-aw/agent/is documented elsewhere in the codebase (sandbox.go,compiler_validators.go) as the reserved root for user-generated agent data — moving engine-internal diagnostics out of it is the right call and matches the existing precedent set byRedactedURLsLogPathandagent_usage.json, which already live directly under/tmp/gh-aw/.getEngineArtifactPaths/generateCleanupStepinengine_output.gotreat any path underconstants.TmpGhAwDirSlashidentically (no explicit cleanup needed, since it's not a workspace file) — so this relocation doesn't change artifact collection or cleanup behavior, just where the file physically lives.- File permissions (
umask 177) are preserved verbatim in the new location. - Verified the full set of
.goand.lock.ymlreferences are updated consistently;go build ./...succeeds.
No functional or architectural concerns — this is a safe, well-scoped, mechanical move with corresponding test/fixture updates.
Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
github.com
To allow these domains, add them to the network.allowed list in your workflow frontmatter:
network:
allowed:
- defaults
- "github.com"See Network Configuration for more information.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · 58 AIC · ⌖ 14.6 AIC · ⊞ 10.3K
Comment /matt to run again
There was a problem hiding this comment.
🟢 Approval recommended
The debug log relocation is consistently applied across engine code, regenerated workflows/fixtures, and updated tests without introducing functional changes beyond the intended path move.
Pull request overview
This PR relocates the Claude Code CLI debug log from the user-data-reserved /tmp/gh-aw/agent/ directory to a top-level path (/tmp/gh-aw/claude-debug.log) to avoid mixing engine diagnostics with agent-generated outputs, while keeping restrictive file permissions and artifact upload coverage intact.
Changes:
- Update the Claude engine to write its debug log to
/tmp/gh-aw/claude-debug.logand adjust pre-run path setup accordingly. - Refresh workflow lockfiles, WASM golden fixtures, and tests to assert the new debug log path and upload it as part of the agent artifact set.
- Add a patch changeset documenting the behavior change.
File summaries
| File | Description |
|---|---|
| pkg/workflow/claude_engine.go | Switch Claude debug log path to /tmp/gh-aw/claude-debug.log and update path setup strings. |
| pkg/workflow/logs_test.go | Update expected lockfile fragments to match the new debug log path and pre-touch behavior. |
| pkg/workflow/claude_engine_test.go | Update assertions to expect the new --debug-file path. |
| pkg/workflow/claude_engine_network_test.go | Update network-permissions test expectations for the new debug log path and touch command. |
| pkg/workflow/testdata/TestWasmGolden_AllEngines/claude.golden | Refresh golden workflow output for new debug log location and artifact path. |
| .github/workflows/step-name-alignment.lock.yml | Regenerate lockfile to touch/upload /tmp/gh-aw/claude-debug.log instead of the agent subdir. |
| .github/workflows/static-analysis-report.lock.yml | Regenerate lockfile to reflect the updated debug log path in setup, invocation, and artifacts. |
| .github/workflows/smoke-github-claude.lock.yml | Regenerate lockfile to reflect the updated debug log path in setup, invocation, and artifacts. |
| .github/workflows/smoke-claude.lock.yml | Regenerate lockfile to reflect the updated debug log path in setup, invocation, and artifacts. |
| .github/workflows/smoke-claude-on-copilot.lock.yml | Regenerate lockfile to reflect the updated debug log path in setup, invocation, and artifacts. |
| .github/workflows/sergo.lock.yml | Regenerate lockfile to reflect the updated debug log path in setup, invocation, and artifacts. |
| .github/workflows/scout.lock.yml | Regenerate lockfile to reflect the updated debug log path in setup, invocation, and artifacts. |
| .github/workflows/safe-output-health.lock.yml | Regenerate lockfile to reflect the updated debug log path in setup, invocation, and artifacts. |
| .github/workflows/ruflo-backed-task.lock.yml | Regenerate lockfile to reflect the updated debug log path in setup, invocation, and artifacts. |
| .github/workflows/prompt-clustering-analysis.lock.yml | Regenerate lockfile to reflect the updated debug log path in setup, invocation, and artifacts. |
| .github/workflows/portfolio-analyst.lock.yml | Regenerate lockfile to reflect the updated debug log path in setup, invocation, and artifacts. |
| .github/workflows/lockfile-stats.lock.yml | Regenerate lockfile to reflect the updated debug log path in setup, invocation, and artifacts. |
| .github/workflows/instructions-janitor.lock.yml | Regenerate lockfile to reflect the updated debug log path in setup, invocation, and artifacts. |
| .github/workflows/hourly-ci-cleaner.lock.yml | Regenerate lockfile to reflect the updated debug log path in setup, invocation, and artifacts. |
| .github/workflows/go-pattern-detector.lock.yml | Regenerate lockfile to reflect the updated debug log path in setup, invocation, and artifacts. |
| .github/workflows/go-fan.lock.yml | Regenerate lockfile to reflect the updated debug log path in setup, invocation, and artifacts. |
| .github/workflows/github-mcp-tools-report.lock.yml | Regenerate lockfile to reflect the updated debug log path in setup, invocation, and artifacts. |
| .github/workflows/github-mcp-structural-analysis.lock.yml | Regenerate lockfile to reflect the updated debug log path in setup, invocation, and artifacts. |
| .github/workflows/example-workflow-analyzer.lock.yml | Regenerate lockfile to reflect the updated debug log path in setup, invocation, and artifacts. |
| .github/workflows/daily-yamllint-fixer.lock.yml | Regenerate lockfile to reflect the updated debug log path in setup, invocation, and artifacts. |
| .github/workflows/daily-safeoutputs-git-simulator.lock.yml | Regenerate lockfile to reflect the updated debug log path in setup, invocation, and artifacts. |
| .github/workflows/daily-safe-outputs-conformance.lock.yml | Regenerate lockfile to reflect the updated debug log path in setup, invocation, and artifacts. |
| .github/workflows/daily-choice-test.lock.yml | Regenerate lockfile to reflect the updated debug log path in setup, invocation, and artifacts. |
| .github/workflows/ci-doctor.lock.yml | Regenerate lockfile to reflect the updated debug log path in setup, invocation, and artifacts. |
| .github/workflows/copilot-session-insights.lock.yml | Regenerate lockfile to reflect the updated debug log path in setup, invocation, and artifacts. |
| .changeset/patch-relocate-claude-debug-log.md | Add patch changeset describing the debug log relocation. |
Review details
- Files reviewed: 62/62 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
🎉 This pull request is included in a new release. Release: |
Claude’s debug log was stored under
/tmp/gh-aw/agent, which is reserved for user-generated data. This could mix engine diagnostics with agent outputs.Changes
/tmp/gh-aw/claude-debug.log.