Skip to content

fix(exec): reject the unsupported cwd parameter instead of running in the default directory - #154248

Merged
obviyus merged 2 commits into
openclaw:mainfrom
wangmiao0668000666:fix/exec-cwd-unsupported
Oct 2, 2026
Merged

obviyus merged 2 commits into
openclaw:mainfrom
wangmiao0668000666:fix/exec-cwd-unsupported

Conversation

@wangmiao0668000666

@wangmiao0668000666 wangmiao0668000666 commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Current-main integration and real OpenAI verification

Candidate: ac8d3b81a2512c483069f0c1d892bf30b8676b9e. Baseline: 64fbbe87c10ae494469cefe3fc493401f45dc411.

Merged main only to resolve GitHub-reported conflicts. Retained main's required validation and its test cleanup, plus the contributor's cwd rejection and regression. No overlap with Pash/Sarah changes. Thanks to @wangmiao0668000666 for the report and fix.

Fresh proof used the built Gateway and openclaw agent, the native OpenClaw agent runtime, real OpenAI gpt-4.1-mini, and real pwd processes in isolated Docker profiles. Cron, heartbeat, memory flushing/search, utility-model work and channel integrations were disabled. A transparent loopback proxy captured requests/results and enforced four real provider calls total; it did not rewrite model requests or synthesize tool calls.

The same prompt explicitly requested three calls in its first batch: {command:"pwd",cwd:"/tmp"}, {command:"pwd",workdir:"/tmp"}, and {command:"pwd"}. It instructed a retry using workdir if the first call errored.

Observed tool result Baseline Candidate
cwd: "/tmp" /state/base/workspace, no tool error exec parameter "cwd" is unsupported; use "workdir" instead
workdir: "/tmp" control /tmp /tmp
Plain exec control /state/base/workspace /state/cand/workspace
Model's recovery after error Not applicable Retried with workdir: "/tmp"; result /tmp

Candidate completed its final answer in three real provider calls, accurately describing the error and recovery (four tool calls, one expected tool failure). Baseline used one real provider call and completed all three tools without error. Its next model request was deliberately stopped by the proxy's call budget after capturing those results; the resulting terminal budget error is a fixture stop, not an exec failure.

Focused regression: node scripts/run-vitest.mjs src/agents/bash-tools.exec.path.test.ts --maxWorkers=1 passed all 11 cases on candidate (22.18s total wall, 8.34s Vitest; new case 10ms). With the baseline production guard and unchanged regression, exactly the new case failed: the promise resolved, command output was ok, exit code 0, cwd /work; the other 10 passed (19.18s total wall). An initial test setup raced build output generation; serializing after the build resolved that fixture issue before any tests ran.

Both builds produced runnable Gateway artifacts. Both also reported the same unrelated Control UI startup-JS size violation (candidate 372758 B, baseline 372768 B, limit 372347 B); neither touched file participates in the browser bundle. git diff --check passed. No project-wide test/lint run was performed. Task containers, build/install volume and temporary credential were removed after proof.

The earlier contributor evidence below applies to its recorded original SHA, not the integrated candidate above.


Closes #154309

What Problem This Solves

A caller that tells the exec tool where to run — {"command":"python3 scripts/studio_space_page_edit.py …","cwd":"/…/skills/studio-space-manager"} — was silently answered from the tool's default directory. The schema declares workdir, not cwd; undeclared keys are accepted and then dropped, so the command ran in the session default and its failure surfaced as a path the caller never named:

python3: can't open file '/home/…/.openclaw/workspace/scripts/studio_space_page_edit.py': [Errno 2] No such file or directory
(Command exited with code 2)

cwd is a trap rather than a typo: it is the name of the tool's own default-working-directory option (createExecTool({ cwd })), just never a model-facing parameter — so a caller reading the tool surface reaches for it. git log -S 'cwd:' over the exec schema is empty; it was never declared.

Precedent: #119874 (fix(exec): make timeout unit explicit) established this exact guard for the other silently-dropped exec name.

Why This Change Was Made

