A runner is a machine that carries out Claude Code sessions for another program, such as an orchestrator that watches the runner's output. Normally a session first writes an init message, which announces that it has started. When it writes its output straight to standard output with no bridge connection, Claude Code now covers the case where a turn begins before that init message:
- It writes a system message of type
turn_began_before_init. - If
CLAUDE_RUNNER_ALIVE_EVERY_MSis set, it also writesalive_before_initheartbeat lines at that interval, in milliseconds.
The system message is always written in this case. The heartbeat lines appear only when the variable is set.
An orchestrator that judges whether a runner is alive by watching its output can now tell that the runner is still working while the init message is delayed, instead of treating the silence as a hang.