Skip to content

Peering Inside Subagents, and Cache Costs Split by "5 Minutes or 1 Hour"──Claude Code v2.1.300 Takes Observability for Unattended Operation One Step Further

Claude Code v2.1.300 is out. It logs cache writes split by 5-minute/1-hour lifetime, adds a window into subagent logs and a spawn-time rewrite hook. A developer's-eye look at an update that advances observability for unattended, multi-agent operation one more step.

Peering Inside Subagents, and Cache Costs Split by "5 Minutes or 1 Hour"──Claude Code v2.1.300 Takes Observability for Unattended Operation One Step Further

The latest release of Claude Code, v2.1.300, is out. There's no flashy headline feature here. What's inside is a modest but coherent update that pushes unattended operation and multi-agent concurrency toward a state where you can measure, peek into, and govern what's happening. Following v2.1.299 the day before, which added idle-time cache compaction, this release again lines up changes that firm up the operational backstage. Let's break down where it matters from a developer's point of view.

Logging Cache Writes Split by "Lifetime"

The centerpiece on the observability side is the addition of cache_creation_5m_tokens and cache_creation_1h_tokens to the OpenTelemetry api_request event. The cache-write token counts that were previously lumped together are now recorded separately by cache lifetime (5 minutes / 1 hour).

Where this pays off is in the cost breakdown. Claude's prompt caching uses different write pricing coefficients for the 5-minute and 1-hour variants. Before, you could only see "how much you spent creating caches," but with this split you can now trace after the fact "whether you're paying for short-lived or long-lived caches." The more you keep things running unattended, the more this breakdown matters.

Along with that, trace spans now carry standard GenAI attributes (gen_ai.provider.name, gen_ai.conversation.id, gen_ai.tool.name, error.type, and so on). By aligning with the industry-standard conventions, it becomes easier to drop the data straight into existing OpenTelemetry dashboards. This is an extension of the recent trend of measuring and trimming API costs one move at a time, rather than cutting by gut feel.

Peering at What Concurrent "Child Agents" Are Doing

The big one on the operations side is making subagents transparent. This update brings two things:

  • Showing subagent logs on the main screen: calling $.ui.view({ agentId }) from a mod displays the transcript (work log) of the specified agent on the main screen. $.ui.view({}) returns you to the original view.
  • Rewriting workflow agents at spawn time: the agent.spawn mod hook can now rewrite the prompt and model of the workflow agent being spawned. Until now, that same hook could only "refuse to spawn."

When you run several agents concurrently, the pain point was that it was hard to see which child was doing what. $.ui.view becomes a window into their work, and the agent.spawn hook becomes a single point to inject "which model to use" and "what to add to the instructions" each time one spawns. In the sense that an administrator can enforce policy through code, it's a tool for governance.

That said, this power cuts both ways. A mod that came in via managed settings can also quietly swap out the instructions and model passed to a subagent. The hook for governance is simultaneously a new point of intervention──when you hand operation over to someone else, this dual nature is worth keeping in mind. This isn't meant to be alarmist; it's better understood as a checklist item for permission design.

Groundwork for Extension Mods, and the Opt-In /advisor

The mod system──the mechanism for extensions that rewrite the core──also got some fine-grained attention.

  • virtualText: guide text that appears in the prompt field but mixes into neither the draft nor the submitted content. You can show helper text without polluting the input.
  • Right-to-left language support: a dir property was added to the mod Text, aligning lines so they read right-to-left in Windows and VS Code terminals.
  • prompt.change hook: fires when the text in the prompt field changes by means other than manual typing──recalling history, clearing, undoing, injection by a plugin, and so on.

The Claude Platform on AWS gained /advisor. By default no advisor runs; it's enabled only when you explicitly select one via /advisor, advisorModel, or --advisor. You can also disable it with CLAUDE_CODE_DISABLE_ADVISOR_TOOL=1. It's an "opt-in" design that doesn't start running silently──an addition that fits well with unattended operation where you want to keep permissions tight.

Small Updates, a Clear Direction

On its own, v2.1.300 is small. But the direction is consistent. Make costs measurable right down to cache lifetime, make concurrent agents' work peekable, and make extensions and approvals governable on an opt-in basis. The more you run operations without a person watching over them, the more this accumulation of "measurable, peekable, governable" pays off. At a pace of nearly one version a day, the backstage of unattended, multi-agent operation is being steadily firmed up──that's where things stand now.

References: Claude Code Changelog (official) / Gradually: Claude Code Changelog / Releasebot: Claude Code Updates