fix(agent): don't eat /compact flag on failed turn; restore ctx fallback; requeue on SessionNotFound
This commit is contained in:
parent
dd51d02bc2
commit
b4f54a194b
4 changed files with 40 additions and 6 deletions
|
|
@ -113,6 +113,7 @@ else a `TurnError`) drives the post-claude branch:
|
|||
| `Err(PromptTooLong)` | `drive_turn` archived the session (the lib already compacted + retried and it still overflowed); requeue inflight so the message redelivers into a fresh session that fits — no status park |
|
||||
| `Err(RateLimited)` | sleep `HIVE_RATE_LIMIT_SLEEP_SECS` (default 300), requeue inflight, status back to `online` |
|
||||
| `Err(AuthFailed)` | emit `needs_login_idle` sentinel, requeue inflight, park in `wait_for_login` |
|
||||
| `Err(SessionNotFound)` | resume + create self-heal both missed ("shouldn't happen"); requeue inflight so the next turn creates fresh — no status park, message not dropped |
|
||||
| `Err(Failed(err))` | route `[system] \`<qualified-label>\` claude turn failed:\n<err>` to `<parent>` via `send_to_parent` |
|
||||
|
||||
After the outcome handler, the stats sink records a row and the
|
||||
|
|
|
|||
Loading…
Reference in a new issue