# Check five Claude Code compaction and sandbox fixes

> Review the 2.1.309 and 2.1.311 fixes for long sessions, stale instructions, MCP tools and sandbox behavior.

Source: https://fullbytedeveloper.com/blog/claude-code-october-compaction-sandbox-fixes
Keyword: WEEKLY
Published: 2026-11-05

Claude Code releases 2.1.309 and 2.1.311 fix several failures that can look like a model ignoring instructions or getting stuck. Our WEEKLY post covers these October releases [1][2].

## Check the installed version

```bash
claude --version
```

If your installation supports Claude Code's updater, run [3]:

```bash
claude update
claude --version
```

For a package-manager installation, use that manager's update instructions in the setup documentation. Confirm the version after updating; these fixes first appeared in the releases below.

## Four session fixes in 2.1.311

- Standard-context sessions that crossed 200K tokens could stop with a usage-credit error. The fix makes them compact and continue.
- Edits to `CLAUDE.md` and `MEMORY.md` could be stale immediately after automatic compaction. The release fixes that stale view.
- Subagents could miss MCP tools when the server finished connecting after the subagent started. The release fixes that timing problem.
- A very long list item in `CLAUDE.md` could cause long freezes during startup or file work. The release fixes those freezes [1].

Compaction still summarizes context. Keep instructions concise and check the actual file when a response appears to use an old rule.

## Sandbox fixes in 2.1.309

The earlier release fixes shell startup files running outside the sandbox before sandboxed Bash commands on macOS and Linux. It also prevents sandboxed commands and auto-accepted edits from modifying the file supplied through `--mcp-config` [2].

These are specific fixes. Keep your existing sandbox and permission settings enabled after updating. If you were working around one of these bugs, retry the original task with the updated client and record the version alongside the result.

## Sources

1. [Claude Code release 2.1.311](https://github.com/anthropics/claude-code/releases/tag/v2.1.311)
2. [Claude Code release 2.1.309](https://github.com/anthropics/claude-code/releases/tag/v2.1.309)
3. [Claude Code setup and updates](https://code.claude.com/docs/en/setup)

## Original posts

- [Instagram post](https://www.instagram.com/p/DfFcOZSGqjV/)
- [Facebook post](https://www.facebook.com/122189873306849905/posts/122190201782849905)
- [Threads post](https://www.threads.com/@fullbytedeveloper/post/DfFcU7gmi5Q)
- [TikTok photos](https://www.tiktok.com/@fullbytedeveloper/photo/7702128806206835976)
