ZeroClaw

ZeroClaw finds two recovery layers fighting over context overflow

ZeroClaw reports wrapper-level truncation can conceal loop-level context-overflow recovery, while cron history and configuration writes still contain check-then-act or validation gaps.

← Back to homeOriginal source ↗

zeroclaw-labs/zeroclaw issue #10329 is the inspected primary source: “Resilient wrapper truncation shadows loop-level context overflow recovery for OpenAI-compatible providers.” The related records below were inspected as supporting context rather than independent confirmation.

The facts

- zeroclaw-labs/zeroclaw issue #10329 was created 2026-08-25T00:26:25Z and was open at inspection; its title is “Resilient wrapper truncation shadows loop-level context overflow recovery for OpenAI-compatible providers.” - zeroclaw-labs/zeroclaw issue #10324 was created 2026-08-24T17:45:23Z and was open at inspection; its title is “[Bug]: cron manual trigger and run-history reads remain check-then-act across an agent rename.” - zeroclaw-labs/zeroclaw issue #10320 was created 2026-08-24T10:45:47Z and was open at inspection; its title is “[Bug]: config set and RPC config/set persist values without running validation.” - The repository reported 32647 stars, 786 open issues, default branch master, and last push 2026-08-24T22:07:26Z. - The latest tagged-release baseline checked was v0.8.4 published 2026-08-02T21:00:00Z.

What changed

zeroclaw-labs/zeroclaw issue #10329 reports: Summary On current master, the loop-level context-overflow recovery paths never engage for OpenAI-compatible providers, so the recovery trim events (and the client recovery wording) cannot be reached end to end through the real provider stack. Behavior 1. A context-overflow error from an OpenAI-compatible provider reaches the resilient wrapper (zeroclaw-providers/src/reliable.rs). The wrapper truncates history once (truncate_for_context) and retries transparently. 2. If the truncated retry still overflows, the wrapper fails with an aggregate error: "Request exceeds model context window and cannot be reduced without breaking message/tool pairing...". 3. Both recovery sites gate on zeroclaw_providers::reliable::is_context_window_exceeded(&e), which matches hint phrases such as "exceeds the context window", "maximum context length", or "context length exceeded" against e.to_string(). The aggregate error text contains none of them, so neither the tool-loop recovery (try_recover_context_overflow) nor the interactive-loop recovery runs. 4. Net effect: the transparent wrapper truncation happens with no HistoryTrimmed event, and the event-emitting recovery path (reason history-trim-reason-recovery) is unreachable for this provider shape. Clients never render recovery wording from real traffic. Reproduction shape Local OpenAI-compatible mock returns 400 with "maximum context length is 8192 tokens" whenever the request exceeds a token threshold. Two-turn history where dropping the oldest turn still leaves the newest turn plus system prompt over the threshold. Observed trace: Context window exceeded; truncated history and retrying followed by Agent turn failed with the aggregate

zeroclaw-labs/zeroclaw issue #10324 reports: Affected component runtime/daemon Severity S2 - degraded behavior Filed at S2 rather than S0 deliberately. The consequence class is the same cross-agent boundary as #9947, but reaching it needs an operator rename to land inside a narrow window, and agents cannot rename jobs. Maintainers should re-rate if they read the class rather than the likelihood as decisive. Current behavior Agent-scoped cron **manual trigger** and **run-history read** authorize with a scoped read followed by an unscoped operation. An operator rename landing between the two lets the former owner trigger a job, or read its past output, after ownership has moved. crates/zeroclaw-runtime/src/tools/cron_run.rs — manual trigger: scoped lookup, then the run proceeds unscoped. crates/zeroclaw-runtime/src/tools/cron_runs.rs — run history: scoped lookup, then the history read proceeds unscoped. This is the residual slice of #9947 that neither #9948 nor #10177 closes. #9948 added the scoped read; #10177 moves the ownership predicate into the write for remove, cancel, update, pause and resume, and states explicitly that trigger and history stay out of its scope. Both PRs refer to this follow-up as "not yet filed" — this is that issue. Expected behavior The ownership predicate should live in the operation, not in a preceding read, so a rename cannot separate the check from the effect. Operator, RPC and scheduler callers should keep using the unscoped helpers, as they

zeroclaw-labs/zeroclaw issue #10320 reports: Two config write surfaces skip Config::validate() entirely, so any range-checked key can be persisted out of range with exit 0: CLI zeroclaw config set — set_prop_persistent then save_dirty() with no validation (src/main.rs:6077,:6191) RPC config/set — same gap (crates/zeroclaw-runtime/src/rpc/dispatch.rs:2871) Reproduced during review of the pairing-code policy work: config set gateway.pairing_code.length 5 persists and exits 0, below the validated minimum of 6. The gap is not pairing-specific — it affects every validated field (e.g. gateway.websocket_ping_interval_secs) and predates that PR. For contrast, the validating write boundaries that already exist: config patch validates before saving (src/main.rs:6652) gateway PUT/PATCH /api/config validates via scoped_validate (crates/zeroclaw-gateway/src/api_config.rs:348) A sibling instance of the same theme: zeroclaw config migrate --json computes valid from migrate_to_current, which only deserializes and never calls Config::validate() (crates/zeroclaw-config/src/migration.rs:221, src/main.rs:~6291), so the same persisted-invalid config reports valid: true. Proposed fix: route validation (full or scoped, matching the patch boundary's approach) into config set and RPC config/set, and make migrate --json's valid honest. Note the blast radius: this changes acceptance behavior for every validated key on those surfaces, so it needs its own review rather than riding a feature PR. Daemon load-time behavior (log-and-boot) is deliberate anti-lockout design and out of scope here.

Why it matters

Layered recovery becomes a liability when the inner wrapper hides the signal the outer loop needs to make a correct retry decision. The operator test is whether the system remains bounded and its receipts still describe the action after failure, retry or restart.

Current

The primary record was open when captured on 2026-08-25. The tagged-release baseline was v0.8.4 published 2026-08-02T21:00:00Z. Repository metadata, full source bodies, current pull requests and issues, releases, Google News, Hacker News, Lobsters, Metamesh and the rendered ClawCharts row were inspected. ClawCharts selected the subject; it did not prove the claim.

Evidence

The primary URL is https://github.com/zeroclaw-labs/zeroclaw/issues/10329. Supporting records are https://github.com/zeroclaw-labs/zeroclaw/issues/10324 and https://github.com/zeroclaw-labs/zeroclaw/issues/10320. Source bodies, timestamps and states are preserved in the daily evidence bundle. Test counts and reproductions remain attributed to their authors unless identified as independently rerun.

Source boundary

Open work is described as open, closed work as closed, and operator reports as reports. A pull request is evidence of proposed or reviewed direction, not proof of a shipped release. Search residue, package mirrors and historically published source spines were excluded.

Operator take

Choose one owner for context recovery, make cron reads rename-safe, and run the same configuration validation before every persistence path. Preserve a before-state receipt, make the smallest reversible change, and verify the original failure independently.

Caveat

Public project records are mutable. Status, scope and evidence can change after publication. This brief records the inspected state and does not authorize changes to a reader’s deployment.

Source inspected; source state, environment and release boundary remain explicit.