Skip to content

[Codex] Add "New Thread from Selected Text" command #30825

Description

@bbnotcode

Extension

https://www.raycast.com/asifk/codex

OS Version

No response

Description

It would be very useful to add a new command such as:

New Thread from Selected Text

The Codex extension already supports:

  • New Thread with Prompt
  • New Thread from Clipboard

However, a very common workflow is to select some text in the current application (for example, Chrome, Safari, VS Code, Terminal, GitHub, or a PDF), press a global Raycast hotkey, and immediately send that selected text to Codex as a new thread.

The desired workflow would be:

  1. Select text in the frontmost application.
  2. Trigger "New Thread from Selected Text" using a Raycast hotkey.
  3. Raycast reads the selected text using getSelectedText().
  4. The extension creates a new Codex thread using the selected text as the prompt.
  5. Use the configured Default Working Directory, just like "New Thread from Clipboard".

Ideally, this command should work without showing an intermediate form, so it can be used as a fast global shortcut.

If no text is selected, it could either:

  • show a "No text selected" message, or
  • optionally fall back to clipboard text.

Who will benefit from this feature?

Users who frequently use Codex while browsing documentation, reading GitHub issues, debugging errors, reviewing code, or researching information.

For example:

  • Select an error message → hotkey → ask Codex to investigate it
  • Select code → hotkey → ask Codex to explain or review it
  • Select text on a webpage → hotkey → start a Codex research thread
  • Select a GitHub issue → hotkey → send it directly to Codex

This would make the extension much more useful as a system-wide Codex launcher and remove the extra copy → open Raycast → paste steps.

Anything else?

Raycast already provides the getSelectedText() API for retrieving selected text from the frontmost application:

https://developers.raycast.com/api-reference/environment#getselectedtext

A possible future enhancement could also allow users to configure an optional prompt prefix, for example:

"Research and explain the following:"
"Find a solution for this error:"
"Review the following code:"

But the basic "Selected Text → New Codex Thread" command alone would already be very useful.

Activity

  1. added
    feature request
    extension
    on Sep 6, 2026
  2. added theissue type on Sep 6, 2026
  3. added
    extension: codex
    on Sep 6, 2026
  4. raycastbot commented on Sep 6, 2026

    @raycastbot
    Collaborator

    Thank you for opening this issue!

    🔔 @asifk987 you might want to have a look.

    💡 Author and Contributors commands

    The author and contributors of asifk/codex can trigger bot actions by commenting:

    • @raycastbot close this issue Closes the issue.
    • @raycastbot close as not planned Closes the issue as not planned.
    • @raycastbot close as duplicate Closes the issue as duplicate.
    • @raycastbot rename this issue to "Awesome new title" Renames the issue.
    • @raycastbot reopen this issue Reopens the issue.
    • @raycastbot assign me Assigns yourself to the issue.
    • @raycastbot good first issue Adds the "Good first issue" label to the issue.
    • @raycastbot keep this issue open Make sure the issue won't go stale and will be kept open by the bot.
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

    extensionextension: codexfeature request

    Fields

    Priority

    None yet

    Severity

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions