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

✍️ Reddit u/unknown📅 Published: February 8, 2026🔗 Source
How to Set Up Sub-Agents with Separate Workspaces in OpenClaw
Ad

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"
      }
    }
  ]
}
Ad

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

Ad

👀 See Also