How to Set Up Sub-Agents with Separate Workspaces in OpenClaw

A member of the OpenClaw community has discovered an elegant solution to a common problem: how to run sub-agents with entirely separate workspaces and different models.
The Problem
Many users have reported that default.subagents.model doesn't work as expected. This is because the schema for subagent defaults differs from the AgentEntity schema used in the agents list.
The Solution
The trick is to define your "main" agent in the agents list and use allowAgents to connect it to other agents you define. Each agent can have its own workspace and model configuration.
Example Configuration
"agents": {
"defaults": {
"model": {
"primary": "openai/gpt-5.2",
"fallbacks": []
},
"workspace": "/home/linux/.openclaw/workspace",
"maxConcurrent": 4,
"subagents": {
"maxConcurrent": 8
}
},
"list": [
{
"id": "main",
"name": "Main Agent",
"subagents": {
"allowAgents": ["developer-agent"]
}
},
{
"id": "developer-agent",
"name": "Developer Agent",
"workspace": "/home/linux/.openclaw/workspace.developer",
"model": {
"primary": "openai/gpt-5.2-codex"
}
}
]
}
Key Benefits
- Each sub-agent gets its own isolated workspace
- Different models can be assigned to different agents
- Clean separation between main and specialized tasks
- Explicit control over which agents can spawn which sub-agents
Source: r/openclaw community
📖 Read the full source: www.reddit.com
👀 See Also

OpenClaw 5.28: Codex Plugin Broken After Upgrade — Fix with Symlink Shim
OpenClaw 5.28 breaks Codex plugin due to binary path mismatch. Fix: create symlink from expected path to actual bin/codex.

OpenClaw Pre-Launch Checklist for Security and Reliability
A Reddit user shares a practical six-point checklist for OpenClaw setup before going live, covering access control, safety rules, memory management, automation testing, delivery validation, and failure handling.

Claude Certified Agent Foundations Exam Guide Discrepancies Identified
A recent CCA-F exam taker reports significant discrepancies between the official exam guide, practice exam, and actual test content. The real exam may include up to 13 scenarios while the guide only lists 6, and the practice exam covers just 4 of them.

Three-layer memory architecture for persistent OpenClaw agent context
A developer built a 3-layer memory system on top of OpenClaw's infrastructure to prevent agents from starting each session without context. The architecture includes L1 workspace files injected every turn, L2 semantic memory search, and L3 reference documents opened on demand.