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 sinceAnthropic'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-inchangelogsee 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.