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

A Management Framework for Leading AI Agents Effectively
A former backend lead identifies a plateau in AI agent productivity and proposes a framework based on three disciplines: cybernetics, information theory, and management. The framework details two operational modes: the Captain and the Architect.

Methodology for Consistent Benchmarking of Local vs Cloud LLMs
A developer shares a measurement setup using sequential requests and rule-based scoring to compare local models (via llama.cpp, vLLM, Ollama) with cloud APIs (GPT-5.4, Claude Sonnet 4.6, Gemini 3.1 Pro) through a unified endpoint like ZenMux.

Automating OAuth Token Refresh for Bots Using Claude Code
A Reddit user shares a method to prevent OAuth token expiration by configuring Claude Code to automatically refresh tokens every 8 hours, keeping bots running continuously without manual intervention.

Fix for 'VM Service Not Running' error in Cowork on Windows 11
A Reddit user shares a PowerShell command fix for the 'VM Service Not Running' error in Cowork when Hyper-V is installed but the hypervisor isn't launching at boot. The solution involves checking hypervisorlaunchtype and setting it to auto.