openclaw - 💡(How to fix) Fix Feature request: finer-grained FS permissions beyond tools.fs.workspaceOnly [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#58914Fetched 2026-04-08 02:31:14
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0

When an agent enables tools.fs.workspaceOnly: true, filesystem access becomes too coarse-grained: the agent cannot read files outside its workspace, even in legitimate cases where read-only access to shared/global paths is needed.

This can break practical workflows such as:

  • reading globally installed skills from ~/.agents/skills / ~/.openclaw/skills
  • accessing shared reference files outside the agent workspace
  • using multi-workspace setups where an agent needs safe read-only visibility into shared resources

Root Cause

workspaceOnly is a useful safety guard, but the current behavior is too binary for real multi-agent systems:

  • security wants narrow write scope
  • operations often need broader read scope

These two needs are different, but currently coupled.

Fix Action

Fix / Workaround

Right now, tools.fs.workspaceOnly appears to act as a single switch for:

  • read
  • write
  • edit
  • apply_patch

In practice this leads to awkward workarounds:

  • duplicating files into each workspace
  • copying shared skills into per-agent workspaces
  • disabling workspaceOnly entirely, which broadens both read and write access more than desired

The only workable workaround was to physically copy skill directories into the agent workspace.

Code Example

tools: {
  fs: { workspaceOnly: true }
}

---

tools: {
  fs: {
    workspaceOnlyWrite: true,
    workspaceOnlyRead: false,
  }
}

---

tools: {
  fs: {
    workspaceOnly: true,
    extraReadRoots: [
      "~/.agents/skills",
      "~/.openclaw/skills"
    ]
  }
}
RAW_BUFFERClick to expand / collapse

Summary

When an agent enables tools.fs.workspaceOnly: true, filesystem access becomes too coarse-grained: the agent cannot read files outside its workspace, even in legitimate cases where read-only access to shared/global paths is needed.

This can break practical workflows such as:

  • reading globally installed skills from ~/.agents/skills / ~/.openclaw/skills
  • accessing shared reference files outside the agent workspace
  • using multi-workspace setups where an agent needs safe read-only visibility into shared resources

Problem

Right now, tools.fs.workspaceOnly appears to act as a single switch for:

  • read
  • write
  • edit
  • apply_patch

So if we want to keep writes constrained to the workspace, but still allow narrowly scoped reads outside the workspace, there is no obvious built-in config for that.

In practice this leads to awkward workarounds:

  • duplicating files into each workspace
  • copying shared skills into per-agent workspaces
  • disabling workspaceOnly entirely, which broadens both read and write access more than desired

Real-world example

In a multi-agent OpenClaw setup, a researcher agent with:

tools: {
  fs: { workspaceOnly: true }
}

was unable to reliably use globally installed skills such as Tavily skills, because the agent could not safely access paths outside its own workspace. Using symlinks inside the workspace was also insufficient in some cases, because skill discovery validates resolved realpaths and rejects targets outside the configured root.

The only workable workaround was to physically copy skill directories into the agent workspace.

Why this matters

workspaceOnly is a useful safety guard, but the current behavior is too binary for real multi-agent systems:

  • security wants narrow write scope
  • operations often need broader read scope

These two needs are different, but currently coupled.

Suggested improvements

Consider introducing finer-grained filesystem controls, for example:

Option A: separate read/write policy

tools: {
  fs: {
    workspaceOnlyWrite: true,
    workspaceOnlyRead: false,
  }
}

Option B: extra read-only allowlist

tools: {
  fs: {
    workspaceOnly: true,
    extraReadRoots: [
      "~/.agents/skills",
      "~/.openclaw/skills"
    ]
  }
}

Option C: per-agent read-only mounts / allowed roots

A mechanism similar to sandbox binds / mounts, but specifically for FS tool read access and skill discovery.

Expected outcome

This would let operators:

  • keep writes strictly inside agent workspaces
  • allow safe read-only access to shared/global resources
  • avoid brittle duplication and symlink workarounds
  • improve multi-agent operability without weakening safety too much

Notes

This feels especially important for:

  • shared skill libraries
  • global prompt/resource stores
  • multi-agent knowledge or reference directories
  • deployments that intentionally separate workspaces for safety

extent analysis

TL;DR

Introduce finer-grained filesystem controls to decouple read and write access scopes, allowing for safe read-only access to shared resources while maintaining write constraints within agent workspaces.

Guidance

  • Consider implementing a separate read/write policy, such as workspaceOnlyWrite and workspaceOnlyRead, to provide more granular control over filesystem access.
  • Introduce an extra read-only allowlist, extraReadRoots, to specify paths that should be accessible for reading, even when workspaceOnly is enabled.
  • Explore per-agent read-only mounts or allowed roots, similar to sandbox binds, to provide a more flexible and secure way to manage read access to shared resources.
  • Evaluate the trade-offs between security, operability, and complexity when designing and implementing these finer-grained controls.

Example

tools: {
  fs: {
    workspaceOnlyWrite: true,
    workspaceOnlyRead: false,
    extraReadRoots: [
      "~/.agents/skills",
      "~/.openclaw/skills"
    ]
  }
}

Notes

The proposed solutions aim to address the limitations of the current workspaceOnly flag, but may require additional design and testing to ensure they meet the specific needs of multi-agent systems and shared resource access.

Recommendation

Apply a workaround by introducing an extra read-only allowlist, such as extraReadRoots, to provide a more flexible and secure way to manage read access to shared resources, while maintaining write constraints within agent workspaces. This approach allows for a more gradual and controlled introduction of finer-grained filesystem controls.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Feature request: finer-grained FS permissions beyond tools.fs.workspaceOnly [1 participants]