claw-code/rust/crates/api/src
Yeachan-Heo b930895736 Turn oversized-context failures into recovery guidance
Dogfood showed oversized requests still surfacing as raw hard errors, even when claw could tell the user exactly how to recover. This keeps context-window failures classified, recognizes the same failure when it comes back from a provider response, and renders recovery steps that point operators at the existing compaction and fresh-session paths instead of a provider-style dump.

Constraint: Keep the failure class explicit so automation and operators can still distinguish context-window exhaustion from generic provider failures
Constraint: Reuse existing /compact and session-reset UX instead of inventing a new recovery workflow
Rejected: Auto-run compaction on failure | mutates session state on an error path the user may want to inspect first
Rejected: Only prettify local preflight failures | provider-returned context-window errors would still leak raw failure text
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep provider-side context-window detection aligned with real oversized-request messages before broadening the marker list
Tested: cargo fmt --all --check
Tested: cargo test -p api
Tested: cargo test -p rusty-claude-cli
Tested: cargo clippy -p api -p rusty-claude-cli --all-targets -- -D warnings
Not-tested: cargo test --workspace
2026-04-06 06:43:31 +00:00
..
providers Expose actionable ids for opaque provider failures 2026-04-06 00:30:28 +00:00
client.rs chore: additional AI slop cleanup and enforcer wiring from sessions 1/5 2026-04-03 18:35:27 +09:00
error.rs Turn oversized-context failures into recovery guidance 2026-04-06 06:43:31 +00:00
lib.rs fix: restore anthropic request profile integration 2026-04-02 11:31:53 +09:00
prompt_cache.rs fix: cover merged prompt cache behavior 2026-04-02 11:31:53 +09:00
sse.rs Accept reasoning-style content blocks in the Rust API parser 2026-04-01 08:06:10 +00:00
types.rs Merge remote-tracking branch 'origin/rcc/telemetry' into integration/dori-cleanroom 2026-04-02 11:13:56 +09:00