Repository navigation
Description
Summary
On OpenClaw 2026.6.10, an isolated cron agentTurn can access the shell/exec capability when payload.toolsAllow is omitted, but the same job loses that capability when payload.toolsAllow is set to ["exec"] or ["bash"].
This looks inverted from the intended allow-list semantics: requesting exec/bash should keep the shell tool family available, not produce a runtime where the command tool is missing.
This is related to #60841, but appears to be a distinct surface. In #60841, an upstream config allow-list had already filtered out the core tools and toolsAllow could not re-expose them. In this repro, the no-toolsAllow control succeeds; adding the narrow allow-list is what breaks the isolated cron run.
Environment
- OpenClaw
2026.6.10(aa69b12) - Surface: Gateway cron
- Job shape:
sessionTarget: "isolated",payload.kind: "agentTurn" - Affected values tested:
payload.toolsAllow: ["exec"]andpayload.toolsAllow: ["bash"] lightContext: truedoes not cause the failure by itself
Smoke matrix
A minimal isolated cron smoke was run with a prompt that only needed to execute a simple command and report the working directory.
| Case | payload.toolsAllow |
payload.lightContext |
Result |
|---|---|---|---|
| Control | omitted | omitted | succeeds, command returns OK:<workspace> |
| Control + light context | omitted | true |
succeeds, command returns OK:<workspace> |
| Narrow allow-list | ["exec"] |
true |
fails with TOOL_MISSING |
| Alias allow-list | ["bash"] |
true |
fails with TOOL_MISSING |
A production isolated cron job hit the same failure mode after being tightened to a narrow command-oriented allow-list: the isolated session had no usable command tool (toolCount: 0 was observed), the model returned a business-failure summary, and the cron outer status still showed ok because an assistant final was delivered.
Expected behavior
payload.toolsAllow: ["exec"]should expose theexec/command tool family to the isolated cron agent.payload.toolsAllow: ["bash"]should either normalize to the same shell/exec capability or fail validation with a clear preflight error ifbashis not a supported alias.- Tool provider/runtime construction should happen before final allow-list filtering, so a final filter does not prevent the shell tool family from being created.
- If a requested known core tool is absent after construction/filtering, cron should fail before the model turn with an actionable diagnostic.
Actual behavior
- Omitting
toolsAllowlets the isolated cron job run the command. - Setting
toolsAllowto["exec"]or["bash"]causes the command tool to be unavailable and the agent reportsTOOL_MISSING.
Impact
This makes the recommended least-privilege cron posture unsafe for deterministic script jobs: narrowing a cron job to only exec can remove the very tool the job needs. Operators are then pushed toward either broad tool exposure or migrating jobs to payload.kind: "command" as a workaround.
In production, the immediate mitigation was:
- Clear
toolsAllowon affected isolatedagentTurncron jobs. - Migrate deterministic script jobs to
payload.kind: "command", so the command exit code determines the cron status directly.
Suggested fix
- Add a regression test for isolated cron
agentTurnwith no allow-list vs["exec"]vs["bash"], including thelightContext: truepath. - Separate tool-family/runtime provider construction from the final
toolsAllowprojection/filter. - Normalize or explicitly reject the
bashalias consistently. - Add a cron preflight: if a payload requests a known core tool and the final isolated runtime does not expose it, fail the cron run before invoking the model, with a diagnostic such as
requested tool exec was not available after runtime construction.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jun 28, 2026
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.
Close as a duplicate of the open canonical tracker #60841, not as fixed; current main still source-reproduces the Codex app-server finite-allowlist failure, but #60841 already owns the same no-tools/wildcard-succeeds vs finite
exec-missing behavior and the security-sensitive fix decision.Canonical path: PR #60842 closes #60841 and targets the generic embedded-runner allowlist problem, but it remains open and conflicting, so #60841 stays the canonical open tracker rather than a merged fix.
So I’m closing this here because the remaining work is already tracked in the canonical issue.
Review details
Best possible solution:
Keep #60841 as the canonical tracker and land a security-reviewed fix there that either materializes exact requested shell/file tools under existing deny/sandbox gates or fails cron preflight instead of recording
ok.Do we have a high-confidence way to reproduce the issue?
Yes, source-reproducible on current main: finite Codex app-server
toolsAllowdisables native shell/file tools and filters native-owned dynamic names before allowlist matching, while cron can still record a non-fatal assistant final asok.Is this the best way to solve the issue?
No as a separate issue; the best path is to preserve this report's v2026.6.10 matrix as duplicate evidence under #60841 and resolve the security-sensitive behavior once in the canonical tracker.
Security review:
Security review needs attention: The underlying canonical fix is security-sensitive because it changes how finite cron allowlists expose or fail shell/file execution tools.
extensions/codex/src/app-server/dynamic-tool-build.ts:469Solving the canonical issue requires choosing whether finite scheduled-run allowlists can materialize exact shell/file tools under existing policy gates or must fail preflight when they cannot be honored.
Confidence: 0.91
AGENTS.md: found and applied where relevant.
What I checked:
agentTurnwhere omittedtoolsAllowsucceeds buttoolsAllow: ["exec"]and["bash"]produceTOOL_MISSING.toolsAllowlosing shell/file tools in embedded isolated cron runs, and its later repro comments include the same pattern: finite--tools execfails while wildcard or omitted tools succeeds on the Codex app-server cron path.--toolsas restricting which tools the job can use, with--tools exec,readas an example, so a finite allowlist producing no shell tool is a contract bug rather than unsupported input. Public docs:docs/automation/cron-jobs.md. (docs/automation/cron-jobs.md:175, d1b917120a47)toolsAllowas an optional allow-list where only those tools are sent to the model. (src/cron/types.ts:249, d1b917120a47)toolsAllow: ["exec"]setsincludeShellTools: true, so the generic embedded runner path is partially addressed. (src/agents/embedded-agent-runner/run/attempt-tool-construction-plan.ts:151, d1b917120a47)bashtoexecfor shared tool-policy normalization. (src/agents/tool-policy-shared.ts:19, d1b917120a47)Likely related people:
src/agents/embedded-agent-runner/run/attempt-tool-construction-plan.ts,src/agents/tool-policy-shared.ts,extensions/codex/src/app-server/dynamic-tool-build.ts)extensions/codex/src/app-server/dynamic-tool-build.ts,src/agents/embedded-agent-runner/run/attempt-tool-construction-plan.ts)src/agents/embedded-agent-runner/run/attempt.ts,src/agents/agent-tools.ts,src/agents/tools/cron-tool.ts)toolsAllowpersistence and default allowlist handling near this report's surface. (role: recent cron toolsAllow contributor; confidence: medium; commits: 17066f2d7c01; files:src/cron/isolated-agent/run-executor.ts,src/cron/store/payload-codec.ts,src/cron/service/jobs.ts)--toolsallow-list surface used by this issue. (role: introduced cron tools surface; confidence: medium; commits: 4d8c07b97c0b; files:src/cron/isolated-agent/run.ts,src/cron/types.ts)Codex review notes: model internal, reasoning high; reviewed against d1b917120a47.