#my main agent keeps openning the new session to spawn the sub-agent
1 messages · Page 1 of 1 (latest)
Sub-agents always run in a new internal session (agent:<agentId>:subagent:<uuid>). So seeing “it opened a new session to spawn a sub-agent …” is usually expected behavior, not a bug—your main chat session shouldn’t be replaced; the sub-agent just runs elsewhere and then “announces” back to the original channel.
What you can change depends on what you mean by “problem”:
1) If the debuggy/internal line is showing up in chat
That normally happens when verbose or reasoning is enabled for that session.
In the Discord chat where you see it, run:
/verbose off/reasoning off
To make it default-off in config, ensure you have (in ~/.openclaw/openclaw.json):
{
agents: {
defaults: {
verboseDefault: "off",
},
},
}
Docs: https://docs.openclaw.ai/help/faq#how-do-i-stop-internal-system-messages-from-showing-in-chat
2) If it’s creating new Discord threads/channels (not just internal sessions)
Then the agent is likely using Discord “threads” actions. Disable thread actions:
{
channels: {
discord: {
actions: {
threads: false,
},
},
},
}
Docs: https://docs.openclaw.ai/channels/discord
3) If you simply don’t want sub-agents at all
Deny the sessions_spawn tool for that agent:
{
agents: {
defaults: {
tools: {
deny: ["sessions_spawn"],
},
},
},
}
Docs: https://docs.openclaw.ai/tools/subagents
If you paste:
openclaw --version- a screenshot (or a couple lines) showing what exactly happens (new internal session vs new Discord thread/channel)