-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
openclaw agent --local --json can emit final JSON but keep process/workers alive #92464
Copy link
Copy link
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Environment:
ghcr.io/openclaw/openclaw:2026.6.1openclaw agent --local --json100-entry chunks
openai/gpt-5.4-miniSummary:
In a generated memory-recall workload,
openclaw agent --local --jsoncan emitthe final JSON payload with a correct assistant answer, but the CLI process
does not exit promptly. In the same investigation, child/worker processes could
outlive the parent process, and repeated CLI-local invocations appeared to load
separate model/worker copies.
This matters for automation: a runner that waits for process exit can exhaust
slots or memory even though the turn has already completed and emitted JSON.
Repro shape:
Start an OpenClaw 2026.6.1 container with an initialized local-mode cell.
Import a generated 10,000-entry memory corpus in 100-entry chunks, running:
after each chunk.
Run a fresh-session local agent turn:
openclaw agent \ --local \ --agent main \ --session-key agent:main:generated-linger-repro \ --model openai/gpt-5.4-mini \ --thinking off \ --timeout 600 \ --json \ --message "Use durable memory if available. What is the exact phrase for contact-00017? Reply with only the exact phrase token."Observed:
29.4s, but the CLI didnot exit naturally after a
15spost-JSON grace window and requiredtermination.
failed to exit naturally within the post-JSON grace window.
JSON, so the linger appears workload/scale-sensitive.
openclaw-agent/ embedding-worker style processes after parent terminationunless the runner explicitly killed descendants and verified zero survivors.
Expected:
process should exit promptly.
that turn.
model/worker copies unless that is an intentional, documented behavior.
Impact:
openclaw agent --jsoncannot safelyrely on process exit as the completion signal.
termination, and survivor verification as a workaround.
production memory pressure if orphaned workers accumulate.
Notes:
repro.