Headless runs log which turn loop they're using, making non-interactive problems easier to diagnose.
What's wrong with this entry?
On starting a print/headless run, Claude Code now writes a debug line naming which of its two turn loops is active, which makes headless behaviour easier to triage.
- Selected by the environment variable
CLAUDE_CODE_PRINT_ENGINE_LOOP; the accessor returns its value when set and false otherwise, so the legacy per-turn path is the default.
[print] turns run on the engine session (createHeadlessSession)
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
Related
Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.
-
v2.1.219
Headless text output recovers the last full assistant message on an incomplete run
Both mention headless mode
-
v2.1.227
Headless mode reports fatal errors instead of dying quietly
Both mention headless mode
-
v2.1.248
Headless loop guards against missing stream event fields
Both mention headless mode