Skip to content

Keep a second credential error from failing the session - #926

Merged
TheGreatAxios merged 3 commits into
mainfrom
cl-7738-do-not-fail-the-session-when-a-second-credential-error-hits
Sep 12, 2026
Merged

Keep a second credential error from failing the session#926
TheGreatAxios merged 3 commits into
mainfrom
cl-7738-do-not-fail-the-session-when-a-second-credential-error-hits

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Resume the durable error sequence when an agent is reassembled so a second same-category inference error writes a new record instead of colliding
  • Treat a Duplicate error record flush as already stored so afterCheckpoint does not fail the session

Verification

  • bun run typecheck, bun run build, and bun run test pass
  • Two same-category credential_failure records persist in one session and across re-assembly without a Duplicate error record reactor failure

Fixes CL-7738

@linear-code

linear-code Bot commented Sep 12, 2026

Copy link
Copy Markdown

CL-7738

A rebuilt agent reused seq 0 for the next same-category inference
error, so commitErrors threw Duplicate error record and
afterCheckpoint failed the run. Resume the durable error sequence
on assembly and drop a colliding flush instead of failing the
session.
@TheGreatAxios
TheGreatAxios force-pushed the cl-7738-do-not-fail-the-session-when-a-second-credential-error-hits branch from f3c223e to bc81652 Compare September 12, 2026 04:09

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Critic · Approve

The three patched vendor packages have complete ledgers and source markers, and createAgent safely falls back when loadErrors fails while preserving normal error-sequence resume.

No findings.

Notes

  • bun test tests/unit/vendor-patch-ledger.test.ts — 2 pass, 0 fail.
  • bun test vendor/intx-agent/src/flush-errors.test.ts — 10 pass, 0 fail, including cross-assembly sequence resume, duplicate flush handling, and loadErrors failure fallback.

A stale-seq assembly flushing [seq0/dup, seq1/fresh] discarded the whole batch, losing fresh diagnostics. The flush now maps the colliding key back to its record, drops only that record, and retries the rest in the same flush.
@TheGreatAxios
TheGreatAxios merged commit 358db8a into main Sep 12, 2026
9 checks passed
@TheGreatAxios
TheGreatAxios deleted the cl-7738-do-not-fail-the-session-when-a-second-credential-error-hits branch September 12, 2026 05:06
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