Boolean indirection (const stateOnly = ...; if (stateOnly)) didn't carry the narrowing to body.state inside the branch. Inline the check so TypeScript narrows correctly and the explicit cast on pendingState becomes unnecessary. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>