Repository navigation
fix: clarify background command timeouts - #140022
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 7:07 AM ET / 11:07 UTC. ClawSweeper reviewWhat this changesClarifies exec tool descriptions and documentation so agents distinguish background return timing from process lifetime and know how to disable the existing timeout. Merge readiness✅ Ready for maintainer review This remains a useful, focused clarification absent from current main and the latest release. No actionable correctness findings remain; the maintainer-authored PR is also protected from automatic closure. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw’s exec tool starts shell commands and can return a background session for later process-tool interaction. A separate supervisor enforces the command’s lifetime after exec returns. flowchart TD
A[Agent command and options] --> B[Exec tool]
B --> C[Process supervisor]
B --> D[Background session returned]
C --> E{Lifetime limit enabled?}
E -->|Expires| F[Terminate process]
E -->|Disabled| G[Run until completion or explicit stop]
D --> H[Process tool polls or stops session]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +4, Docs +1. Total +5 across 3 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep the existing execution semantics and make process lifetime, return timing, explicit stopping, and host lifecycle limits clear at the tool and documentation surfaces. Do we have a high-confidence way to reproduce the issue? Not applicable as a runtime defect: this PR clarifies existing behavior, which source inspection confirms; the body also reports a matching real exec/process run. Is this the best way to solve the issue? Yes. Updating the existing schema descriptions and documentation is a narrow solution that preserves defaults and avoids introducing another execution mechanism. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 873f424585af. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
* commit '3ed964c8ca6206d26ecc0b6567ccd1389d9948fc': (36 commits) refactor(plugins): unify install config snapshot preparation (openclaw#140081) fix: cloud provisioning stays failed after temporary storage recovers (openclaw#140021) fix(ci): preflight job outputs exceed 1 MiB on full-plan pull requests (openclaw#140018) refactor: consolidate command and provider helpers (openclaw#140072) fix(doctor): replace unavailable TUI cleanup advice (openclaw#140074) fix(plugins): avoid scoped pack failures and missing runtime entries (openclaw#140016) fix: clarify background command timeouts (openclaw#140022) fix(workboard): refresh board navigation while retaining drafts (openclaw#139952) fix: preserve newer chat drafts when rewind completes (openclaw#140066) feat(transcripts): browse and export saved meeting archives (openclaw#139875) fix(cron): complete timeout test observation phase (openclaw#140076) fix(macos): show the full automation count (openclaw#139692) fix: native worker turns fail to load WebSocket transport (openclaw#140071) fix(cli): complete quoted Bash option values (openclaw#140034) fix(chat): show command instructions while pending (openclaw#140041) refactor(cli): use canonical resume result schema (openclaw#140056) fix: restore package acceptance across install runtimes (openclaw#140062) refactor(auto-reply): keep model-selection fixtures in tests (openclaw#140069) fix(plugins): remove owned aliases before uninstalling files (openclaw#140065) fix: completed replies hang when context-engine cleanup stalls (openclaw#140023) ...
* fix(exec): clarify timeouts for background services * fix(exec): fit timeout guidance within description budget
What Problem This Solves
Resolves unclear exec guidance for agents starting background services: a short timeout still terminates the process after the tool has returned a running session.
Why This Change Was Made
Clarifies that
timeoutSecondslimits total command lifetime, whilebackgroundandyieldMscontrol when the tool returns. Documents the existing zero-timeout option and how to stop a persistent service explicitly. Shared timeout guidance remains valid for node-only and completion-only surfaces; background-service examples are scoped to gateway or sandbox execution.User Impact
Agents and operators can distinguish a process deadline from an output wait and choose the appropriate lifetime for a background service. Runtime behavior and configured defaults are unchanged.
Evidence
overall-timeoutand SIGTERM;timeoutSeconds: 0bypassed the configured one-second default and completed with exit code 0.catalog.search("exec")[0].describe()exposed the corrected parameter guidance. The same probe failed its missing-lifetime-guidance assertion before the change and passed afterward; process behavior stayed the same.agent-tools.schema.test.ts,bash-tools.schemas.test.ts,bash-tools.exec-timeout-seconds.test.ts, andbash-tools.exec.background-abort.test.ts.node scripts/check-changed.mjspassed, including formatting, core and core-test typechecks, lint, and repository guards. Fresh independent review of the complete staged candidate found no actionable P0–P2 issues.