#my main agent keeps openning the new session to spawn the sub-agent

1 messages · Page 1 of 1 (latest)

glossy granite
#

what should I config to fix this problem?

rustic cloakBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

radiant sluiceBOT
# glossy granite what should I config to fix this problem?

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: {
#
      tools: {
        deny: ["sessions_spawn"],
      },
    },
  },
}

Docs: https://docs.openclaw.ai/tools/subagents


If you paste:

  1. openclaw --version
  2. a screenshot (or a couple lines) showing what exactly happens (new internal session vs new Discord thread/channel)