Claude Code

Claude Code 2.1.273: the context meter was counting twice

3 min read AI-generated

In bypass mode a subshell could hide an rm that the permission checker never saw. One change from 2.1.268 has been rolled back.

Featured image for "Claude Code 2.1.273: the context meter was counting twice"

After 2.1.271 and the silent 2.1.272, 2.1.273 landed last night, and the list is long again. Almost nothing in it is a new feature. What it does contain is a set of bugs you only notice once you know what to look for.

The context meter was counting twice

Turns that ran an advisor tool were booked into the context meter at roughly double their real size. The effect: auto-compact fired at about half the actual window. If you have wondered why a session gets summarized so early, that is the answer.

A second find fits the same pattern. /login, /upgrade and /extra-usage were throwing away earlier thinking from the conversation, which forced the next request to rebuild the entire prompt cache. Expensive and invisible at the same time.

Three holes in the permission checker

Under permissions.blockReadsOutsideWorkingDirectories, Bash commands the checker cannot fully analyze slipped past the prompt. And in bypass mode, a subshell could hide a dangerous rm. Both are fixed.

The third hole sits in memory. A memory directory chosen by a repository’s settings is no longer loaded under that same option, no longer put into the prompt, no longer indexed, and no longer used for memory extraction. Until now the option restricted reads while memory read straight past it.

Going the other way, a change from 2.1.268 has been reverted. It applied Read and Edit deny rules to Bash lines the checker cannot analyze, things like eval and env -C. Commands such as time -p make build ended up denied instead of prompted. They prompt again.

What this changes for admins

allowManagedMcpServersOnly, deniedMcpServers and disableClaudeAiConnectors were ignored whenever server-managed settings were present alongside MDM or managed-settings.json. Skills synced from claude.ai stayed usable after an organization turned Skills off; they now move to the recoverable trash.

Several error messages were rewritten, and exactly where they used to mislead. A 401 or 403 on Bedrock, Vertex and Foundry told you to run /login, which does nothing there. The message now names the credential to refresh or points at your gateway administrator. /install-github-app reported a SAML block as missing admin permissions.

The gateway headers are genuinely new. Set CLAUDE_CODE_GATEWAY_HINT_HEADERS=1 and Claude Code sends five extra headers: request class, agent type, previous tool durations, compaction state. Meant for LLM gateways that want to route on them. Off by default.

Remote control, artifacts, speed

A session started with claude --remote-control or /remote-control can now be forked from the Claude app. The fork keeps running as a background session on your machine.

When publishing artifacts, a connection that drops after reaching claude.ai is re-sent safely instead of failing or creating a duplicate version. Database writes can remove a single field rather than rewriting the whole document.

Long sessions also got faster: hook progress and sub-agent activity no longer re-process the entire conversation on every update.

The work here sits at the edges

Search this release for new things and you find three: gateway headers, forks from the app, an MCP notification when reconnection finally gives up. Everything else is a fix, and a striking number of them land in the places where Claude Code works while nobody is watching. Sub-agents whose result never arrived because the final reply carried no token usage. Background sessions that stopped watching the artifacts they had published. Scheduled tasks running in the wrong session after somebody copied .claude/scheduled_tasks.json into another folder.

That is the class of bug nobody reports, because nobody notices it. Having this many of them in one release says more about the past few weeks than any feature would.

Sources:

Claude CodeReleaseSecurityAuto Mode