Commit cb92466
committed
feat(errors): 3-way transient/service/user classification + auto-retry-once on transient session-start
Error handling couldn't distinguish a transient hiccup from a real service error
— the retryable boolean conflated 'self-heals on retry' with 'you must change
something first', so a customer couldn't tell whether to retry or call their admin.
- error-classifier.ts: new ErrorClass axis (transient / service / user) on every
classification. transient = infra/service hiccup a retry clears (ECS deploy-race,
ENI/capacity delay, network blip, Bedrock throttle, concurrency cap); service =
real platform/config fault an admin owns (bad token/scopes, model-not-enabled,
blueprint misconfig); user = the request/code is the thing to change (build/test
failed, guardrail, wrong PR, max-turns). retryGuidance() keys on errorClass and
takes an autoRetried flag. New isTransientError() helper.
- orchestrate-task.ts: AUTO-RETRY-ONCE at session-start for transient failures —
the one place a retry is idempotent by construction (no clone/commits/PR yet).
Emits session_start_retry; stamps '[auto-retried]' so the surface says 'I tried
again, still failed'. Mid-run crashes are NOT retried.
Backport note: the failure-reply.ts consumer hunk from the origin commit is
omitted — that module is part of the not-yet-merged #247 orchestration UX and
does not exist on main. The classifier axis + auto-retry stand alone.
(cherry picked from commit 63a12dc)1 parent e2b777a commit cb92466
3 files changed
Lines changed: 232 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
| 163 | + | |
162 | 164 | | |
163 | 165 | | |
164 | | - | |
| 166 | + | |
165 | 167 | | |
166 | 168 | | |
167 | 169 | | |
168 | 170 | | |
169 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
170 | 199 | | |
171 | 200 | | |
172 | 201 | | |
| |||
192 | 221 | | |
193 | 222 | | |
194 | 223 | | |
195 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
196 | 230 | | |
197 | 231 | | |
198 | 232 | | |
| |||
0 commit comments