Claude Code 2.1.326 adds Code Mode for agent teams and OTEL host attributes
Claude Code 2.1.326 enables Code Mode for active agent teams, adds OTEL_RESOURCE_INCLUDE_HOST support, and fixes stability issues in settings, hooks, and session management.
Claude Code version 2.1.326 introduces Code Mode support for agent teams and adds a new OpenTelemetry environment variable. The release also addresses multiple stability issues related to settings parsing, API retries, and session recovery.
Support for enabling Code Mode while agent teams are active has been added, causing existing team sessions to start in Code Mode. A new environment variable, OTEL_RESOURCE_INCLUDE_HOST, allows including host.name and host.id in OpenTelemetry resource attributes, disabled by default. Settings files with values nested deeper than 64 levels are now dropped with a warning to prevent crashes or inconsistent application.
The tool now retries API requests with the maximum tokens reported by the Anthropic API when max_tokens exceeds the model limit. Image-heavy sessions on Vertex AI now compact and retry instead of failing with a 400 error when request size exceeds the 30 MB limit. Crashed Node or Python hooks now display up to 10,000 characters of output when triggered by Ctrl+O, rather than just the first line.
Background sessions now stop before any model request if the LLM gateway exported by the shell is missing after a crash or reopen. The /rewind command now displays 'Code changes unknown' for turns where shell commands changed files that cannot be restored. Managed settings with specific key names no longer prevent Claude Code from starting or affect other managed files.
- The spend limit menu no longer removes the monthly limit without confirmation when Backspace and Enter are pressed during opening.
- Sandboxed commands on Linux no longer fail to start when the home or config directory is accessed via a symlink into
/net. - The
/logincommand now indicates when requests still use an approvedANTHROPIC_API_KEYeven after a successful subscription login. - Resumed sessions no longer lose recent turns or earlier history after a crash or when running low on memory.
- The
/privacy-settingstoggle no longer saves the opposite of the displayed state on quick double presses or changes settings on keys pressed after Esc.