Summary
Problem
When spawning subagents via sessions_spawn, each subagent automatically receives ALL workspace files (AGENTS.md, SOUL.md, USER.md, MEMORY.md, HEARTBEAT.md, TOOLS.md, IDENTITY.md, etc.) as context — even when the subagent is doing a narrow, stateless task like scanning database rows or running shell commands.
There's no way to opt out of or scope the workspace injection.
Impact
For workflows that spawn many short-lived subagents (e.g., parallel audit workers, code fixers, data processors), the overhead adds up fast:
- Each subagent loads ~5-10k tokens of workspace context it never uses
- A typical audit cycle spawns 4-5 workers → 25-50k wasted tokens per cycle
- Running 10+ cycles per day → 250-500k tokens/day burned on irrelevant context
- On subscription-based plans (Claude Pro/Max), this directly eats into rate limits
Expected behavior
Ability to control what workspace context a subagent receives. Options could include:
- A
workspace: false or workspace: "none" flag on sessions_spawn to skip workspace injection entirely
- A
workspace: ["AGENTS.md"] allowlist to select specific files
- A
lightweight: true mode that skips personality/memory files and only injects essential runtime config
- Agent-level config in openclaw.json to define workspace scope per agent type
Current workaround
None. The injection is automatic and not configurable. The only option is to keep workspace files small, which conflicts with using them for memory/context (their intended purpose).
Environment
- OpenClaw 2026.3.22
- Subagents spawned via
sessions_spawn with runtime: "subagent"
=================================================================
So in short my agent spawns sub-agents for task like reading something and spawning 1 worker/theard per something
Instead of just giving instructions to worker like:
Do this and this here and here and tell me whats that and that
every time it sends whole memory,project etc. There should be option if we need to send soul etc to sub worker as if it have to do just small things and return X for main worker?
Problem to solve
Provided in summary
Proposed solution
Provided in summary
Alternatives considered
No response
Impact
Consumption of tokens
Evidence/examples
No response
Additional information
No response
Summary
Problem
When spawning subagents via
sessions_spawn, each subagent automatically receives ALL workspace files (AGENTS.md, SOUL.md, USER.md, MEMORY.md, HEARTBEAT.md, TOOLS.md, IDENTITY.md, etc.) as context — even when the subagent is doing a narrow, stateless task like scanning database rows or running shell commands.There's no way to opt out of or scope the workspace injection.
Impact
For workflows that spawn many short-lived subagents (e.g., parallel audit workers, code fixers, data processors), the overhead adds up fast:
Expected behavior
Ability to control what workspace context a subagent receives. Options could include:
workspace: falseorworkspace: "none"flag onsessions_spawnto skip workspace injection entirelyworkspace: ["AGENTS.md"]allowlist to select specific fileslightweight: truemode that skips personality/memory files and only injects essential runtime configCurrent workaround
None. The injection is automatic and not configurable. The only option is to keep workspace files small, which conflicts with using them for memory/context (their intended purpose).
Environment
sessions_spawnwithruntime: "subagent"=================================================================
So in short my agent spawns sub-agents for task like reading something and spawning 1 worker/theard per something
Instead of just giving instructions to worker like:
Do this and this here and here and tell me whats that and that
every time it sends whole memory,project etc. There should be option if we need to send soul etc to sub worker as if it have to do just small things and return X for main worker?
Problem to solve
Provided in summary
Proposed solution
Provided in summary
Alternatives considered
No response
Impact
Consumption of tokens
Evidence/examples
No response
Additional information
No response