Skip to content

fix(openclaw): separate task cwd from agent workspace in system prompt#2260

Merged
btc69m979y-dotcom merged 1 commit into
release/2026.7.1from
fix/openclaw-task-cwd-system-prompt
Jul 3, 2026
Merged

fix(openclaw): separate task cwd from agent workspace in system prompt#2260
btc69m979y-dotcom merged 1 commit into
release/2026.7.1from
fix/openclaw-task-cwd-system-prompt

Conversation

@btc69m979y-dotcom

Copy link
Copy Markdown
Collaborator

Summary

  • add a version-scoped OpenClaw patch that passes the task runtimeCwd through normal runs and compaction
  • replace the legacy single-workspace prompt with explicit task-directory and agent-workspace roles only when those paths differ
  • preserve persistent memory/profile writes in the agent workspace, existing sandbox behavior, and prompt-cache isolation
  • document the source/community research and add patch contract plus strong source-sentinel validation

Verification

  • npm test -- taskCwdSystemPrompt
  • npm run compile:electron
  • npx eslint --ext ts,tsx --report-unused-disable-directives --max-warnings 0 src/main/libs/openclawPatches/taskCwdSystemPrompt.test.ts
  • OpenClaw targeted Vitest: 3 files, 96 tests passed
  • OpenClaw oxfmt --check on the 7 touched source/test files
  • reverse git apply --check against the locally applied OpenClaw source

Electron / OpenClaw impact

This changes the bundled OpenClaw system prompt after the runtime is rebuilt. It does not change IPC, SQLite, OpenClaw config shape, workspace locations, or memory-flush storage behavior.

The full patch-reset command was not run because the sibling OpenClaw checkout contains unrelated uncommitted work and that command resets the checkout. The generated patch was instead reverse-checked against the applied source and covered by LobsterAI source sentinels.

@btc69m979y-dotcom btc69m979y-dotcom merged commit f26c165 into release/2026.7.1 Jul 3, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant