Skip to content

Agents overview steals focus into prompt on startup and when returning with Left #44505

Description

@moodysalem

Version

codex-cli 0.154.0, Linux x86_64, shared persistent app-server. The same unconditional focus path remains on the current main branch.

Problem

The agents overview takes focus into the new-task prompt editor whenever it opens. This prevents immediate task-list navigation in two ordinary browsing flows:

  1. Run codex agents with existing tasks. The prompt editor is focused; task selection with navigation keys does not work until pressing Esc.
  2. Open a task, then use Left to return to the agents overview. Focus is forced into the prompt editor again, so another Esc is needed before navigating tasks.

The second case is especially disruptive: returning to a list should restore list navigation, not implicitly enter new-task composition.

Source-level diagnosis

In 0.154.0:

The observed behavior and the source agree; it does not appear to be terminal interception of navigation keys. This report does not claim an independently reproduced PTY test or identify an exact first bad release.

Expected behavior

  • Opening codex agents with existing tasks should focus the task list, allowing immediate selection.
  • Returning from a task with Left should restore list focus and retain the previous selection/scroll position.
  • Entering new-task composition should remain an explicit action; preserve unsent drafts without giving them focus merely because the overview is reopened.
  • An empty overview can reasonably focus the new-task composer.
  • Normal editor navigation should continue to work when the user deliberately focuses the composer.

Suggested regression coverage: initial overview with tasks, returning via Left, reopening after selecting another task, background refreshes, and preservation of a nonempty draft without unsolicited focus changes. Exercise both Vim and ordinary keymaps.

Related changes

#44360 changes Escape from the task list back to the composer, but does not fix the initial/re-entry focus choice. #44344 adds Right navigation but does not remove the unconditional focus reset.

No private task IDs, prompts, file paths, account details, or raw logs are included.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLITUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displayenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions