Claude Code 2.1.77
**Output token ceiling uplift (Opus 4.6 64k→128k)** — Model capacity expansion enables longer response payloads in a single turn, reducing need for continuation prompts in code/analysis-heavy workflows. Agentic relevance: agents generating large documents, multi-file refactors, or comprehensive reports now fit complete outputs without truncation.
New primitives
allowRead settingsettingRe-allows read access within regions marked with `denyRead` in sandbox filesystem rules, enabling fine-grained access recovery
/copy NcommandCopies the Nth-latest assistant response to clipboard (indexed, not just the last one)
/branchcommandRenames `/fork` to `/branch` as primary command (backward compatible alias remains)
SendMessage({to: agentId}) agent continuationtoolResume a spawned agent without the deprecated `resume` parameter, now auto-resumes in background
Workflow recipes
The combination of renamed /branch command (semantic clarity), background auto-resume via SendMessage, and dramatically faster session recovery enables agents to fork into parallel analysis streams without losing context or waiting for expensive session reloads. Higher token ceilings mean forked agents can produce larger payloads per turn without truncation.
Implement a multi-stream research or refactoring agent that spawns independent branches for different analyses (e.g., security audit, performance analysis, code migration), auto-resumes them via SendMessage, and collects their larger outputs (now up to 128k tokens for Opus 4.6) in the parent without waiting for slow session recovery. The renamed /branch makes the intent more legible in agent code.
The new allowRead primitive unlocks selective permission recovery within broad filesystem denials, enabling agents to iteratively explore restricted regions without wholesale permission changes. This reduces security friction in exploration-heavy tasks while maintaining isolation bounds.
In a hardened sandbox environment (e.g., PII-masked repos or build-artifact directories), use denyRead to block large swaths but leverage allowRead to surgically re-enable read access to specific subdirectories as exploration questions narrow. Agents can probe and adapt without requesting full sandbox reset.
The new /copy N command enables agents and users to selectively recover earlier assistant responses without re-running turns or searching linearly. Combined with multi-turn memory, this supports workflows where an earlier response proved more useful than a recent refinement, or where parallel response branches need deduplication/comparison.
In a long analysis session, when a user (or agent parent) discovers that the 3rd-most-recent response was superior to recent ones, /copy 3 surfaces it directly for comparison or reuse. This avoids re-prompting, replay, or memory bloat while supporting response-quality iteration patterns common in research and synthesis workflows.
Agentic relevance
The 4 new primitives enable cleaner response recovery (`/copy N`), finer permission control (`allowRead`), clearer semantics for agent forking (`/branch`), and safer agent continuation without deprecated parameters (`SendMessage` auto-resume). The token ceiling uplift (64k→128k Opus 4.6) and 45% faster `--resume` improve large-model agent turnaround and session recovery time. Fixes to compound bash permission rules and PreToolUse hook bypass close security gaps that could have caused agents to over-escalate permissions.
Hardening & fixes (38)
- Fixed "Always Allow" permission rule saving on compound bash commands (e.g., `cd src && npm test`) — now creates per-subcommand rules instead of single dead rule, eliminating repeated permission prompts
- Fixed auto-updater memory leak: overlapping binary downloads when slash-command overlay repeatedly opened/closed could accumulate tens of gigabytes
- Fixed `--resume` race condition silently truncating recent conversation history due to timing between memory-extraction writes and transcript load
- Fixed PreToolUse hooks returning `"allow"` bypassing `deny` permission rules, including enterprise managed settings
- Fixed Write tool line-ending corruption on CRLF files and directories
- Fixed memory growth in long-running sessions from progress messages surviving compaction
- Fixed cost/token tracking fallback: non-streaming API mode now properly records usage
- Fixed `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS` not stripping beta tool-schema fields, breaking proxy gateways
- Fixed Bash tool false error reports when system temp directory path contains spaces
- Fixed paste input loss when typing immediately after paste
- Fixed Ctrl+D in `/feedback` text input behavior (delete forward vs. exit)
- Fixed API error on 0-byte image file drag-and-drop
- Fixed Claude Desktop OAuth handling: sessions no longer incorrectly use terminal CLI's API key
- Fixed `git-subdir` plugin cache collision across same monorepo subdirectories
- Fixed ordered list number rendering in terminal UI
- Fixed race condition: stale-worktree cleanup could delete agent worktree just resumed from crash
- Fixed input deadlock when opening `/mcp` dialogs during agent execution
- Fixed vim NORMAL mode: Backspace and Delete keys now work
- Fixed vim mode toggle not updating status line
- Fixed hyperlink double-open on Cmd+click in VS Code/Cursor/xterm.js terminals
- Fixed tmux background color rendering (terminal-default)
- Fixed iTerm2 crash when selecting text inside tmux over SSH
- Fixed tmux clipboard copy: toast now indicates `⌘V` vs. tmux `prefix+]` paste method
- Fixed left/right arrow keys accidentally switching tabs in settings/permissions/sandbox dialogs
- Fixed IDE integration auto-connect failure inside tmux/screen
- Fixed CJK character visual bleeding at right-edge clipping
- Fixed teammate panes not closing when leader exits
- Fixed iTerm2 auto mode detection for native split-pane teammates
- Performance: macOS startup ~60ms faster via parallel keychain credential reading
- Performance: `--resume` up to 45% faster and ~100-150MB less peak memory on fork-heavy/large sessions
- Improved Esc key to abort in-flight non-streaming API requests
- Improved `claude plugin validate` to catch skill, agent, command frontmatter, and `hooks/hooks.json` YAML/schema violations
- Background bash tasks now killed at 5GB output threshold to prevent runaway disk fill
- Sessions auto-named from plan content when plan is accepted
- Improved headless mode plugin installation composition with `CLAUDE_CODE_PLUGIN_SEED_DIR`
- Added notice when `apiKeyHelper` exceeds 10s, preventing main-loop blockage
- [VSCode] Improved plan preview tab titles to use plan heading instead of "Claude's Plan"
- [VSCode] Added footer pointer to `macOptionClickForcesSelection` setting when option+click doesn't trigger native selection on macOS
Raw changelog
## 2.1.77
- Increased default maximum output token limits for Claude Opus 4.6 to 64k tokens, and the upper bound for Opus 4.6 and Sonnet 4.6 models to 128k tokens
- Added `allowRead` sandbox filesystem setting to re-allow read access within `denyRead` regions
- `/copy` now accepts an optional index: `/copy N` copies the Nth-latest assistant response
- Fixed "Always Allow" on compound bash commands (e.g. `cd src && npm test`) saving a single rule for the full string instead of per-subcommand, leading to dead rules and repeated permission prompts
- Fixed auto-updater starting overlapping binary downloads when the slash-command overlay repeatedly opened and closed, accumulating tens of gigabytes of memory
- Fixed `--resume` silently truncating recent conversation history due to a race between memory-extraction writes and the main transcript
- Fixed PreToolUse hooks returning `"allow"` bypassing `deny` permission rules, including enterprise managed settings
- Fixed Write tool silently converting line endings when overwriting CRLF files or creating files in CRLF directories
- Fixed memory growth in long-running sessions from progress messages surviving compaction
- Fixed cost and token usage not being tracked when the API falls back to non-streaming mode
- Fixed `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS` not stripping beta tool-schema fields, causing proxy gateways to reject requests
- Fixed Bash tool reporting errors for successful commands when the system temp directory path contains spaces
- Fixed paste being lost when typing immediately after pasting
- Fixed Ctrl+D in `/feedback` text input deleting forward instead of the second press exiting the session
- Fixed API error when dragging a 0-byte image file into the prompt
- Fixed Claude Desktop sessions incorrectly using the terminal CLI's configured API key instead of OAuth
- Fixed `git-subdir` plugins at different subdirectories of the same monorepo commit colliding in the plugin cache
- Fixed ordered list numbers not rendering in terminal UI
- Fixed a race condition where stale-worktree cleanup could delete an agent worktree just resumed from a previous crash
- Fixed input deadlock when opening `/mcp` or similar dialogs while the agent is running
- Fixed Backspace and Delete keys not working in vim NORMAL mode
- Fixed status line not updating when vim mode is toggled on or off
- Fixed hyperlinks opening twice on Cmd+click in VS Code, Cursor, and other xterm.js-based terminals
- Fixed background colors rendering as terminal-default inside tmux with default configuration
- Fixed iTerm2 session crash when selecting text inside tmux over SSH
- Fixed clipboard copy silently failing in tmux sessions; copy toast now indicates whether to paste with `⌘V` or tmux `prefix+]`
- Fixed `←`/`→` accidentally switching tabs in settings, permissions, and sandbox dialogs while navigating lists
- Fixed IDE integration not auto-connecting when Claude Code is launched inside tmux or screen
- Fixed CJK characters visually bleeding into adjacent UI elements when clipped at the right edge
- Fixed teammate panes not closing when the leader exits
- Fixed iTerm2 auto mode not detecting iTerm2 for native split-pane teammates
- Faster startup on macOS (~60ms) by reading keychain credentials in parallel with module loading
- Faster `--resume` on fork-heavy and very large sessions — up to 45% faster loading and ~100-150MB less peak memory
- Improved Esc to abort in-flight non-streaming API requests
- Improved `claude plugin validate` to check skill, agent, and command frontmatter plus `hooks/hooks.json`, catching YAML parse errors and schema violations
- Background bash tasks are now killed if output exceeds 5GB, preventing runaway processes from filling disk
- Sessions are now auto-named from plan content when you accept a plan
- Improved headless mode plugin installation to compose correctly with `CLAUDE_CODE_PLUGIN_SEED_DIR`
- Show a notice when `apiKeyHelper` takes longer than 10s, preventing it from blocking the main loop
- The Agent tool no longer accepts a `resume` parameter — use `SendMessage({to: agentId})` to continue a previously spawned agent
- `SendMessage` now auto-resumes stopped agents in the background instead of returning an error
- Renamed `/fork` to `/branch` (`/fork` still works as an alias)
- [VSCode] Improved plan preview tab titles to use the plan's heading instead of "Claude's Plan"
- [VSCode] When option+click doesn't trigger native selection on macOS, the footer now points to the `macOptionClickForcesSelection` setting