Skip to content

fix(prompts): break rate-limit recovery feedback loop - #20

Merged
araa47 merged 3 commits into
mainfrom
fix/rate-limit-recovery-feedback-loop
Apr 1, 2026
Merged

fix(prompts): break rate-limit recovery feedback loop#20
araa47 merged 3 commits into
mainfrom
fix/rate-limit-recovery-feedback-loop

Conversation

@araa47

@araa47 araa47 commented Apr 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • When a worker hits a rate limit, the daemon escalates to the orchestrator (e.g. OpenClaw). OpenClaw sends a recovery message like "The rate limit has cleared" into the worker's pane. The daemon then re-detects "rate limit" in that recovery text and escalates again, creating a feedback loop every 60s.
  • Skip rate_limit complex-blocker matches when recovery language ("cleared", "resolved", "lifted") is also present in the pane output.
  • Bump version to 0.0.10.

Test plan

  • New tests: rate_limit_cleared_is_not_blocker, rate_limit_resolved_is_not_blocker
  • Existing detects_rate_limit test still passes (real rate limits still detected)
  • cargo fmt --check, cargo clippy -- -D warnings, cargo test all pass

🤖 Generated with Claude Code

araa47 and others added 2 commits April 1, 2026 13:12
When a worker hits a rate limit, the daemon escalates to the
orchestrator (e.g. OpenClaw). OpenClaw then sends a recovery message
like "The rate limit has cleared" into the worker's pane. On the next
poll cycle the daemon re-captures the pane, sees "rate limit" in the
recovery text, and escalates again — creating an infinite loop every
60s (ESCALATION_COOLDOWN).

Skip rate_limit complex-blocker matches when recovery language
("cleared", "resolved", "lifted") is also present in the pane output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Apr 1, 2026

Copy link
Copy Markdown

🧪 Coverage Report

Metric Coverage
Lines 85.77% (15795 lines, 2247 missed)
Functions 94.86%
Regions 85.88%
📄 Coverage by file
File Lines Functions Regions
cli.rs 89.52% 98.05% 90.87%
cli/mod.rs 77.96% 85.14% 77.51%
config.rs 94.94% 95.71% 94.35%
config/mod.rs 90.57% 90.00% 87.10%
daemon.rs 80.05% 92.47% 81.36%
daemon/mod.rs 42.15% 77.11% 39.99%
events.rs 99.44% 100.00% 97.63%
events/mod.rs 98.72% 100.00% 92.86%
main.rs 100.00% 100.00% 100.00%
names.rs 100.00% 100.00% 100.00%
names/mod.rs 100.00% 100.00% 100.00%
prompts.rs 100.00% 100.00% 100.00%
prompts/mod.rs 100.00% 100.00% 100.00%
spawn.rs 93.08% 96.43% 92.57%
spawn/mod.rs 90.15% 93.55% 87.94%
state.rs 98.09% 93.33% 96.13%
state/mod.rs 95.32% 87.23% 87.77%
tmux.rs 97.53% 100.00% 96.69%
tmux/mod.rs 91.89% 99.15% 90.89%
types/mod.rs 96.50% 93.02% 96.73%
wake.rs 98.60% 100.00% 98.93%
wake/mod.rs 95.08% 100.00% 95.67%
worktree.rs 95.25% 100.00% 95.61%
worktree/mod.rs 84.76% 100.00% 83.91%

Coverage must not decrease. See CONTRIBUTING.md for policy.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@araa47
araa47 merged commit 4ef7ba0 into main Apr 1, 2026
3 checks passed
@araa47
araa47 deleted the fix/rate-limit-recovery-feedback-loop branch April 1, 2026 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant