mirror of
https://github.com/instructkr/claw-code.git
synced 2026-04-07 08:34:49 +08:00
The CLI already reframes direct preflight and provider oversized-request errors, but retry-wrapped provider failures still fell back to the generic retry-exhausted surface because the user-visible formatter keyed off the safe failure class. Route formatting through nested context-window detection so wrapped provider failures keep the same compact/reduce-scope guidance. Constraint: Keep the fix UX-scoped without widening broader failure classification behavior Rejected: Reorder safe_failure_class for all RetriesExhausted errors | broader semantic change than needed for this issue Confidence: high Scope-risk: narrow Directive: Keep context-window rendering keyed to nested error inspection so provider wrappers do not lose recovery guidance Tested: cargo fmt --check; cargo test -p rusty-claude-cli context_window; cargo test -p api oversized Not-tested: Full workspace test suite