[BUG] aarch64 linux (al2023) bash tool process spawning completely broken
Status Fixed / completed
Reported on v2.1.81
Maintainer reply None cached
Activity 5 comments · opened Mar 24, 2026 · closed Mar 24, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Bash tool times out, never spawns a child process (strace shows only CLONE_THREAD, no execve)
What Should Happen?
the prompt "ls the current directory" should print the ls output
Error Messages/Logs
it hangs indefinitely
Steps to Reproduce
--bare, --dangerously-skip-permissions, CLAUDE_CODE_DISABLE_SANDBOX=1, removing hooks — none help
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.81
Platform
AWS Bedrock
Operating System
Other Linux
Terminal/Shell
iTerm2
Additional Information
- Platform: aarch64 (Graviton), Amazon Linux 2023, kernel 6.1.163
- Not affected: Node.js child_process.execSync works fine on the same system
- No landlock kernel support (/sys/kernel/security/landlock/abi_version doesn't exist)
5 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Update: confirmed NOT architecture-specific — also broken on x86_64.
Tested on a second instance (
m8a.8xlarge, x86_64, same AL2023 kernel 6.1.163) — identical behavior. Bash tool hangs, never reachesexecve.Additional testing:
python3 pty.openpty(),script -qc)child_process.execSync('echo hello')works fineNoNewPrivs, no capability restrictions on the Claude processenv -iwith only essential vars doesn't help--bareflag doesn't helpBoth instances run inside Coder workspaces (Coder agent v2.31.5, SSH tunneled via Coder relay). The
SSH_CONNECTIONshows0.0.0.0 0 0.0.0.0 0andttyreturns "not a tty" — this is Coder's SSH proxy, not a direct SSH connection.The common factor is the Coder agent execution environment, not architecture or kernel version.
Further investigation — also broken via SSM (not Coder-specific)
Testing via AWS SSM Session Manager (real PTY, not Coder SSH) — Bash tool still hangs. So the Coder agent environment is NOT the cause.
Key finding on landlock:
CONFIG_SECURITY_LANDLOCK=ycat /sys/kernel/security/lsmshowslandlockin the chaindmesgshowslandlock: Up and running.landlock_create_ruleset(NULL, 0, LANDLOCK_CREATE_RULESET_VERSION)returns ABI version 2/sys/kernel/security/landlock/directory does not exist (noabi_versionfile)security=selinux— SELinux is the primary LSMThis is a quirk of AL2023's kernel config: landlock is functional at the syscall level but its securityfs interface is not exposed. If Claude Code checks for
/sys/kernel/security/landlock/abi_versionto detect landlock support vs using the syscall directly, there could be a mismatch causing unexpected behavior.Other findings:
subprocess.Popen(["/bin/bash", "-c", "echo hello"], ...)works fine from Pythonchild_process.execSync("echo hello")works fine from system Node.jsexecve(confirmed via strace on both arches)-d) produces no output before the timeoutsandbox.enabledPlatforms: []in settings.json has no effect--bareflag has no effectThe binary appears to enter its Bash tool code path but never reaches the point of actually forking a child process.
Root cause found — not a Claude Code bug.
A bootstrap module was installing
/etc/profile.d/knock-zsh.shcontaining:This
execreplaces bash with zsh whenever bash sources/etc/profile.d/. When Claude Code spawns bash for the Bash tool, profile.d fires, bash gets replaced by zsh, and the tool never gets control back.Fix: Use
chsh -s /bin/zsh ec2-userinstead to set the login shell properly without interfering with non-interactive bash sessions.Closing as user error. Sorry for the noise!
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.