assertSupportedExecParams already owns "this exec parameter name is unsupported" and rejects the retired timeout with 'exec parameter "timeout" is unsupported; use "timeoutSeconds" instead' (src/agents/bash-tools.exec-request-preparation.ts:69, added in #119874). This extends that same guard to cwd, naming the declared parameter:

if (Object.hasOwn(args, "cwd")) {
  throw new ToolInputError('exec parameter "cwd" is unsupported; use "workdir" instead');
}

The guard runs at both real entries — execute (src/agents/bash-tools.exec-run.ts:196) and prepareBeforeToolCallParams (src/agents/bash-tools.exec-request-preparation.ts:299) — so the call fails before any process is spawned. No new validator, option, configuration, dependency, or validation layer. The only input whose outcome changes is the one whose working-directory selector was already being dropped; unrelated model-added keys stay tolerated.

Production LOC is +10/-1 in one file.

Classification: behavior-preserving (a command that ran in the wrong directory becomes an explicit input error; every declared parameter behaves exactly as before)

User Impact

A caller that omits cwd sees no change: the command still runs in the tool default and the declared workdir still selects the directory — the control below pins that on both base and head, and the 43 pre-existing cases in bash-tools.exec.path.test.ts pass on both. A caller that passes cwd now gets an actionable error naming workdir on the first attempt, instead of a command that ran somewhere it did not choose (creating or overwriting files there) and reported a path it never named.

Evidence

Exact-head proof receipt

  • Product head SHA: 938c5873af3e00a2b80dfa35823c963cf0237c9f
  • Current-main base: c729f693d3fe657782928fe055f9c86853a1d2be
  • Production entry: the production exec tool from createExecTool({host:"gateway", security:"full", ask:"off", cwd:<tool default>}), driven through its real execute() on two real working directories
  • Production entry (real provider hop): the real OpenAI Responses transport (createOpenAIResponsesTransportStreamFn()) posts over a real loopback HTTP socket, then the real runAgentLoop resolves the exec tool, assembles and validates its arguments, and calls the real execute(). Only the provider response tokens are scripted; the wire path, argument assembly, validation, and the tool entry are production code. This also rules out the failure mode where some argument-normalization layer strips the undeclared key before the guard sees it.
  • Canonical owner exercised: assertSupportedExecParams in src/agents/bash-tools.exec-request-preparation.ts:69 (new branch at :82), reached from execute at src/agents/bash-tools.exec-run.ts:196
  • Decision surface: the cwd key on any exec call
  • Recorder/readback boundary: whether execute() rejects; the tool-result text and isError; and the observable side effect of the command itself (pwd, cat marker.txt, and whether echo RAN > ran.txt created a file)
  • Acceptance RED: base production + the harness → Tests 2 failed | 1 passed (3), exit 1. The command ran in the tool default (/…/default-cwd), created ran.txt there, and reported cat: marker.txt: No such file or directory; the real hop delivered that same text with isError:false
  • Acceptance GREEN: exact head + the same harness bytes → Tests 3 passed (3), exit 0. Both cwd entries throw exec parameter "cwd" is unsupported; use "workdir" instead, no ran.txt is created, and the real hop delivers the message with isError:true
  • Unit lane RED: base production blob + committed test blob → Tests 1 failed | 43 passed (44), the single failure being the new case
  • Unit lane GREEN: exact head → Tests 44 passed (44)
  • Legal control: the declared workdir still selects the intended directory on both base and head (pwd = the intended directory, marker read back), so the guard is not a general unknown-key rejection
  • Cleanup: the shared remote checkout was restored to byte-identical base blobs (c1c4e3612cde3a6ab59b0aa450305900, 95e4ac762b67c3f57e3555e39fef3905); the temporary harness was deleted; no Gateway, session, token, or config was touched

Inspectable RED -> GREEN terminal trace

Node v24.18.0, in the repo's test container. The verified bytes are the committed blobs
(b6264b8ad0f30bf5309433ce6e29203c, 485a2a77f54bb98cd177d64e6cb5b93c); the temporary harness
(c1ee41aa80026ee059e08dd9ba311dd4) was byte-identical for the RED and GREEN runs.

$ # base production blob c1c4e3612cde3a6ab59b0aa450305900 + harness c1ee41aa80026ee059e08dd9ba311dd4
$ node scripts/run-vitest.mjs run src/agents/zz-exec-cwd-proof.test.ts
{ "case": "direct real exec tool",
  "outcome": { "kind": "resolved",
    "text": "…/default-cwd\ncat: marker.txt: No such file or directory\n\n(Command exited with code 1)" },
  "ranFileCreatedInToolDefault": true }
{ "case": "legal control: declared workdir",
  "text": "…/intended-cwd\nINTENDED_MARKER_9F3E2D" }
{ "case": "real agent loop over provider HTTP", "providerRequests": 2,
  "toolResultText": "…/default-cwd\ncat: marker.txt: No such file or directory\n\n(Command exited with code 1)",
  "toolResultIsError": [ false ],
  "ranFileCreatedInToolDefault": true }
 Test Files  1 failed (1)
      Tests  2 failed | 1 passed (3)
[test] FAILED (exit 1)
$ # exact-head production blob b6264b8ad0f30bf5309433ce6e29203c + the same harness bytes
$ node scripts/run-vitest.mjs run src/agents/zz-exec-cwd-proof.test.ts
{ "case": "direct real exec tool",
  "outcome": { "kind": "threw",
    "message": "exec parameter \"cwd\" is unsupported; use \"workdir\" instead" },
  "ranFileCreatedInToolDefault": false }
{ "case": "legal control: declared workdir",
  "text": "…/intended-cwd\nINTENDED_MARKER_9F3E2D" }
{ "case": "real agent loop over provider HTTP", "providerRequests": 2,
  "toolResultText": "exec parameter \"cwd\" is unsupported; use \"workdir\" instead",
  "toolResultIsError": [ true ],
  "ranFileCreatedInToolDefault": false }
 Test Files  1 passed (1)
      Tests  3 passed (3)
[test] PASSED (exit 0)
$ # base production blob c1c4e361… + committed test blob 485a2a77…
$ node scripts/run-vitest.mjs run src/agents/bash-tools.exec.path.test.ts
 FAIL  … > rejects the unsupported cwd alias before command execution
 Test Files  1 failed (1)
      Tests  1 failed | 43 passed (44)
[test] FAILED (exit 1)
$ # exact-head production blob b6264b8a… + committed test blob 485a2a77…
$ node scripts/run-vitest.mjs run src/agents/bash-tools.exec.path.test.ts
 Test Files  1 passed (1)
      Tests  44 passed (44)
[test] PASSED (exit 0)

BEFORE / AFTER

BEFORE (base c729f693d) AFTER (head 938c5873a)
exec {command, cwd} resolved; command ran in the tool default throws exec parameter "cwd" is unsupported; use "workdir" instead
Command side effect ran.txt created in the wrong directory nothing runs; no file created
Real-hop model view wrong-directory output, isError:false guard message, isError:true
exec {command, workdir} runs in the chosen directory runs in the chosen directory (unchanged)
exec {command} runs in the tool default runs in the tool default (unchanged)

Impact surface

File:line Surface Risk
src/agents/bash-tools.exec-request-preparation.ts:69 exec parameter admission guard (assertSupportedExecParams) Rejects only the undeclared cwd key before isRecord-shaped args continue; declared parameters take the same path as before
src/agents/bash-tools.exec-run.ts:196 execute entry Guard runs before any process is spawned or approval work begins
src/agents/bash-tools.exec-request-preparation.ts:299 prepareBeforeToolCallParams Same guard on the before-tool-call preparation path

Verification

  • node scripts/run-vitest.mjs run src/agents/bash-tools.exec.path.test.ts — RED 1 failed | 43 passed (44), GREEN 44 passed (44) on the remote host
  • Real provider HTTP hop, end-to-end: RED (wrong-directory execution delivered as isError:false) → GREEN (exec parameter "cwd" is unsupported; use "workdir" instead with isError:true), same harness bytes both runs
  • Sibling exec suites on exact head: bash-tools.exec-timeout-seconds.test.ts 13 passed (the precedent's own file); bash-tools.exec.script-preflight.test.ts 69 passed | 4 skipped
  • node scripts/run-tsgo.mjs -p tsconfig.core.json — 14 diagnostics, none in either changed file; cause and owning fix are identified in Typecheck reconciliation below
  • git diff --check origin/main...HEAD — clean
  • Not tested: the provider is a loopback mock speaking the real wire protocol, so no external model or credential was exercised and the response tokens are scripted rather than sampled from a live model. The prepareBeforeToolCallParams call site runs the same guard function but was not separately driven end-to-end. The occurrence count comes from one operator's local transcript store (not shareable) covering an older installed build: 1 of 7,459 recorded exec calls carried cwd, and none of them also sent workdir. That is a small footprint, so treat this as a contract fix validated by the reproduction rather than a high-frequency field bug. All samples came from a single model id (Qwen3-235B-A22B). The schema and both call sites were re-checked against current main. The shape is re-checkable structurally: for each assistant toolCall with name="exec", test arguments.hasOwnProperty("cwd").

Focused-suite and CI timing (measured 2026-09-21)

  • Focused suite at exact head 938c5873a: node scripts/run-vitest.mjs run src/agents/bash-tools.exec.path.test.ts → 44 passed (44), exit 0, Node v24.18.0 in the repo test container. Vitest reported Duration 48.23s (transform 80%, tests 13%, import 4%, worker 2%); the shard reported 54.56s; measured wall clock 55.53s (55,530 ms).
  • Exact-head production CI for 938c5873a: 241 check runs — 187 success, 53 skipped, 1 neutral, 0 failures; pipeline 2026-09-21T01:25:32Z → 2026-09-21T02:33:15Z (67.7 min). Authoritative production typecheck check-prod-types (job 106185326707) success in 187s; also check-test-types 340s, check-test-types-core-1 541s, check-test-types-core-2 508s, preflight 42s, openclaw/ci-gate success.

Typecheck reconciliation: the 14 tsconfig.core.json diagnostics

node scripts/run-tsgo.mjs -p tsconfig.core.json reports 14 diagnostics (162.9s) on the shared proof host. Neither changed file appears in them. All 14 come from three files that do not exist at the reviewed head 938c5873a or on main (21273684d49 when re-checked) and had been synced to that host from other, still-unmerged branches:

File (absent at 938c5873a and main) Diagnostics Introduced by
src/agents/subagents/registry/subagent-registry-restart-recovery-accepted.ts 12 18f1c117e6a (#153243)
src/gateway/chat-display-projection.message-tool.ts 1 c7bf1ab2303 (#150694)
src/gateway/control-ui-github-preview.ts 1 a46de01a4a5 (#148464)

Every one is the same half-synced pair: the newer file imports exports the host's older siblings lack (resolveInternalSessionEffectsTarget, confirmAcceptedRecoveryResumption, settleAcceptedRecoverySession, shouldConfirmAcceptedRecoveryResumption, ControlUiGitHubPreview) or reads members the host's older types do not declare (clearAcceptedRecovery, clearPendingNotice, getRun, replaceRun, resumeAcceptedRecovery, resumptionNotice, target, status: "accepted"). That is a partially-synced proof-host checkout — the same class as that host also missing extensions/workboard/src/sqlite-store.ts — not a repository baseline and not attributable to this PR.

Owning fix: the shared proof host's tree, not this change. Replace that host with a complete checkout at the reviewed revision before typechecking there; the authoritative typecheck for this head is CI's check-prod-types, which checks out 938c5873a and installs from its lockfile (success in 187s, above).

Scope and risk

  • Production LOC: +10/-1 in one file (src/agents/bash-tools.exec-request-preparation.ts)
  • Test LOC: +13/-0 in one file (src/agents/bash-tools.exec.path.test.ts)
  • Existing-solutions preflight: extends the merged assertSupportedExecParams guard from fix(exec): make timeout unit explicit #119874 rather than adding a check; reuses the repo's isRecord and ToolInputError owners; adds no new abstraction
  • Config/default, protocol/schema, authorization, storage, migration, upgrade impact: none
  • Behavior change: a call that previously ran in the wrong directory now fails loudly before execution. This is intentional and is the point of the change.
Maintainer edits

The alternative shape is to alias cwd to workdir and honor it. I chose rejection because #119874 already made that call for the sibling name on this same tool (timeout is rejected rather than aliased to timeoutSeconds), and because a second spelling for "where to run" is how the silent wrong-directory execution arose. If you prefer the alias, the change is this branch rewritten to assign args.workdir ??= args.cwd before workdir resolution — but the guard would then have to state which names it accepts for every other parameter too.

Scope note

This PR is not linked to an issue: the defect was found by diffing recorded model tool calls against the tool schemas the runtime actually compiled into the prompt, not from a report. I checked before writing it: no open issue describes exec dropping cwd, and no open PR touches bash-tools.exec-request-preparation.ts, bash-tools.schemas.ts, or bash-tools.exec-run.ts. Say the word and I will file an issue carrying this evidence if you want the bug tracked separately.

@clawsweeper

clawsweeper Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS labels Sep 21, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 21, 2026
@clawsweeper

clawsweeper Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 2, 2026, 12:11 AM ET / 04:11 UTC (Revision 4).

ClawSweeper review

What this changes

The exec tool rejects the unsupported cwd argument with guidance to use workdir, with a regression test for that error.

Merge readiness

✅ Ready for maintainer review

This PR remains necessary: current main and the latest release still silently ignore cwd. The focused repair has convincing exact-head runtime proof, and no introduced correctness or security defect was found.

Priority: P2
Reviewed head: ac8d3b81a2512c483069f0c1d892bf30b8676b9e

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, correct repair with strong real-runtime proof and an original-failing regression.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): At the exact integrated head, built Gateway and openclaw agent execution with a real OpenAI model reaches the changed exec guard, returns the cwd error, and recovers successfully through workdir; real directory controls remain unchanged. Earlier production-process traces also show rejection without the command’s side effect. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): At the exact integrated head, built Gateway and openclaw agent execution with a real OpenAI model reaches the changed exec guard, returns the cwd error, and recovers successfully through workdir; real directory controls remain unchanged. Earlier production-process traces also show rejection without the command’s side effect. No stored-data contract changes.
Evidence reviewed 10 items Verified introduced patch: The pinned base-to-head delta adds cwd rejection to the existing argument guard and one execution-entry regression. The early isRecord return preserves the existing required and timeout checks.
Production boundary: execute calls the guard at line 199 before argument normalization, approvals, environment preparation, or dispatch. prepareBeforeToolCallParams independently invokes the same guard. The workdir resolver consumes workdir and the tool-level defaultCwd, never a caller-supplied cwd.
Existing supported contract: The exec schema declares workdir and omits cwd; the exec documentation identifies workdir as the command directory selector. This repair extends existing validation rather than creating another directory-selection API.
Findings None None.
Security None None.

How this fits together

OpenClaw’s exec tool turns agent requests into shell commands on the selected execution host. Request preparation validates arguments before directory resolution, approvals, and process launch.

flowchart TD
  A[Agent exec request] --> B[Argument validation]
  B --> C{Unsupported cwd supplied}
  C -->|Yes| D[Error naming workdir]
  C -->|No| E[Resolve directory and approvals]
  E --> F[Launch command]
  F --> G[Return command result]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +9, Tests +13. Total +22 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 12 3 +9
Tests 1 13 0 +13
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 25 3 +22

Review metrics

None.

Technical review

Best possible solution:

Keep one documented directory selector, workdir, and reject cwd before a command can run in an unintended directory.

Do we have a high-confidence way to reproduce the issue?

Yes: current main ignores a caller-supplied cwd while resolving the directory from workdir or the tool default, and the recorded baseline runtime demonstrates that outcome. This read-only review did not execute a reproduction.

Is this the best way to solve the issue?

Yes: extending the existing unsupported-argument guard is a narrow repair that preserves declared parameters and gives the model a proven recovery path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 2e705107ff26.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This fixes a demonstrated, low-frequency argument mismatch that otherwise executes commands in the wrong directory.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): At the exact integrated head, built Gateway and openclaw agent execution with a real OpenAI model reaches the changed exec guard, returns the cwd error, and recovers successfully through workdir; real directory controls remain unchanged. Earlier production-process traces also show rejection without the command’s side effect. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. At the exact integrated head, built Gateway and openclaw agent execution with a real OpenAI model reaches the changed exec guard, returns the cwd error, and recovers successfully through workdir; real directory controls remain unchanged. Earlier production-process traces also show rejection without the command’s side effect. No stored-data contract changes.

Evidence

What I checked:

  • Verified introduced patch: The pinned base-to-head delta adds cwd rejection to the existing argument guard and one execution-entry regression. The early isRecord return preserves the existing required and timeout checks. (src/agents/bash-tools.exec-request-preparation.ts:71, ac8d3b81a251)
  • Production boundary: execute calls the guard at line 199 before argument normalization, approvals, environment preparation, or dispatch. prepareBeforeToolCallParams independently invokes the same guard. The workdir resolver consumes workdir and the tool-level defaultCwd, never a caller-supplied cwd. (src/agents/bash-tools.exec-run.ts:199, ac8d3b81a251)
  • Existing supported contract: The exec schema declares workdir and omits cwd; the exec documentation identifies workdir as the command directory selector. This repair extends existing validation rather than creating another directory-selection API. (src/agents/bash-tools.schemas.ts:28, ac8d3b81a251)
  • Current main still needs the fix: At the fetched main revision, assertSupportedExecParams checks required and timeout but has no cwd rejection. (src/agents/bash-tools.exec-request-preparation.ts:71, 2e705107ff26)
  • Latest-release check: The v2026.9.7 source also rejects timeout without rejecting cwd. Local release-blob inspection failed because the blob was unavailable; the GitHub contents API supplied the release source successfully. (src/agents/bash-tools.exec-request-preparation.ts, c074824a27c9)
  • Exact-head real behavior proof: The captured PR body, SHA-256 61e29e6ab40b85bd01ededdb86297f9b93cb000f71436cc2f0a9bb404d391927, records built Gateway and openclaw agent execution with a real OpenAI model and real pwd processes in isolated Docker profiles. Baseline cwd ran in the default workspace; candidate cwd returned the intended error, the model retried successfully with workdir, and workdir/plain-exec controls retained their behavior. The complete live body matched the captured hash, and omitted ranges were inspected. Earlier real-process evidence additionally records absence of the command’s marker file after rejection. (ac8d3b81a251)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Marvinthebored: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (3 earlier review cycles)
  • reviewed 2026-09-21T01:33:21.065Z sha 938c587 :: needs changes before merge. :: none
  • reviewed 2026-09-21T02:45:01.123Z sha 938c587 :: needs changes before merge. :: none
  • reviewed 2026-09-21T12:58:35.619Z sha 938c587 :: needs maintainer review before merge. :: none

@wangmiao0668000666

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@wangmiao0668000666

Copy link
Copy Markdown
Contributor Author

Re-verified against main@43d35bd4ca1.

  • The defect is still present: assertSupportedExecParams in src/agents/bash-tools.exec-request-preparation.ts still rejects only timeout, so a caller-supplied cwd is dropped by the schema and the command runs in the tool default.
  • This branch's net diff replays onto 43d35bd4ca1 with no conflicts, and oxlint is clean on the touched files.
  • Current head 938c5873af3 is unchanged: ClawSweeper is ready at this exact head, every check is green, and GitHub reports the PR mergeable — nothing is pending on our side.

@obviyus

obviyus commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@obviyus
obviyus merged commit cc618e0 into openclaw:main Oct 2, 2026
117 checks passed
@obviyus

obviyus commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

Landed as cc618e0. Thanks @wangmiao0668000666!

@wangmiao0668000666

Copy link
Copy Markdown
Contributor Author

Thanks @obviyus for the review and the merge! Really appreciate you taking the time to verify this one before landing it.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 3, 2026
… the default directory (openclaw#154248)

Fixes openclaw#154309.

The exec tool now rejects an unsupported `cwd` argument with a hint to use `workdir`, instead of silently running in the workspace default.

Proof: real isolated Gateway with real OpenAI. On main an exec call with `cwd=/tmp` printed the workspace path with no error; with this change the call returns the `workdir` hint, the model retries with `workdir`, and the command prints `/tmp`. Explicit `workdir` and plain exec are unchanged. Regression test fails on main and passes here.

Co-authored-by: Ayaan Zaidi <[email protected]>
@wangmiao0668000666
wangmiao0668000666 deleted the fix/exec-cwd-unsupported branch October 28, 2026 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: exec silently ignores the unsupported cwd parameter and runs in the default directory

2 participants