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 Multi-Agent Playbook: 7 Isolated Agents for 5/Month
Complete architecture guide for running specialized AI agents with focused memory, least-privilege permissions, and smart model routing.

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.

Building a Fully Local Multi-Agent Assistant with OpenClaw and Ollama
A developer shares their stack for a fully local personal AI assistant using OpenClaw and Ollama, including models qwen3.5:35b-a3b, gemma3:4b, mistral:7b, MCP servers for Home Assistant and Gmail, and a Telegram Bot interface.
