Anthropic: Claude Code v2.1.141 adds terminalSequence hook, Bedrock Haiku fix, and Summarize up to here rewind option
Claude Code v2.1.141 is the new Anthropic CLI agent release published on May 13, 2026. The third patch version this week adds a terminalSequence field for hook JSON output, the CLAUDE_CODE_PLUGIN_PREFER_HTTPS and ANTHROPIC_WORKSPACE_ID environment variables, claude agents --cwd path scoping, and a new Rewind menu option Summarize up to here for compressing old context. It fixes a Bedrock/Vertex Haiku model ID race and daemon status on Windows.
This article was generated using artificial intelligence from primary sources.
Anthropic released Claude Code v2.1.141 on May 13, 2026 — the third patch version this week after v2.1.139 (May 11) and v2.1.140 (May 12). The release brings new environment variables, hook capabilities, Bedrock/Vertex compatibility fixes, and two new UI options.
What are the new environment variables in v2.1.141?
The version introduces two environment variables for advanced deployment scenarios:
CLAUDE_CODE_PLUGIN_PREFER_HTTPS— enables HTTPS GitHub plugin cloning instead of the default SSH, useful for enterprise networks with firewall restrictionsANTHROPIC_WORKSPACE_ID— used for workload identity federation scoping, critical for multi-team enterprise installations where different workspaces have separate quotas and credentials
Additionally, claude agents --cwd <path> allows scoping the session list to specific directories — useful for developers working across multiple repositories in parallel.
What does the terminalSequence hook field solve?
Hook JSON output can now contain a terminalSequence field. The field sends desktop notifications and controls window titles without directly managing the terminal, which matters for long-running tasks operating in the background while the user works in other applications. The user receives an alert when the agent completes a task or needs confirmation.
What does Summarize up to here offer in the Rewind menu?
The Rewind menu gains a new Summarize up to here option. It compresses the entire early session context into a summary — useful for long sessions where early turns are no longer relevant but consume prompt cache space. Background agents (/bg or ←←) now preserve the current permission mode, preventing a regression that in v2.1.140 caused unexpected permission prompts.
What bug fixes does it bring?
The most important fix: background side-queries no longer send unavailable Haiku model IDs to Bedrock, Vertex, or Foundry — a critical fix for enterprise users on non-Anthropic API providers. Other fixes: claude daemon status and /doctor errors on Windows, markdown tables with wrapped cells (vertical layout fallback bug), chat:submit keybinding conflicts, Ctrl+C interrupt in vim INSERT/VISUAL mode, light-ansi theme visibility in diff views, VSCode microphone feedback on silent audio detections, and WSL voice mode error messages.
Eight distribution packages are available: macOS (ARM64/x64), Linux (ARM64/x64, glibc and musl variants), Windows (ARM64/x64).
Frequently Asked Questions
- What does the terminalSequence hook field enable?
- Hook JSON output can now contain a terminalSequence field that sends desktop notifications and controls window titles without directly managing the terminal — useful for long-running background tasks when the user is working in other applications.
- How does Summarize up to here change the Rewind menu?
- The new Rewind menu option compresses the entire early session context into a summary — useful for long sessions where early turns are no longer relevant but still consume prompt cache space.
Related news
arXiv:2605.22502: Compiling agentic workflows into LLM weights achieves near-frontier quality at 100× lower cost
arXiv:2605.22794: MOSS shows agents that self-improve by rewriting their own source code
arXiv:2605.22535: TerminalWorld benchmark measures LLM agents on real Linux terminal tasks without simulation