You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attach resumed sessions in-process and add the agent view composer
Two changes that together close the gap with Claude Code's agent view UX:
In-process attach. The previous Enter→resume path forced the outer CLI to
tear down the TUI and re-exec into `codex resume --thread <id>`, paying the
full startup cost (~2s of perceived lag). Reuse the existing
`replace_chat_widget_with_app_server_thread` helper to swap chat widgets
inside the running App loop instead — the new `attach_resumed_thread_from_browser`
helper calls `app_server.resume_thread`, builds a `ChatWidgetInit` via the
existing `chatwidget_init_for_forked_or_resumed_thread` plumbing, swaps the
widget, and replays the rollout. Attach feels instantaneous now.
Inline composer in the agent view. The selected row is no longer the only way
to act on a session — there is a 3-line input pane at the bottom of the
browser. Typing builds up a draft; Enter resumes the highlighted session
with that draft as the first user message (carried through
`ResumeThreadFromBrowser.initial_prompt`); `Ctrl+N` exits and re-launches a
fresh session with the draft as the initial prompt; `Esc` clears a non-empty
draft (and only closes the view when empty); arrow keys still navigate the
list while composing, while `j`/`k`/`g`/`G`/`q` stop hijacking the alphabet
once a draft is in flight.
Plumbing: extend `AppExitInfo` with `resume_initial_prompt` and
`start_new_session`, plus matching `AppEvent::StartNewSessionFromBrowser` for
the Ctrl+N path, and propagate both through the cli/main.rs re-launch loop
(the resume re-launch path stays as a fallback even though it is no longer
the primary route).
Smoke-verified end-to-end: Left opens the full-screen view, typing
populates the composer, Enter resumes the highlighted session into the same
process and immediately renders the typed message as the first user turn,
codex begins working on it, no `color_spantrace::set_theme` crash.
Co-authored-by: Open Codex <hff582580@gmail.com>
0 commit comments