openclaw/docs/tools
Peter Steinberger b2d26e4a61
fix(code-mode): retire warm workers with their host
## What Problem This Solves

Completed Code Mode workers could remain alive after their creating Gateway or CLI command closed. The warm pool and idle-expiry timers had no host lifetime.

## User Impact

Closing a host now waits for its Code Mode workers to retire. Other live hosts keep their workers, and failed native cleanup remains owned for a later retry. Standalone executor calls close completed workers immediately instead of retaining an unowned warm pool. Suspended continuations retain their existing contract.

## Why This Change Was Made

Warm pools capture the existing resource host when created. Each host owns a scheduler scope and its admitted workers; idle expiry uses that scope. Reuse stays within the creating host. The four-worker bound, five-minute idle period, fresh VM contexts, and memory-pressure eviction remain unchanged.

Production: **+65 / -7 / net +58** (`src/**` and `extensions/**`, excluding tests and support). This growth supplies host isolation and joined retirement; this cut is not a LOC reduction. There are no persisted format or configuration changes. Update behavior: existing state remains compatible; the retirement ordering takes effect after restart.

## Evidence

Independent reviews of the production change and the test-fixture correction are clean through P2. Candidate: `6c475248c2ab5b21a3eb0b9e121b38e76d5bffe3`.

- The final source tree passed all 30 tests across the five Code Mode lifecycle/native sibling files in **22.31s pnpm wall**. The native warm-pool fixture now supplies a real host and joins its teardown; the real workers, test bodies, and worker-count assertions are preserved.
- The original production implementation failed the new standalone-worker retirement assertion as intended. The initial 14 lifecycle cases passed in **15.33s pnpm wall**. Full production changed checks passed in **1414.68s**; the final test-only delta passed its changed checks in **205.14s**.
- The final candidate build passed in **434.34s**. Its canonical package passed tarball integrity checks.
- The two native warm-pool failures during development were deterministic fixture mismatches: standalone calls no longer retain a pool, while those tests assert host-owned reuse. This was not a flake fix; no assertions, timeouts, retries, or worker implementations were weakened.

