Skip to content

Self-referential subagent IDs are rejected instead of creating a new child #45356

Closed as not planned

Description

@mjnaderi

Description

Some models echo the calling session's ID in subagent.sessionID while requesting a new subagent. The continuation path treats that ID as an existing session and rejects it because a session is not its own child.

Plugins

None

OpenCode version

V2

Steps to reproduce

  1. Start a session.
  2. Call subagent with a valid subagent agent, prompt, and description, but set sessionID to the calling session's ID.
  3. The call fails with Session <id> is not a child of the current session instead of creating a child session.

Screenshot and/or share link

Not applicable.

Operating System

Linux

Terminal

Not applicable.

Activity

  1. changed the title [-]Nested subagent sessions cannot be continued by their root session[/-] [+]Self-referential subagent IDs are rejected instead of creating a new child[/+] on Aug 26, 2026
  2. pedropombeiro commented on Sep 26, 2026

    @pedropombeiro

    See investigation in #51464

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions