Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.305 ·

claude -p keeps waiting for background shells a built-in plugin holds

A built-in plugin can now make claude -p wait for a background shell before it exits

You'll notice Improvements
JSON All of v2.1.305
You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
Headless ModeArea: what it touches
ImprovementsKind: in v2.1.305,
ImprovementsSection of the release

Unclear It is not stated whether any built-in plugin holds background shells.

What

claude -p runs Claude Code once without the interactive screen and then exits. A background shell is a command left running while Claude carries on. Built-in plugins can now hold a background shell, and while one does, claude -p keeps waiting for that shell instead of exiting.

If a plugin fails while being asked about a shell, Claude Code reports the error once and keeps waiting.

Why

This changes when headless runs finish, but only where a built-in plugin holds a shell.

Read from
Names in the bundleclaude -p
Since it was published

The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.

Confirmed since Anthropic's documentation has since written up claude -p, on Claude Code changelog. * Fixed MCP servers showing "needs authentication" in `claude -p` on macOS while the login keychain was locked; they now say why, and the next run after an unlock connects without a new sign-in changelog see the edit
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtIt is not stated whether any built-in plugin holds background shells.
Anthropic's documentation agreesAnthropic's documentation has since written up claude -p, on Claude Code changelog.

See this entry in the whole of v2.1.305 →

Feedback