Blacksmith Testbox leases: `tbx_01m3t3g3afjjrmnqjhr0mqasv0` ([native and production proof](https://github.com/openclaw/openclaw/actions/runs/36779653190)) and `tbx_01m3taxfbahdc6c63a38n0fq50` ([final build, fixture checks, and update cell](https://github.com/openclaw/openclaw/actions/runs/36792095804)). The first lease completed at two hours during the fixture changed gate, after all 30 tests passed. The unfinished gate was completed on the fresh lease; the disconnected run is not counted as a passing gate.

The real published `2026.9.7` updater installed the exact candidate in **151s**. Both installed Gateways passed health and joined SIGTERM; the original disabled cron job, workspace bytes, authored configuration, and SQLite integrity were preserved. Doctor applied its existing implicit-main-roster normalization (`agents.entries.main = {}`). The first verification incorrectly expected the whole agents object to remain byte-shaped; source inspection confirmed the existing migration, and a separate read-only verification of the same original artifacts asserted that exact normalization and all remaining preservation checks. The update was not rerun. This cell covers installed update and shutdown; the worker tests above cover warm-worker custody.
2026-10-01 00:41:27 +00:00
..
acp-agents fix: act for the person who asked when several people steer a turn (#160525) 2026-09-28 22:16:34 -07:00
browser improve(browser): show only the current session's tabs in the chat Browser panel (#159891) 2026-09-27 15:16:43 -07:00
code-mode fix(code-mode): retire warm workers with their host 2026-10-01 00:41:27 +00:00
skill-workshop fix(doctor): stop repeated warnings for archived Workshop backups (#161586) 2026-09-30 10:42:40 -07:00
subagents fix(subagents): preserve private result publication during staging (#161820) 2026-09-30 11:37:16 +00:00
tts docs(tts): explain that restricted tool profiles exclude the tts tool (#155950) 2026-09-30 16:52:23 -07:00
acp-agents-setup.md docs: fix 12 concrete defects from the ux audit remainder (#144128) 2026-09-25 17:28:14 +08:00
acp-agents.md refactor: remove Tasks and TaskFlow runtime (#159179) 2026-09-27 10:40:29 -07:00
agent-send.md docs: fix 20 link defects confirmed live in the verified backlog (#144133) 2026-09-11 03:48:10 +08:00
apply-patch.md fix: simplify guarded file operations and stream model verification (#154201) 2026-09-20 18:53:00 -07:00
ask-user.md docs: fix 12 concrete defects from the ux audit remainder (#144128) 2026-09-25 17:28:14 +08:00
brave-search.md
browser-control.md docs: fix 12 concrete defects from the ux audit remainder (#144128) 2026-09-25 17:28:14 +08:00
browser-linux-troubleshooting.md fix(browser): preserve running browsers and locked profile data (#149354) 2026-09-15 14:49:29 -07:00
browser-login.md fix(agents): drop the blanket credential prompt that blocked owner-authorized logins (#143238) 2026-09-09 11:28:23 -07:00
browser-wsl2-windows-remote-cdp-troubleshooting.md
browser.md docs: Simplified Technical English pass over tools, plugins, and channels (#143979) 2026-09-10 19:21:31 +08:00
btw.md fix(codex): unify turn activation and cleanup ownership (#151753) 2026-09-18 08:00:13 -07:00
chrome-extension.md fix(browser): keep tabs usable while Chrome Web Store is open (#156890) 2026-09-26 12:29:43 +05:30
code-execution.md feat(xai): add Grok 4.7 support (#155379) 2026-09-21 20:27:04 -07:00
code-mode.md fix(agents): show readable purposes for Code Mode execution (#157150) 2026-09-24 12:22:44 +00:00
creating-skills.md docs: restore the skill creation tutorial steps (#144388) 2026-09-10 17:39:01 -03:00
custodian-skills.md docs: Simplified Technical English pass over tools, plugins, and channels (#143979) 2026-09-10 19:21:31 +08:00
diffs.md docs(plugins): remove obsolete Gateway restart guidance (#146516) 2026-09-12 16:48:13 -07:00
duckduckgo-search.md docs(plugins): remove obsolete Gateway restart guidance (#146516) 2026-09-12 16:48:13 -07:00
elevated.md docs(tools): fix concrete ux defects in docs/tools (#143856) 2026-09-10 16:19:50 +08:00
exa-search.md docs(plugins): remove obsolete Gateway restart guidance (#146516) 2026-09-12 16:48:13 -07:00
exec-approvals-advanced.md fix(exec): only name approval surfaces that can answer exec approvals (#159266) 2026-09-26 17:50:25 -07:00
exec-approvals.md feat(tools): explain terminal access restrictions (#157014) 2026-09-24 02:53:23 -05:00
exec.md fix(exec): remove audit-suppression command approval heuristic (#161718) 2026-09-30 01:53:39 -07:00
firecrawl.md docs(firecrawl): link the Firecrawl site and where to get an API key (#157257) 2026-09-30 16:54:55 -07:00
gemini-search.md fix(google): keep Gemini web search available for new API keys (#111964) 2026-09-10 18:17:44 +08:00
goal.md perf(sessions): reuse registry relations across list reads (#160198) 2026-09-28 19:57:41 +00:00
grok-search.md fix(search): cancel xAI searches waiting on credentials (#154559) 2026-09-21 14:40:55 +05:30
image-generation.md fix(agents): generated images in shared-main chats run in the background again (#161005) 2026-09-29 00:40:31 -07:00
index.md fix: act for the person who asked when several people steer a turn (#160525) 2026-09-28 22:16:34 -07:00
kimi-search.md docs(plugins): remove obsolete Gateway restart guidance (#146516) 2026-09-12 16:48:13 -07:00
llm-task.md Support isolated sessions in the AgentsAPI and enable restricted dreaming sessions (#159246) 2026-09-26 18:27:06 -07:00
lobster.md refactor: remove Tasks and TaskFlow runtime (#159179) 2026-09-27 10:40:29 -07:00
loop-detection.md fix(computer): unchanged window reads never reach critical loop detection (#160019) 2026-09-28 07:19:06 +05:30
mcp.md perf(mcp): back off failed bundle server starts (#158088) 2026-09-25 14:25:53 +00:00
media-overview.md refactor: remove Tasks and TaskFlow runtime (#159179) 2026-09-27 10:40:29 -07:00
minimax-search.md docs: correct verified accuracy defects in CLI, tools, and automation pages (#143179) 2026-09-09 23:57:06 +09:00
multi-agent-sandbox-tools.md refactor: retire pre-June config and upgrade test support (#156859) 2026-09-23 19:26:23 -07:00
music-generation.md fix(agents): generated images in shared-main chats run in the background again (#161005) 2026-09-29 00:40:31 -07:00
ollama-search.md docs(tools): fix concrete ux defects in docs/tools (#143856) 2026-09-10 16:19:50 +08:00
parallel-search.md feat(search): configure providers and verify search in Settings (#154135) 2026-09-21 03:51:42 -07:00
pdf.md fix: PDF analysis uses the active vision model (#159593) 2026-09-28 03:17:57 +05:30
permission-modes.md docs(plugins): remove obsolete Gateway restart guidance (#146516) 2026-09-12 16:48:13 -07:00
perplexity-search.md docs(plugins): remove obsolete Gateway restart guidance (#146516) 2026-09-12 16:48:13 -07:00
plugin.md refactor: retire the TaskFlow Webhooks plugin (#158225) 2026-09-25 20:29:15 -07:00
progress-card.md fix(ui): progress card stays after dismissing an unfinished or note-only card (#160867) 2026-09-28 18:57:21 -07:00
reactions.md feat: react to prompts and replies with emoji in shared sessions (#161053) 2026-09-30 09:12:24 +00:00
screen.md fix: let people with the same permissions steer each other's turns (#159850) 2026-09-28 13:52:08 +00:00
searxng-search.md docs(plugins): remove obsolete Gateway restart guidance (#146516) 2026-09-12 16:48:13 -07:00
secrets.md fix: preserve background command proxy access across turns (#152557) 2026-09-19 01:44:16 -07:00
self-learning.md fix: exclude incognito turns from automatic memory capture (#155594) 2026-09-23 17:53:28 +08:00
show-widget.md fix: allow HTML widgets up to 10 MiB (#159970) 2026-09-28 00:37:33 +00:00
skill-workshop.md docs: Simplified Technical English pass over tools, plugins, and channels (#143979) 2026-09-10 19:21:31 +08:00
skills-config.md feat(skills): open past-work learning in a normal session (#142909) 2026-09-09 13:10:54 +05:30
skills.md docs: explain skill readiness and visibility (#146951) 2026-09-30 16:03:34 -07:00
slash-commands.md feat(ui): select Ultrafast for supported accounts (#160352) 2026-09-30 07:45:41 +00:00
steer.md docs: explain that /acp steer runs after the in-flight ACP turn (#154372) 2026-09-26 17:41:34 -07:00
subagents.md refactor: remove Tasks and TaskFlow runtime (#159179) 2026-09-27 10:40:29 -07:00
swarm.md refactor: remove Tasks and TaskFlow runtime (#159179) 2026-09-27 10:40:29 -07:00
tavily.md
theme.md fix: let people with the same permissions steer each other's turns (#159850) 2026-09-28 13:52:08 +00:00
thinking.md feat(ui): select Ultrafast for supported accounts (#160352) 2026-09-30 07:45:41 +00:00
tokenjuice.md
tool-search.md fix: guide direct-only tool calls out of catalog recovery loops (#161055) 2026-09-29 15:49:21 +08:00
trajectory.md fix(trajectory): bound SQLite export source bytes before parse (#130877) 2026-09-15 15:07:38 -07:00
tts.md docs: correct ElevenLabs TTS model configuration key (#161917) 2026-09-30 22:42:58 +08:00
video-generation.md fix(agents): generated images in shared-main chats run in the background again (#161005) 2026-09-29 00:40:31 -07:00
web-fetch.md fix: retain proxy DNS checks with Undici security updates (#139056) 2026-09-05 05:07:19 -07:00
web.md feat(search): configure providers and verify search in Settings (#154135) 2026-09-21 03:51:42 -07:00