[BUG] claude-code has incorrect $PATH
Resolved 💬 2 comments Opened Jun 11, 2025 by mvhatch Closed Jun 11, 2025
Bug Description
Running the claude-code action in a Github workflow that uses a custom image (not ubuntu:latest) that has a custom $PATH value, this value is not reflected by claude.
Steps to Reproduce
- create a Github workflow job that uses a custom container image with custom tools pre-installed and available on its $PATH.
jobs:
claude:
runs-on: [self-hosted, foo]
container:
image: golang:1.24-bullseye
...
- ensure allowed tools include
allowed_tools: "Bash,Read,Edit,Write,Grep,Task,Replace" - ask claude to: "echo the $PATH and echo the go version"
Expected Behavior
- Running
echo $PATHshould show the complete path available to claude, e.g./go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin - Running
go versionshould output the go version installed in the container, e.g.go version go1.24.3 linux/amd64
Actual Behavior
- Running
echo $PATHoutputs:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin - Running
go versionoutputs:go: command not found
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