diff --git a/.huskies/work/1_backlog/491_story_watcher_fires_on_crdt_state_transitions_instead_of_filesystem_events.md b/.huskies/work/1_backlog/491_story_watcher_fires_on_crdt_state_transitions_instead_of_filesystem_events.md deleted file mode 100644 index 74e7afd5..00000000 --- a/.huskies/work/1_backlog/491_story_watcher_fires_on_crdt_state_transitions_instead_of_filesystem_events.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -name: "Watcher fires on CRDT state transitions instead of filesystem events" -agent: coder-opus -depends_on: [490] ---- - -# Story 491: Watcher fires on CRDT state transitions instead of filesystem events - -## User Story - -As a developer, I want the auto-assign loop, notifications, and WebSocket UI updates to subscribe to CRDT state transitions instead of filesystem directory watches. - -## Acceptance Criteria - -- [ ] Auto-assign triggers on CRDT state change (story entering a stage) instead of filesystem watcher -- [ ] Stage transition notifications fire from CRDT state changes -- [ ] WebSocket UI updates fire from CRDT state changes -- [ ] The filesystem watcher for .huskies/work/ is removed or deprecated -- [ ] Timer tick loop and dependency tick loop read from CRDT state -- [ ] agent: coder-opus -- [ ] depends_on: [490] - -## Out of Scope - -- TBD diff --git a/.huskies/work/5_done/496_bug_hard_rate_limit_without_reset_at_never_auto_schedules_retry.md b/.huskies/work/5_done/496_bug_hard_rate_limit_without_reset_at_never_auto_schedules_retry.md new file mode 100644 index 00000000..553d6309 --- /dev/null +++ b/.huskies/work/5_done/496_bug_hard_rate_limit_without_reset_at_never_auto_schedules_retry.md @@ -0,0 +1,34 @@ +--- +name: "Hard rate limit without reset_at never auto-schedules retry" +--- + +# Bug 496: Hard rate limit without reset_at never auto-schedules retry + +## Description + +When the API returns a hard rate limit block (`status=rejected`) without a `reset_at` timestamp, `pty.rs` downgrades it to a `RateLimitWarning` instead of a `RateLimitHardBlock`. The auto-scheduler only listens for `RateLimitHardBlock` events, so no timer is set and the agent is never restarted. The agent sits idle until the 300s inactivity timeout kills it, and the story is stuck. + +In practice, most hard blocks come without `reset_at` (as seen in the logs: "no reset_at in rate_limit_info"). This means the auto-resume feature from story 423 almost never fires. + +Fix: when there's a hard block without `reset_at`, either: +1. Send `RateLimitHardBlock` with a default backoff time (e.g. `Utc::now() + 5 minutes`) +2. Or add a separate retry mechanism that doesn't depend on knowing the exact reset time + +## How to Reproduce + +1. Run an agent that hits the API rate limit +2. Observe logs show "no reset_at in rate_limit_info" +3. Agent gets killed by inactivity timeout +4. Story sits in current with no agent, never restarted + +## Actual Result + +Hard block without reset_at is downgraded to RateLimitWarning. No timer set. Agent dies and story is stuck. + +## Expected Result + +Hard block without reset_at triggers a retry with a default backoff (e.g. 5 minutes). Agent is automatically restarted when the backoff expires. + +## Acceptance Criteria + +- [ ] Bug is fixed and verified