Repository navigation
Description
bb 0.46.0, macOS, Codex provider (gpt-6.1-sol), about 40 Codex threads on one machine.
What happens
Installing a plugin that contributes a skill, or editing that plugin's skills, changes the injected skill catalog hash. At each Codex thread's next new turn, the host daemon's runtime manager compares the environment's skillCatalogHash with the new catalog. If the entry has no active runtime work and no in-flight command for the thread, it calls replaceEntryForSkillCatalog, which shuts down the environment's runtime. The thread's provider bridge and Codex app-server are replaced; the thread resumes from its rollout (thread/identity, then account/updated, then provider.env-resolved).
Every process the agent started from its Codex shell tool goes down with the old app-server, including nohup cmd & watchers. bb does not count these as active runtime work, because they are not bb background tasks. A thread that sits between turns while its watchers run is therefore always replaced.
Evidence (2026-10-25, times UTC)
- 16:34:46
plugin [email protected] loaded. Thread A rebuilds at 16:53:23, its first new turn after that. - 21:46:50
plugin [email protected] loaded(first install, declares a skill). Threads A, B and C rebuild at 21:47:08, 21:56:42 and 22:06:37: each thread's first new turn after the install. Steers into a running turn never rebuilt. - 22:07:39 the plugin's
skills/directory changed. Threads C, A and B rebuild again at 22:11:09, 22:12:32 and 22:12:38: again each thread's first new turn after the change. - Thread B had run one Codex runtime from 09:26 to 21:56 with no rebuild, across about 35
provider-codexhost-plugin-worker restarts. So the worker restarts are not the trigger. - The execution settings (model, reasoning level, permission mode, service tier) were identical before and after every rebuild. No
provider/errorwas recorded. Codex pool routing was off. The in-bridge rebuild reasons inprovider-codex(rebuildBeforeNextTurnReason, construction signature) do not apply. - After each rebuild the thread has a new bridge
nodeprocess and a newcodexapp-server, both started in the same second. - Background watchers started with
nohupin these threads vanished at the rebuild times without recording an exit. In a local probe, a watcher started in its own session (setsidafter a double fork) survived a kill of the launching session's process group, while anohupwatcher did not.
Controlled repro (2026-10-26, UTC)
One throwaway Codex thread and one skill-only throwaway plugin; every step a new turn.
- 03:59:36, new turn with the catalog unchanged: app-server and bridge kept the same pids.
- 04:00:45,
bb plugin installof the skill-only plugin. - 04:00:55, next new turn: app-server and bridge both replaced (new pids, started 04:00:56), with the same
thread/identity,account/updated,provider.env-resolvedsequence as above. - A watcher started in its own session survived the replacement.
Expected
A skill catalog change does not kill work a thread is doing between turns. Options, in order of preference:
- Apply the new skill roots to the running Codex app-server (
skills/extraRoots/setalready exists in the bridge) instead of replacing the runtime. - If a replacement is required, treat processes the provider started (the app-server's process tree) as active runtime work, the same as an in-flight command, and keep the retained-catalog path until they exit.
- At minimum, show a runtime note on the thread ("runtime replaced after a skill change; background commands started by the agent were stopped").
Workaround
Start long-lived background commands in their own session (setsid after a double fork) so the app-server shutdown does not reach them.
Activity
bb-slop-cop commentedon Oct 26, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilothost,providers,provider-codex,confirmed-repro; no existing classifications were replaced.Apply a changed skill catalog to running Codex sessions instead of re…