{"version":"2.1.305","anchor":"bash-bun-options-handling-in-shell-snapshot-command","canonical_anchor":"bash-bun-options-handling-in-shell-snapshot-command","heading":"Shell commands can set Bun options and refuse to run if they cannot","tier":"internal","area":"Elsewhere","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.305\/e\/bash-bun-options-handling-in-shell-snapshot-command","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.305","markdown":"### Shell commands can set Bun options and refuse to run if they cannot\n\nClaude Code can now set `BUN_OPTIONS` before shell commands to stop Bun auto-installing packages, and skips the command with exit code 126 if it cannot\n\n**Unclear.** It is not clear what turns on the new `BUN_OPTIONS` handling, so it is not clear which users get it.\n\n**What**\n\nBun is a program that runs JavaScript, and `BUN_OPTIONS` is an environment variable (a named value a program reads when it starts) that passes it extra options. Claude Code can now set `BUN_OPTIONS` before running a shell command, to turn off Bun's automatic package installs.\n\n- If it cannot set `BUN_OPTIONS`, the command is not run. It stops with exit code 126 and the message \"Claude Code did not run this command: it could not set BUN_OPTIONS\".\n\n- When `CLAUDE_CODE_REMOTE` is set, the existing step that adds `--smol` to `BUN_OPTIONS` now uses the shell's built-in `export`, so a custom `export` in your shell setup cannot replace it.\n\n**Why**\n\nShell commands run through Claude Code can now fail with exit code 126 if something in your shell environment stops `BUN_OPTIONS` from being set.\n\n- Area: Elsewhere\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}