Cmd-K: treat an unmatched phrase as “New chat”

Open 💬 1 comment Opened Aug 22, 2026 by thedjpetersen

What variant of Codex are you using?

Unified ChatGPT/Codex desktop app

What feature would you like to see?

When text entered in the global Cmd-K menu does not immediately match a command or chat title, show a first-class row:

New chat: “typed phrase”

That row should be selected by default. Pressing Enter should:

  1. close the command menu;
  2. create/open a new chat in the current host/project context; and
  3. prefill the new chat composer with the typed phrase (do not auto-send it).

“Immediately match” should mean the synchronous command/title metadata results already available in memory. A later asynchronous content-search result should not steal selection after the user has committed to New chat.

This makes Cmd-K useful as both navigation and quick creation, and gives an instant path when history content search is slow.

Additional information

Current build inspected: 26.803.61601 (6396), macOS.

Today, unmatched input ends in a disabled “No matches” state. There is a “Create chat” affordance only when history is empty, not for an ordinary unmatched query.

Related performance issue: #20864. Cmd-K enables rollout content search at character 3, so making New chat depend only on immediate command/title matches also gives users a responsive escape hatch while indexed/cancellable content search is implemented.

cc @thsottiaux

View original on GitHub ↗

1 Comment

thedjpetersen · 5 days ago

Implementation note from the shipped renderer:

  • stl already creates g = I0(), the new-conversation navigator.
  • I0/L0 accepts route state including prefillPrompt; other shipped flows call it with { prefillPrompt: text }.
  • The current no-result component utl() renders a disabled command item with value no chat matches and an empty onSelect.

The small UI change is therefore to pass close, startNewConversation: g, and the trimmed query into utl, make the item selectable, and handle selection with:

close();
startNewConversation({ prefillPrompt: query });

Suggested label: New chat: {query}. This also makes Enter do the expected thing once async search has settled with no results.

Related performance profile: https://github.com/openai/codex/issues/20864#issuecomment-5380420589