OpenClaw β agent --local cold-boot cost
Version: OpenClaw 2026.4.22 (00bd2cf), Windows 11. Three agents, model: openai-codex/gpt-5.4. Agents do almost no LLM work β on receipt of a JSON payload they immediately exec a local Python script.
openclaw agent --local --agent <slug> --session-id <fresh-uuid> --message '<json>' --json --timeout 1800
Fresh --session-id isolates from the operator's webchat session.
Problem: ~13 min latency before the agent acts
Measured run (DB-recorded events, UTC):
13:32:41 +0s poker writes task_claimed, shells openclaw agent --local β¦
13:45:58 +797s worker writes task_claimed + 3 more events (same second)
797s of pre-execution latency. Actual work runs in <1s.
There's also a 5β9 min hang after session.ended before the process exits (~519 MB node.exe lingers).
The same agent is instant via the gateway
Webchat through the gateway (127.0.0.1:18789, warm, multiple connections) β agent responds immediately. No cold-boot, no cleanup hang.
agent --help describes --local as "Run the embedded agent locally (requires model provider API keys in your shell)" β suggesting a fresh embedded runtime per invocation: Codex OAuth, MCP init, skill/identity load.
Proposed fix β drop --local
openclaw agent --agent <slug> --session-id <fresh-uuid> --message '<json>' --json --timeout <s>
Hypothesis: the warm gateway already has the agent runtime, MCP servers, and Codex auth loaded.
Questions
- Is ~13 min --local cold-boot expected on 2026.4.22 with openai-codex? Is the 5β9 min post-session.ended hang known?
- Does omitting --local route through the warm gateway as expected?
- With --session-id <new uuid> and no --deliver, does the dispatch + reply stay isolated, or are --reply-to / --reply-channel needed?
- Does --json return the reply to stdout the same way through the gateway?