Ports the rate-limit half of main's #8358 into the branch's reworked XAi extension: a prompt_complete carrying stopReason rate_limit now fails the hung prompt with the -32003 usage-limit error instead of settling it as a normal end_turn, so the turn surfaces "usage limit reached" rather than silently ending. The prompt-completion deferreds carry the error channel end to end. The exit_plan_mode approval gate from #8358 is NOT ported here: it needs a v2 plan-flow design in AcpAdapterV2 (the v1 GrokAdapter it lived in is gone) and is tracked separately. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Julius Marminge committed on 9/5/2026, 4:54:26 AMparent8622f36
2 files changedLine totals unavailable