fix(i18n): resolve Claude Code sandbox path issues in workflow#30710
Merged
crazywoola merged 3 commits intomainfrom Jan 8, 2026
Merged
fix(i18n): resolve Claude Code sandbox path issues in workflow#30710crazywoola merged 3 commits intomainfrom
crazywoola merged 3 commits intomainfrom
Conversation
Fixes issues discovered during workflow execution: 1. Command substitution `$()` not supported - split branch creation into two separate commands (get timestamp, then checkout) 2. Working directory issue - Claude Code sandbox runs from `web/` directory, causing path resolution failures: - Changed `pnpm --dir web` to just `pnpm` (already in web/) - Added `-C ${{ github.workspace }}` to all git commands - Added `--repo` flag to gh pr create command 3. Added documentation for working directory best practices 4. Added `date` command to allowedTools for timestamp generation Closes #30691 Contributor
| Note Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported. |
Member Author
Contributor
There was a problem hiding this comment.
Pull request overview
This PR resolves Claude Code sandbox execution issues in the i18n translation workflow by addressing command substitution limitations, working directory path resolution, and missing tool permissions.
Key Changes:
- Replaced command substitution
$(date +%Y%m%d-%H%M%S)with a two-step manual approach to accommodate Claude Code's Bash tool limitations - Updated all git and pnpm commands to account for the sandbox running from
web/directory - Added
datetool permissions and comprehensive documentation about working directory context
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Ensure reliability regardless of Claude Code sandbox working directory: - pnpm: `pnpm --dir ${{ github.workspace }}/web <cmd>` - git: `git -C ${{ github.workspace }} <cmd>` - gh: `gh --repo ${{ github.repository }} <cmd>` - File paths: `${{ github.workspace }}/web/i18n/...` Updated documentation section to clearly explain absolute path requirements. crazywoola approved these changes Jan 8, 2026
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.
Summary
Follow-up fix for #30692. Resolves issues discovered during workflow execution when Claude Code sandbox working directory may vary.
Issues Fixed
1. Command Substitution Not Supported
Problem:
git checkout -b "chore/i18n-sync-$(date +%Y%m%d-%H%M%S)"fails because Claude Code's Bash tool doesn't support$()command substitution.Fix: Split into two separate commands:
2. Working Directory Path Resolution
Problem: Claude Code sandbox working directory may vary (could be repo root or
web/subdirectory). Relative paths likegit add web/i18n/orpnpm --dir webmay fail depending on the actual working directory.Fix: Use absolute paths for ALL commands to ensure reliability regardless of working directory:
pnpm --dir ${{ github.workspace }}/web <command>git -C ${{ github.workspace }} <command>gh --repo ${{ github.repository }} <command>${{ github.workspace }}/web/i18n/...3. Missing Tool Permission
Problem:
datecommand needed for timestamp but not in allowedTools.Fix: Added
Bash(date *),Bash(date:*)to allowedTools.Changes
pnpm --dir web installpnpm --dir ${{ github.workspace }}/web installgit add web/i18n/git -C ${{ github.workspace }} add web/i18n/gh pr creategh pr create --repo ${{ github.repository }}web/i18n-config/languages.ts${{ github.workspace }}/web/i18n-config/languages.ts$(date +%Y%m%d)substitutionBest Practices Applied
$()is not supported in Claude Code's Bash tool&&or||Test Plan
workflow_dispatch🤖 Generated with Claude Code