Claude Code v2.1.141: New Environment Variables, Hooks Enhancement, and Bug Fixes

✍️ OpenClawRadar📅 Published: May 14, 2026🔗 Source
Claude Code v2.1.141: New Environment Variables, Hooks Enhancement, and Bug Fixes
Ad

Anthropic shipped Claude Code v2.1.141 with a batch of quality-of-life improvements, new environment variables, and a long list of bug fixes. Here's what's relevant for developers running Claude Code in headless CI, multi-workspace setups, or with custom plugins.

New Environment Variables

CLAUDE_CODE_PLUGIN_PREFER_HTTPS — when set, GitHub plugin sources are cloned over HTTPS instead of SSH. Useful for environments without a configured SSH key.

ANTHROPIC_WORKSPACE_ID — scopes the minted token from workload identity federation to a specific workspace. Required when your federation rule covers multiple workspaces.

Hooks: Desktop Notifications Without a Terminal

Hooks now support a terminalSequence field in JSON output. This lets hooks emit desktop notifications, window title changes, and terminal bell sequences even when no controlling terminal is attached. Useful for long-running background agents in CI or daemon mode.

Agent & Session Improvements

  • New claude agents --cwd <path> flag scopes the session list to a specific directory.
  • Background agents launched via /bg or ←← now preserve the current permission mode instead of resetting to defaults.
  • Agents that finish work but leave a background shell running now appear under Completed, not Working.
  • Feedback (/feedback) can include recent sessions (last 24 hours or 7 days) for multi-session issues.

Rewind Menu: Summarize Up to Here

A new option Summarize up to here lets you compress earlier conversation context while keeping recent turns intact — helpful for long sessions without losing recent context.

Ad

Miscellaneous Changes

  • Spinner now warms to amber after 10 seconds of thinking, so you know Claude hasn't frozen.
  • Plugin menu navigation improved: /Tab cycles tabs, moves to tab strip, headers and search box are clickable in fullscreen.
  • Auto mode permission dialog now explains when a permissions.ask rule triggered it.
  • File-edit permission prompts now show the view diff in your IDE option again when an IDE is connected.

Bug Fixes (Highlights)

  • Fixed background side-queries sending unavailable Haiku model ID on Bedrock/Vertex/Foundry/gateway — now falls back to the main-loop model.
  • Fixed claude daemon status and /doctor on Windows when the daemon pipe key file is locked.
  • Fixed /model changes in one session affecting autocompact threshold in other sessions.
  • Fixed markdown tables with cell wrapping falling back to key-value layout (regression in 2.1.136).
  • Fixed cancelled prompts being dropped from Up-arrow history.
  • Fixed Ctrl+C not interrupting a running turn in vim INSERT/VISUAL mode.
  • Fixed chat:submit keybindings (meta+enter, ctrl+enter) not working when Enter is rebound to chat:newline.
  • Fixed light-ansi theme using invisible white for diff context lines on light backgrounds.
  • Fixed error overlay dumping minified bundle source that hid the original error message.

📖 Read the full source: GitHub Claude-Code

Ad

👀 See Also

Claude Code's Read Tool Silently Downscales Images, Causing Hallucinations
Tools

Claude Code's Read Tool Silently Downscales Images, Causing Hallucinations

Claude Code's `read` tool silently downscales images before the model sees them, leading to degraded output and unrecognized hallucinations when extracting text from screenshots.

OpenClawRadar
Claude skill for Devvit improves code generation accuracy from 73% to 100%
Tools

Claude skill for Devvit improves code generation accuracy from 73% to 100%

A developer created a structured SKILL.md prompt layer for Claude that provides context for Reddit's Devvit platform, improving evaluation results from 7/10 to 10/10 on common Devvit tasks by preventing specific runtime bugs.

OpenClawRadar
ThumbGate Implements Tsinghua's Natural-Language Agent Harness Pattern for AI Safety
Tools

ThumbGate Implements Tsinghua's Natural-Language Agent Harness Pattern for AI Safety

The open-source tool ThumbGate implements the Natural-Language Agent Harness pattern from Tsinghua's NLAH paper, mapping four components: contracts to prevention rules from thumbs-down feedback, verification gates to PreToolUse hooks, durable state to SQLite+FTS5 lesson database, and adapters to MCP server adapters for multiple AI coding agents.

OpenClawRadar
Agent Factory: Autonomous System Builds AI Agents from Online Problem Discussions
Tools

Agent Factory: Autonomous System Builds AI Agents from Online Problem Discussions

Agent Factory is an autonomous system that scrapes Reddit, HN, GitHub, and Twitter for real problems, scores them on demand, market gap, and feasibility, then builds standalone AI agents for promising ideas. The system uses a minimal Next.js template with 7 tools and runs Claude Code headless via a shell script.

OpenClawRadar