claude-code - 💡(How to fix) Fix 2.1.120: --continue/--resume fails with 'sandbox required but unavailable' even with sandbox.enabled=false (regression vs 2.1.119) [5 comments, 6 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#53085Fetched 2026-04-25 06:12:45
View on GitHub
Comments
5
Participants
6
Timeline
16
Reactions
7
Author
Timeline (top)
commented ×5labeled ×5cross-referenced ×3subscribed ×2

On macOS, Claude Code 2.1.120 refuses to start a resumed session, exiting with:

Error: sandbox required but unavailable: <reason>
  sandbox.failIfUnavailable is set — refusing to start without a working sandbox.

The same machine on 2.1.119 resumes the same sessions cleanly. Fresh (non-resumed) sessions on 2.1.120 also work — only --continue and --resume are affected.

~/.claude/settings.json already has the documented escape hatch:

"sandbox": {
  "enabled": false,
  "failIfUnavailable": false
}

…and the error still fires on 2.1.120 resumes. With sandbox.enabled = false, isSandboxRequired() should short-circuit to false in both versions (verified by inspecting the binaries — see below), so the user-facing settings are not actually suppressing the resume-path check in 2.1.120.

Error Message

Error: sandbox required but unavailable: <reason> sandbox.failIfUnavailable is set — refusing to start without a working sandbox.

Root Cause

On macOS, Claude Code 2.1.120 refuses to start a resumed session, exiting with:

Error: sandbox required but unavailable: <reason>
  sandbox.failIfUnavailable is set — refusing to start without a working sandbox.

The same machine on 2.1.119 resumes the same sessions cleanly. Fresh (non-resumed) sessions on 2.1.120 also work — only --continue and --resume are affected.

~/.claude/settings.json already has the documented escape hatch:

"sandbox": {
  "enabled": false,
  "failIfUnavailable": false
}

…and the error still fires on 2.1.120 resumes. With sandbox.enabled = false, isSandboxRequired() should short-circuit to false in both versions (verified by inspecting the binaries — see below), so the user-facing settings are not actually suppressing the resume-path check in 2.1.120.

Fix Action

Workaround

Pin to 2.1.119:

ln -sf ~/.local/share/claude/versions/2.1.119 ~/.local/bin/claude

Code Example

Error: sandbox required but unavailable: <reason>
  sandbox.failIfUnavailable is set — refusing to start without a working sandbox.

---

"sandbox": {
  "enabled": false,
  "failIfUnavailable": false
}

---

# Works on 2.1.120
claude                              # fresh session, fine
claude --print "hi"                 # fine

# Fails on 2.1.120
claude --continue                   # → "No deferred tool marker found ..."
claude --continue "continue"        # → sandbox-required error
claude --resume <session-id> "x"    # → sandbox-required error

# Same commands on 2.1.119: all work
/path/to/versions/2.1.119 --continue "continue"   # OK

---

// 2.1.120 (minified)
function y7_()  { return l8()?.sandbox?.enabled ?? false }                   // sandbox.enabled
function uc_()  { /* platform allowed list — true if no policy restricts */ }
function bZ1()  { return y7_() && uc_() && (l8()?.sandbox?.failIfUnavailable ?? false) }   // isSandboxRequired

---

ln -sf ~/.local/share/claude/versions/2.1.119 ~/.local/bin/claude
RAW_BUFFERClick to expand / collapse

Summary

On macOS, Claude Code 2.1.120 refuses to start a resumed session, exiting with:

Error: sandbox required but unavailable: <reason>
  sandbox.failIfUnavailable is set — refusing to start without a working sandbox.

The same machine on 2.1.119 resumes the same sessions cleanly. Fresh (non-resumed) sessions on 2.1.120 also work — only --continue and --resume are affected.

~/.claude/settings.json already has the documented escape hatch:

"sandbox": {
  "enabled": false,
  "failIfUnavailable": false
}

…and the error still fires on 2.1.120 resumes. With sandbox.enabled = false, isSandboxRequired() should short-circuit to false in both versions (verified by inspecting the binaries — see below), so the user-facing settings are not actually suppressing the resume-path check in 2.1.120.

Reproduction

# Works on 2.1.120
claude                              # fresh session, fine
claude --print "hi"                 # fine

# Fails on 2.1.120
claude --continue                   # → "No deferred tool marker found ..."
claude --continue "continue"        # → sandbox-required error
claude --resume <session-id> "x"    # → sandbox-required error

# Same commands on 2.1.119: all work
/path/to/versions/2.1.119 --continue "continue"   # OK

Settings file is valid JSON, no managed-settings layer present (/Library/Application Support/ClaudeCode/, ~/Library/Application Support/ClaudeCode/, /etc/claude-code/ all absent), no relevant env vars set, sandbox-exec exists at /usr/bin/sandbox-exec, SIP enabled (default).

What the binaries show

Both 2.1.119 and 2.1.120 have functionally equivalent gates:

// 2.1.120 (minified)
function y7_()  { return l8()?.sandbox?.enabled ?? false }                   // sandbox.enabled
function uc_()  { /* platform allowed list — true if no policy restricts */ }
function bZ1()  { return y7_() && uc_() && (l8()?.sandbox?.failIfUnavailable ?? false) }   // isSandboxRequired

Identical call counts on both versions:

  • getSandboxUnavailableReason(): 4
  • isSandboxRequired(): 4
  • isSandboxingEnabled(): 50
  • isSandboxEnabledInSettings(): 6

So the gating logic is unchanged. The regression appears to be in when/where the resume code path consults the gate — 2.1.120 surfaces the unavailability before the user's sandbox.enabled = false is honored on resume specifically.

Environment

  • Claude Code: 2.1.120 (failing) vs 2.1.119 (working)
  • Platform: macOS Darwin 25.2.0, arm64
  • Binary: /Users/<user>/.local/share/claude/versions/2.1.120 (Mach-O arm64, Bun-bundled)
  • Shell: zsh
  • csrutil: enabled
  • which sandbox-exec: /usr/bin/sandbox-exec

Workaround

Pin to 2.1.119:

ln -sf ~/.local/share/claude/versions/2.1.119 ~/.local/bin/claude

Asks

  1. The actual <reason> returned by getSandboxUnavailableReason() on the failing machine would be the most useful next data point — currently the value is truncated in the user-facing error before the line wraps. Could the error printer be tweaked to always print the reason on its own line / not truncate it?
  2. Honor sandbox.enabled = false consistently on the resume code path (it appears to be honored for fresh and --print invocations but not for --continue/--resume in 2.1.120).
  3. Separately, claude --continue (no prompt) on 2.1.120 errors with No deferred tool marker found in the resumed session. whenever the prior session ended cleanly — the message tells you to "Provide a prompt", which works, but the bare --continue UX is now broken for any session that didn't end mid-deferred-tool.

extent analysis

TL;DR

The most likely fix is to modify the resume code path in Claude Code 2.1.120 to consistently honor the sandbox.enabled = false setting.

Guidance

  • Verify that the sandbox.enabled = false setting is being read correctly by adding debug logging or printing the value of sandbox.enabled before the isSandboxRequired() check.
  • Investigate why the isSandboxRequired() function is being called before the user's sandbox.enabled = false setting is honored on the resume code path in 2.1.120.
  • Consider modifying the error printer to always print the reason returned by getSandboxUnavailableReason() on its own line, without truncation, to provide more useful error messages.
  • As a temporary workaround, pinning to version 2.1.119 using the provided ln -sf command may resolve the issue.

Example

No code snippet is provided as the issue is related to the internal logic of the Claude Code application.

Notes

The issue appears to be specific to the resume code path in Claude Code 2.1.120, and the provided workaround of pinning to version 2.1.119 may not be a long-term solution. Further investigation is needed to determine the root cause of the issue.

Recommendation

Apply the workaround by pinning to version 2.1.119 using the provided ln -sf command, as this is the most straightforward way to resolve the issue in the short term.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING