In headless runs (Claude Code running without its interactive screen, driven by another program), some startup tasks are now held back. One example is sending the tengu_init telemetry event, a usage report. The held tasks are released at the first of these:
- The host program finishes initializing.
- The first turn starts.
- Input closes.
- A fallback timeout fires.
When they are released at host initialization, the held tasks run one at a time and step aside if a turn starts. Setting the environment variable CLAUDE_CODE_DISABLE_STARTUP_WORK_GATE turns the holding off.
Background startup work no longer competes with the program starting up the session or with its first turn. You can restore the old behavior with the environment variable if you need to.