Skip to content

Spawning a subagent switches the parent to the subagent's tmux window #9

Description

@monneyboi

Problem

Calling spawn_agent opens the child pi session with tmux new-window, which selects the new window by default. The parent session is therefore switched away to the child's window on every spawn, disrupting the parent's context.

Expected behavior

Spawning a subagent should stay fire-and-forget: the new window should be created in the background and the parent should remain in its own window. The parent already receives the report asynchronously via the result socket, so there is no reason to focus the child.

Fix

Pass -d (--no-select) to tmux new-window in spawn() in index.ts, so the new window does not become the current window.

Metadata

Metadata

Assignees

No one assigned

    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