GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(server): background work an agent waits on survives settles, crashes and failed wakes by tebiggs · Pull Request #14 · tebiggs/t3code

Conversation

@tebiggs

@tebiggs tebiggs commented Oct 28, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Owner

A background job the agent was waiting on, such as a deploy, a test run or a deploy's waiter, could be lost:

  • A merged pull request auto-settled the thread, which detached the provider and killed the job.
  • An agent that settled its own thread mid-turn did the same once the turn ended.
  • A failed follow-up dispatch was only logged.
  • A provider session or Claude process that died left no trace of the jobs it took down.
  • The thread could also read Done between the job ending and the follow-up turn starting.

This keeps upstream's opt-in: work holds the thread only when the agent marks it with t3_background_wait. Evals (below) show current Claude models mark deploys and waiters reliably under upstream's instructions. The fixes:

  • thread.auto-settle rechecks for held work and queued continuations under the thread lock. The sweep's snapshot misses roster changes, because they don't move updatedAt.

  • An agent's own mid-turn settle is skipped at turn end while the thread still waits on work.

  • A finished job the agent waits on stays listed until the turn that reports it starts, so the thread never reads Done in between.

  • A failed follow-up dispatch retries up to 6 times under one command id, so the agent gets one follow-up.

  • Two kinds of loss now record what was lost and wake the agent with the restart note:

    • a session released by a crash or idle timeout;
    • a Claude process that dies on its own while idle.

    The note now tells the agent to check results before rerunning anything with side effects.

Validation

  • New regression tests cover each fix, and they fail without it.

  • Typecheck, lint, format and knip pass, as do the 14 test files beside the changes (492 tests).

  • Evals, evals/mcp-tool-use/cases/background-work.ndjson, run on Sonnet 5.5 and Opus 5.5 with 3 samples each. The agent:

    • marks a background deploy: 6 of 6 samples;
    • marks a detached deploy's tail --pid waiter: 6 of 6;
    • leaves a dev server unmarked: 6 of 6.

    Total cost was about $4.

  • A live run against a dev server with Claude Sonnet 5.5 checked these fixes:

    • a failing job's result reaching the agent with no Done in between;
    • a killed Claude process waking the agent with the note;
    • a self-settle skipped while work runs;
    • Stop never resuming.

    That run used an earlier revision that held every job without a mark. The same code paths now apply to jobs the agent marks.

The merged-PR auto-settle and the dispatch retry are covered by tests only.

Claude Opus 5.5 in Claude Code, running in T3 Code.

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
tebiggs and others added 8 commits October 28, 2026 03:04
@tebiggs @claude
fix(server): background jobs keep threads working until their result …
799e196
…is delivered

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@tebiggs @claude
fix(server): an agent settling its own thread no longer ends work it …
87ce74b
…waits on

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@tebiggs @claude
fix(server): a Claude process that dies while idle reports the jobs i…
0b3c16e
…t took down

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@tebiggs @claude
fix(server): count only running jobs as lost when Claude exits
2450a15
Finished jobs awaiting delivery keep their buffered result. Also satisfies
the catchCauseIf and hoisted mapError lint rules upstream added.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@tebiggs @claude
docs(fork): list #14 in FORK.md
b214f5e
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@tebiggs
Merge remote-tracking branch 'origin/main' into t3/reliable-backgroun…
944b112
…d-status

# Conflicts:
#	apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts
#	apps/server/src/orchestration-v2/ThreadManagementService.ts
@tebiggs @claude
test(evals): background-work cases for the fork's Claude default
e42f056
A dev server the agent leaves running must be marked with waiting: false,
and a background deploy it will report on must keep holding the thread.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@tebiggs @claude
fix(server): keep upstream's opt-in for background work
2b33062
Evals showed Claude marks the deploys and waiters it waits on under
upstream's instructions, so the fork default bought no protection and cost
sync conflicts. The settlement, delivery, retry and loss fixes stay, and
the eval cases now guard upstream's behavior.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@tebiggs tebiggs changed the title fix(server): background jobs keep threads Working until their result reaches the agent fix(server): background work an agent waits on survives settles, crashes and failed wakes Oct 29, 2026
@tebiggs
tebiggs merged commit d405b97 into main Oct 29, 2026
11 of 12 checks passed

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Oct 30, 2026
chore(fork): merge upstream v0.1.6-nightly.20261030.3917 #20
Merged
fix(server): Claude threads get a reminder to mark background work they wait on #24
Merged
chore(fork): merge upstream v0.1.7-nightly.20261103.4119 #27
Merged
This was referenced Nov 6, 2026
chore(fork): merge upstream v0.1.8-nightly.20261106.4262 #33
Merged
chore(fork): merge upstream v0.1.10-nightly.20261112.4564 #42
Merged
chore(fork): merge upstream v0.1.10-nightly.20261112.4580 #43
Merged
chore(fork): merge upstream v0.1.10-nightly.20261113.4630 #46
Merged
This was referenced Nov 15, 2026
chore(fork): merge upstream v0.1.10-nightly.20261115.4723 #52
Merged
chore(fork): merge upstream v0.1.11-nightly.20261119.4928 #59
Merged
chore(fork): merge upstream v0.1.11-nightly.20261120.4979 #60
Merged
chore(fork): merge upstream v0.1.12-nightly.20261121.5038 #62
Merged
fix(fork): a provider crash wakes the agent once, through upstream's continuation #63
Merged
This was referenced Nov 23, 2026
chore(fork): merge upstream v0.1.12-nightly.20261123.5138 #66
Merged
chore(fork): merge upstream v0.1.12-nightly.20261124.5178 #67
Merged
chore(fork): merge upstream v0.1.12-nightly.20261125.5230 #69
Merged
chore(fork): merge upstream v0.1.14-nightly.20261127.5332 #73
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@tebiggs
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.