-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
tools.exec.pathPrepend is not applied to Codex app-server native exec PATH after config change #89837
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.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
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.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
Summary
tools.exec.pathPrependis documented/schema-described as directories to prepend to PATH for exec runs, but on OpenClaw 2026.5.28 it does not reach Codex app-server native shell execution. A config edit is detected, but fresh agent turns still run nativebash/exec_commandwith the old PATH.Observed
Config:
{ "tools": { "exec": { "host": "gateway", "pathPrepend": ["~/bin"] } } }Gateway log after edit:
No follow-up
config hot reload appliedorconfig change applied (dynamic reads: ...)line appears.A fresh
openclaw agentprobe using the Codex app-server native shell still shows PATH without the prepended directory, so bare script names in that directory fail to resolve.What I found
Two things look relevant in the built 2026.5.28 artifacts:
dist/config-reload-plan-*.jsclassifies the broadtoolsprefix askind: "none". For atools.exec.pathPrepend-only change,buildGatewayReloadPlan()returns a no-op plan, andserver-reload-handlers-*returns early before calling the hot-reload state setter. That explains the missing applied/dynamic-read log and stale in-memory config.The Codex app-server bridge only maps OpenClaw exec policy fields (
mode/security/ask) into Codex runtime options. I did not findtools.exec.pathPrependbeing merged intoappServer.start.env.PATHor otherwise projected to the Codex app-server process/thread. The normal OpenClaw exec tool code does applypathPrepend, but Codex app-server native shell execution inherits the app-server process PATH instead.Expected
For Codex app-server native exec runs, OpenClaw should either:
tools.exec.pathPrependby prepending those directories to the Codex app-server process/thread execution PATH, and restart/recreate the shared app-server client when the effective prepend changes; ortools.exec.pathPrependdoes not apply to Codex app-server native execution and provide the supported config surface for that PATH.Also, if
tools.exec.pathPrependis intended as dynamically read config, the reload path should still update active gateway state and logconfig change applied (dynamic reads: tools.exec.pathPrepend)rather than returning silently.