Skip to content

[bug]: Switching back to a task always focuses the terminal drawer #2930

Description

@kchung

Bug Description

When a task has the terminal drawer open alongside an agent conversation, re-entering the task always focuses the drawer terminal, regardless of where focus was when you left. If you were typing in the chat composer, switching away and back sends your next keystrokes to the shell instead.

Steps to Reproduce

  1. Open a task and start an agent conversation
  2. Open the terminal drawer
  3. Click into the chat composer
  4. Switch to another task, then switch back

Actual vs Expected Behavior

Actual: focus lands in the drawer terminal on every task re-entry, and typing goes to the shell.

Expected: focus returns to whatever was focused when leaving the task. The drawer should only regain focus if that is where you left off.

emdash Version

1.1.40

Operating System

macOS 26.5

Additional Context

Both the drawer terminal and the chat composer autofocus when a task becomes active, and the terminal wins the race. Nothing records which region (main panes vs drawer) was focused on the way out, so there is nothing to restore.

Screen.Recording.2026-07-20.at.3.11.53.PM.mov

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions