Skip to content

FEATURE: Per-agent subagents.workspace config #29372

Description

@kAIborg24

Summary

FEATURE — Subagent Workspace Override

───

Add an agents.list[].subagents.workspace config option that specifies the workspace directory for child sub-agents spawned by that agent. This would allow parent agents to isolate their default sub-agents without requiring each sub-agent to have its own agent profile.

Problem to solve

Use Case

Currently, default sub-agents (spawned without agentId) inherit the parent agent's workspace. If the parent's workspace contains sensitive files, all default sub-agents have access to that content via bootstrap file injection.

Proposed solution

Proposed Config

{
agents: {
list: [
{
id: "main",
workspace: "~/.openclaw/workspace",
subagents: {
workspace: "/opt/subagent",
allowAgents: ["worker", "research"]
}
}
]
}
}

This way, default sub-agents spawned by main would use /opt/subagent instead of inheriting ~/.openclaw/workspace.

Alternatives considered

No response

Impact

Benefits

• Clean workspace isolation for default sub-agents without extra agent profiles
• Reduces config complexity in multi-tier setups
• Prevents accidental exposure of parent workspace files to sub-agents

Evidence/examples

No response

Additional information

Environment

OpenClaw version: 2026.2.26

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.enhancementNew feature or requestimpact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions