# Claw Code Parity Plan (Rewritten) ## Scope - Align AX Copilot with claw-code quality for loop reliability, permission/hook behavior, and session durability. ## Preserved History (Summary) - Core loop guards and post-tool verification gates are already partially implemented. - Plan Mode, parallel tool execution, and unknown-tool recovery are in place. - Session restore hardening is ongoing. ## Execution Tracks 1. Hook contract parity - Structured hook output support (`updatedInput`, `updatedPermissions`, `additionalContext`). - Runtime gating through settings toggles. 2. Session/state parity - Deterministic run resume rules. - Stable jsonl event schema + replay compatibility. 3. Recovery parity - Failure-type classification and standardized retry guidance. - Reduced repeated wrong-tool loops. 4. Completion parity - Evidence-based finalization criteria for code/document tasks. ## Done Criteria - Internal parity scenarios pass target threshold. - Resume/replay failures: zero. - `dotnet build` warnings/errors: zero.