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

Implementing a Recurring Meditation System for OpenClaw Agent Coherence
A developer shares a structured reflection system for OpenClaw agents using a specific file chain including meditations.md, reflections/*.md, and identity files. The nightly loop involves reviewing and appending to these files to promote insights into durable behavior changes.

Optimizing AutoResearch on RTX 5090: What Failed and What Worked
A developer shares specific configuration details for running AutoResearch on an RTX 5090/Blackwell setup, including failed approaches that appeared functional but performed poorly, and the working configuration that achieved stable results with TOTAL_BATCH_SIZE=2**17 and TIME_BUDGET=1200.

Mastering OpenClaw Skills: A Step-by-Step Guide
Unlock the full potential of OpenClaw with this comprehensive guide on building new skills. Learn key strategies to enhance your projects using AI coding agents.

Debugging OpenClaw + Ollama Local Model Timeouts: Five Fixes for Silent Failures
A developer identified five root causes for OpenClaw agents silently timing out with local Ollama models like Gemma 4 26B, including a blocking slug generator, a 38K character system prompt, and hidden timeouts. The fixes involve disabling hooks, modifying configs, and adjusting Ollama settings.