Skip to content

fix(hub): retry model errors before ending the turn - #27

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-11871-retry-model-errors-in-the-director-instead-of-ending-the
Oct 31, 2026
Merged

TheGreatAxios merged 2 commits into
mainfrom
cl-11871-retry-model-errors-in-the-director-instead-of-ending-the

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Closes CL-11871

What changed

  • compactingDirector puts a retry policy on every infer action, including the inner default director's: retryable and quota_exhausted retry after 2 s, 8 s, 30 s; timeout retries once; retries stop after 5 minutes or when a retry-after exceeds 60 s. A longer retry-after wins.
  • When a transient error still reaches the director, a specialist run fails with model_unavailable: <category>: <message>, so the existing specialist-ended notice reaches the coordinator. The coordinator keeps replying with the error.
  • replyOnRunaways is renamed replyOnFailure, since it now covers model failures too.
  • New compaction.test.ts.

Verification

  • bun test --conditions=intx-src apps/hub/src/workflows/compaction.test.ts: 2 pass. Covers the schedule on both the inner director's and the resample path's infer, the 5 min budget, one timeout retry, retry-after under and over the cap, fatal errors, specialist failure and the coordinator reply text. Both tests failed with the change made inert.
  • bun run typecheck, bun run lint, bun run format:check pass.

Every inference from the compacting director retries an overloaded, slow
or rate-limited model on a 2/8/30 s schedule, bounded to 5 minutes and
one retry for a stalled stream. Once it gives up, a designer or coder run
fails so the coordinator gets the ended notice; the coordinator still
replies with the error. replyOnRunaways becomes replyOnFailure.

Closes CL-11871
@linear-code

linear-code Bot commented Oct 31, 2026

Copy link
Copy Markdown

CL-11871

@corbits-triage

corbits-triage Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Triage: Pass

No changes needed from you. A maintainer will review this pull request.

Triage will approve, request review.

Changed since the last verdict (Fail at c2fd4c2): 1 new commit.

@corbits-triage corbits-triage Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Triage requests changes:

  • Conventions: added code matches a code pattern

@corbits-triage
corbits-triage Bot dismissed their stale review October 31, 2026 17:07

Nothing triage asked to change still fails, so this request no longer stands.

@TheGreatAxios
TheGreatAxios added this pull request to the merge queue Oct 31, 2026
Merged via the queue into main with commit 36db31f Oct 31, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant