GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Session does not automatically return to parent after subagent execution · Issue #6491 · anomalyco/opencode

Session does not automatically return to parent after subagent execution #6491

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
Session does not automatically return to parent after subagent execution#6491
Copy link
Assignees
thdxr

Description

@mossbergmaverick
mossbergmaverick
opened on Dec 31, 2025
Issue body actions

Description

When working with a subagent, the system correctly handles the transition to a child session (e.g., when permissions are required). However, once the child session's task is completed or permissions are granted, the focus remains in the child session.

Currently, the user has to switch back to the parent session manually every time, which creates significant friction and undermines the efficiency of using subagents.

Expected Behavior:
The session should automatically return to the parent context once the subagent's specific task or permission check is finished.

Actual Behavior:
The user stays stuck in the child session and must perform a manual switch to continue working in the parent session.

Additional Context:
This manual overhead defeats the purpose of a seamless subagent workflow. Ideally, the child session should be ephemeral or automatically yield back to the parent.

OpenCode version

1.0.218

Steps to reproduce

  1. Start a task in the parent session.
  2. Trigger an action that invokes a subagent (requiring a switch to a child session).
  3. Complete the required action/permission in the child session.
  4. Observe that the session remains in the "child" state instead of reverting.

Screenshot and/or share link

No response

Operating System

macOS Sonoma 15.7.3

Terminal

VSCode

Reacted by Abhirup Das and Jason Culligan

Activity

  1. mossbergmaverick
    added
    bugSomething isn't working
    on Dec 31, 2025
  2. github-actions
    assigned
    thdxr
    on Dec 31, 2025
  3. github-actions commented on Dec 31, 2025

    @github-actions
    github-actionsBot
    on Dec 31, 2025 – with GitHub Actions
    Contributor
    More actions

    This issue might be a duplicate of existing issues. Please check:

    • [FEATURE]: Navigation to parent session from child/subagent sessions #3291: [FEATURE]: Navigation to parent session from child/subagent sessions - Proposes keybindings to navigate between parent/child sessions
    • [FEATURE]: "session_child_return_to_parent": in keybinds #4432: [FEATURE]: "session_child_return_to_parent" in keybinds - Requests a keybind to return to parent session
    • [FEATURE]: make subagent visually more distinctive #5001: [FEATURE]: make subagent visually more distinctive - Notes that automatic switching to subagents for permissions is confusing
    • Primary agent responds in subagent view; delegated subagent views become inaccessible #4422: Primary agent responds in subagent view; delegated subagent views become inaccessible - Related issue with subagent session navigation problems

    Feel free to ignore if none of these address your specific case.

  4. rekram1-node commented on Dec 31, 2025

    @rekram1-node
    rekram1-node
    on Dec 31, 2025
    Member
    More actions

    Yeah thats a good point, subagent ux is being thought about more rn

    Reacted by mossbergmaverick
  5. diogosalazar commented on Dec 31, 2025

    @diogosalazar
    diogosalazar
    on Dec 31, 2025
    More actions

    I suspect this behavior might be a regression, but in any case, it creates a few critical issues:

    1. Security Risks: When focus shifts to the subagent's session, the permission scope changes, potentially allowing that session to spawn nested sub-sessions.
    2. Navigation Lock: There is no way to return to the parent session while a permission prompt is active.
    3. Race Condition: If the user presses Esc to stop the subagent, the primary agent might try to resume or recreate the subagent faster than the user can switch back to the parent context.
  6. thdxr commented on Mar 25, 2026

    @thdxr
    thdxr
    on Mar 25, 2026
    Member
    More actions

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

  7. thdxr
    removed
    bugSomething isn't working
    on May 3, 2026
  8. huornlmj commented on May 15, 2026

    @huornlmj
    huornlmj
    on May 15, 2026
    More actions

    Issue still present in version 1.14.50

  9. rekram1-node
    closed this as not plannedon May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @thdxr
    thdxr

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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.