Headless and SDK turns now wait on a pre-turn check that currently always says go ahead.
A veto point before every turn exists with only one participant registered, the directory-sync pull, which always answers ready, so nothing can refuse a turn.
What's wrong with this entry?
Headless and SDK sessions gained a check that runs before every turn: registered participants are asked whether the turn may start, and a refusal ends the session with "This session cannot continue: a required step before the turn did not complete." Only one participant is ever registered, the directory-sync pull, and it always answers ready, so no code in this build can actually refuse a turn.
- The participant is registered only when the directory-sync worker starts, which needs an SDK URL and
CLAUDE_CODE_REMOTE_SESSION_ID, with neitherCLAUDE_CODE_DISABLE_DIR_SYNCnorCLAUDE_CODE_DISABLE_WORKING_SYNCset. In that case turns genuinely wait for the sync pull to finish before starting. - The refusal machinery is complete but unreachable: nothing in the bundle returns a failure answer, so the failure-collection branch, the after-abort logging and the fallback wording for a refusal with no reason all sit unused.
This session cannot continue: a required step before the turn did not complete.
Strings lifted out of the shipped bundle, so the claim above can be checked against them.