Fix directory creation issue in Claude settings generation#495
Merged
Fix directory creation issue in Claude settings generation#495
Conversation
- Add mkdir -p .claude command before creating settings.json - Update test to verify directory creation happens before file creation - Fix resolves "No such file or directory" error in agent-cook workflow - All tests pass and workflows compile successfully Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Investigate why this action run failed: https://github.com/githubnext/gh-aw/actions/runs/17518643684/job/49759549903
Fix directory creation issue in Claude settings generation
Sep 6, 2025
pelikhan
approved these changes
Sep 6, 2025
Copilot AI
added a commit
that referenced
this pull request
Mar 26, 2026
) Agent-Logs-Url: https://github.com/github/gh-aw/sessions/1a2a2e18-88e1-44c2-997e-1f719dc3c6f5 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
pelikhan
added a commit
that referenced
this pull request
Mar 26, 2026
* Initial plan * fix: remove unused 'devices' import in docs/test-mobile.mjs (CodeQL #495) Agent-Logs-Url: https://github.com/github/gh-aw/sessions/1a2a2e18-88e1-44c2-997e-1f719dc3c6f5 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: pelikhan <4175913+pelikhan@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.
Problem
The agent-cook workflow was failing at the "Generate Claude Settings" step with the error:
This occurred because the Claude settings generation step attempted to create
.claude/settings.jsondirectly without first ensuring the.claudedirectory exists.Root Cause
In
pkg/workflow/claude_settings.go, theGenerateSettingsWorkflowStep()function generated a shell command that tried to create the settings file immediately:However, in a fresh GitHub Actions checkout, the
.claudedirectory doesn't exist, causing the file creation to fail.Solution
Added a directory creation command before the file creation:
The
mkdir -pflag ensures:Testing
Impact
This is a minimal fix that resolves the immediate workflow failure while maintaining backward compatibility. Any workflow using the Claude engine with network permissions will now work correctly in fresh repository checkouts.
Fixes the workflow failure reported in https://github.com/githubnext/gh-aw/actions/runs/17518643684/job/49759549903
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
api.contoso.com/tmp/go-build689472753/b278/cli.test -test.testlogfile=/tmp/go-build689472753/b278/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true(dns block)/tmp/go-build2673252272/b278/cli.test -test.testlogfile=/tmp/go-build2673252272/b278/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.