Under the hood
Failed org/policy validation during headless startup now gets logged with a reason
**What
When Claude Code runs in headless mode (--print) and account or organization policy validation fails, it now records a report before erroring out. If the policy couldn't be read (policyUnreadable), a policy_invalid event is reported. In the final force-login-org check, a failure now also logs the session ID, message, and reason, and runs an additional cleanup step.
**Why
This gives better visibility into why a headless session was blocked by organization policy, making these failures easier to diagnose instead of just failing silently.