# feat\(orchestrator\): Add shared provider continuation and background item plumbing · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/commit/bf18e8c3df94560bed57bc94a753d79e3ca970cf)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

Requested revision: bf18e8c3df94560bed57bc94a753d79e3ca970cf

Requested commit: bf18e8c3df94560bed57bc94a753d79e3ca970cf

Commit: bf18e8c3df94560bed57bc94a753d79e3ca970cf

Tree: 947e05627ca52ed50b001b92bea052e24c87fa26

Author: Mike Olson

Committer: Julius Marminge

## Message

```
feat(orchestrator): Add shared provider continuation and background item plumbing

Introduce a provider-agnostic continuation request queue, worker, and optional
hasPendingBackgroundWork idle pin so adapters can surface post-settle native
wake traffic as first-class runs. No adapter offers continuations here; the
per-provider specialty commits wire attach mode.

Also fix shared run event ingestion dropping late background item
completions. The per-run provider event fiber stopped as soon as the root
turn terminalized and no child provider turns or subagent rows remained
active. Background-capable turn items (background commands, monitors,
subagent rows) that complete after root settlement then lost their trailing
turn_item.updated: the projection kept the item running forever even when
the underlying work (and any wake) succeeded.

Track non-terminal command_execution, dynamic_tool, and subagent turn items
owned by the run or an owned child thread, and keep ingesting until they
terminalize, gated on the root terminal status being completed so
interrupted and failed runs do not pin the stream open.

Repro evidence: Codex emits subagent.updated(completed) before the trailing
turn_item.updated(completed), so post-settle subagent items stuck at running
in the UI; background command items never completed in the
codex-background-exec-wake projection even though the wake run fired. The
same stuck-running signature appears on the Claude background Bash wake and
Grok monitor paths, which reuse this shared ingestion loop.

```

## Parents

- [18a35b7fb47d999051dcc6501d5516139692555c](https://git.cafe/pingdotgg/t3code/commit/18a35b7fb47d999051dcc6501d5516139692555c?format=markdown)

[Source at this commit](https://git.cafe/pingdotgg/t3code/tree/bf18e8c3df94560bed57bc94a753d79e3ca970cf?format=markdown)
