[Bug] Bash tool subprocess execution failure on HPC clusters with cgroups/container restrictions

Resolved 💬 2 comments Opened Apr 3, 2026 by haochengsama Closed May 12, 2026

Bug Description
Bug Summary: Bash Tool Completely Non-Functional on HPC Cluster (Process Execution Layer Failure)
Environment: Linux HPC node with Lustre/GPFS, Slurm workload manager, standard Bash shell with Lmod modules.
Issue: Bash tool fails silently for all commands except pwd. No output, no error messages, commands appear to not execute at all.
Evidence:
❌ echo, ls, cat, env, date, sleep, file redirections (>) — all fail silently
✅ pwd — works (only surviving command)
✅ Read tool, Grep tool — function normally (filesystem access intact)
✅ Same Claude Code binary works on other servers
✅ Competitor product (Kimi Code) works on this same HPC node
Key Diagnostic: This is not the known "stdout redirected to background file" bug. Even date > /tmp/file.txt fails to create files, indicating the subprocess fails to spawn or execute entirely, rather than just losing output capture.
Likely Cause: HPC-specific restriction interfering with Claude Code's subprocess spawning—possibly strict cgroups v2 (pids.max), Singularity/Apptainer container overlay, Lmod environment wrapper conflicts, or privilege context switching.
Impact: Critical. Session unusable for any development requiring command execution. User must rely solely on Read/Grep/Glob tools for file operations and execute all commands in external terminal.
Workaround: Use Read/Grep with pattern: . to view file contents, use specific Glob patterns (avoid */*), or switch to VS Code Remote + Claude Extension to bypass CLI shell layer.

Environment Info

  • Platform: linux
  • Terminal: vscode
  • Version: 2.1.90
  • Feedback ID: a1e93a68-989b-41d8-b2d0-8ddb04155875

[
{
"error": "Error: Failed to clone marketplace repository: Command failed with ENOENT: git -c core.sshCommand=ssh -o BatchMode=yes -o StrictHostKeyChecking=yes clone --depth 1 --recurse-submodules --shallow-submodules https://github.com/anthropics/claude-plugins-official.git /home/[USER]/.claude/plugins/marketplaces/anthropics-claude-plugins-official\nspawn git ENOENT\n at fs (file:///home/[USER]/.nvm/versions/node/v24.14.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:4760:336)\n at async Aq7 (file:///home/[USER]/.nvm/versions/node/v24.14.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:4766:1914)\n at async file:///home/[USER]/.nvm/versions/node/v24.14.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:4776:1950\n at async Zn8 (file:///home/[USER]/.nvm/versions/node/v24.14.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:8321:12147)\n at async file:///home/[USER]/.nvm/versions/node/v24.14.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:8321:12903",
"timestamp": "2026-04-03T03:40:17.832Z"
},
{
"error": "Error: Failed to clone marketplace repository: Command failed with ENOENT: git -c core.sshCommand=ssh -o BatchMode=yes -o StrictHostKeyChecking=yes clone --depth 1 --recurse-submodules --shallow-submodules git@github.com:anthropics/claude-plugins-official.git /home/[USER]/.claude/plugins/marketplaces/anthropics-claude-plugins-official\nspawn git ENOENT\n at fs (file:///home/[USER]/.nvm/versions/node/v24.14.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:4760:336)\n at async Aq7 (file:///home/[USER]/.nvm/versions/node/v24.14.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:4766:2156)\n at async file:///home/[USER]/.nvm/versions/node/v24.14.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:4776:1950\n at async Zn8 (file:///home/[USER]/.nvm/versions/node/v24.14.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:8321:12147)\n at async file:///home/[USER]/.nvm/versions/node/v24.14.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:8321:12903",
"timestamp": "2026-04-03T03:40:17.861Z"
},
{
"error": "Error: Failed to create shell snapshot: Command failed: /bin/bash -c -l SNAPSHOT_FILE=/home/[USER]/.claude/shell-snapshots/snapshot-bash-[TIMESTAMP].sh\n source \"/home/[USER]/.bashrc\" < /dev/null\n\n # First, create/clear the snapshot file\n echo \"# Snapshot file\" >| \"$SNAPSHOT_FILE\"\n\n # When this file is sourced, we first unalias to avoid conflicts\n # This is necessary because aliases get \"frozen\" inside function definitions at definition time,\n # which can cause unexpected behavior when functions use commands that conflict with aliases\n echo \"# Unset all aliases to avoid conflicts with functions\" >> \"$SNAPSHOT_FILE\"\n echo \"unalias -a 2>/dev/null || true\" >> \"$SNAPSHOT_FILE\"\n\n \n echo \"# Functions\" >> \"$SNAPSHOT_FILE\"\n\n # Force autoload all functions first\n declare -f > /dev/null 2>&1\n\n # Now get user function names - filter completion functions (single underscore prefix)\n # but keep double-underscore helpers (e.g. __zsh_like_cd from mise, __pyenv_init)\n declare -F | cut -d' ' -f3 | grep -vE '^_[^_]' | while…",
"timestamp": "2026-04-03T03:40:17.XXXZ"
}
]

Note: Content was truncated.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