Follow Discord
Sweep 27 Oct 2026 · 19:04Z Build v2.1.312 531 read Stable v2.1.308 Latest v2.1.312 Next v2.1.312 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.311 ·

Print mode waits quietly on background shells instead of polling every 100ms

In print mode, waiting on background shells now sleeps until something changes instead of checking every 100ms, with a new env var to restore polling

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

What

In print mode (-p), Claude Code answers once and exits, but it may first wait for background work to finish. The way it waits after a turn has been reworked:

  • Quiet wait: when the only background work still running is shell commands (local_bash) and nothing else is pending, Claude Code now sleeps until something changes. It wakes when the message queue, its internal state or the session state changes. Before, it checked every 100 milliseconds.
  • CLAUDE_CODE_DISABLE_QUIET_BACKGROUND_WAIT: a new environment variable (a named value you set in your shell before starting a program). Setting it restores the old 100ms checking.
  • Wait ceiling: the stop path for the maximum wait still reads the tengu_print_ceiling_stop_agents flag (fallback true), and tengu_giggly_dragonfly still has fallback true. Nothing has been read about either flag. Its message still says that setting CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS=0 makes Claude Code wait indefinitely. The keep-alive logic around these flags was reworked to fit the new wait.

Why

Headless runs that sit waiting on background shells should wake up the computer less often while idle. If the new waiting causes trouble, the environment variable switches back to the old behaviour.

See this entry in the whole of v2.1.311 →

Feedback