Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Mention at CodexNew to Visual Studio Code? Get it now.
Mention at Codex

Mention at Codex

lucasvtiradentes

| (0) | Free
Send VSCode file mentions into the linked Codex terminal with Cmd+Alt+K.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Mention at Codex

Press cmd+alt+k in VSCode and the current file, or the selected line range, appears as a Codex mention in your linked terminal.

Install

Marketplace install:

  • Install Mention at Codex from the VSCode Marketplace once a published slug exists.

Build from source:

  1. Run pnpm install.
  2. Run pnpm run build.
  3. Open the repo in VSCode.
  4. Press F5 to launch an Extension Development Host.

Usage

  1. Install the extension.
  2. Open a new terminal in VSCode after the extension activates.
  3. Run codex in that terminal.
  4. If prompted, run Mention at Codex: Setup Codex Integration.
  5. If it does not link immediately, send your first prompt in Codex.
  6. Wait for the status bar to show linked Codex.
  7. Press cmd+alt+k on macOS or ctrl+alt+k on Linux and Windows.

Mention output:

  • No selection: @path/to/file
  • Single-line selection: @path/to/file#L10
  • Multi-line selection: @path/to/file#L10-20

The mention is typed into Codex without pressing Enter. Focus moves to the linked Codex terminal.

How Linking Works

The extension injects MENTION_AT_CODEX_SESSION into new VSCode terminals. When Codex starts, its hook runs ~/.config/mention-at-codex/hook.js on macOS and Linux, or the matching %APPDATA%\\mention-at-codex\\hook.js path on Windows. It writes a small local handshake file there. The extension watches that folder, matches the process chain back to the right VSCode terminal, then keeps one linked Codex target in memory.

The extension asks before editing ~/.codex/hooks.json. It overwrites only its own integration entry and leaves other user hooks alone.

Switching The Linked Codex

Only one Codex terminal is linked at a time.

To switch the link while another Codex is still alive, type ide inside the Codex terminal you want to bind. That runs the global ide skill and triggers a manual rebind.

Caveats

  • Node.js must be available on PATH.
  • Codex sessions that were already running before the extension injected the session env var cannot auto-link. Restart Codex in a new terminal after enabling the extension.
  • Unusual wrapper stacks such as tmux, direnv, nested shells, or similar tooling may confuse the PID walker. The hook captures up to 6 parent hops and prefers name-based Codex detection, but edge cases can still happen. If they do, run node resources/hook.js session-start and include the output in an issue.
  • Untitled files are intentionally ignored until saved.

Privacy

Everything stays on your machine.

  • The extension writes ~/.codex/hooks.json only after asking.
  • Handshake files live in ~/.config/mention-at-codex/.
  • The hook writes handshake files with mode 0600 where the OS supports it.

Commands

  • Mention at Codex: Insert At-Mentioned
  • Mention at Codex: Setup Codex Integration
  • Mention at Codex: Uninstall Codex Integration
  • Mention at Codex: Show Logs

Uninstall

  1. Run Mention at Codex: Uninstall Codex Integration.
  2. Uninstall the extension from VSCode.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft