Feature request: add a local /open slash command for URLs and workspace files in Codex CLI

Open 💬 2 comments Opened Jun 25, 2026 by thising

What variant of Codex are you using?

CLI

What feature would you like to see?

I would like Codex CLI to provide a built-in local /open slash command for explicitly opening URLs and local workspace paths with the system opener.

Suggested MVP behavior:

  • /open . opens the current session working directory.
  • /open <relative-or-absolute-path> opens a local file or directory.
  • /open <http-or-https-url> opens the URL in the system browser.
  • /open <file-url> resolves the local file:// URL and opens the target path.

This would be useful when Codex creates or references local artifacts during a session, such as generated HTML reports, images, screenshots, logs, Markdown files, or output directories. Today the user often has to leave the TUI or ask Codex to run a shell command such as open, xdg-open, or start, which adds friction and can unnecessarily involve the agent/tool execution flow.

The command should be a local user action, not a model turn. It should not submit a message to the model or mutate the conversation context.

Proposed safety and scope boundaries for the initial version:

  • Only run when explicitly invoked by the user through the slash command.
  • Do not execute shell strings; use argv or platform-native opener APIs to avoid shell injection.
  • Allow only local filesystem paths and http:// / https:// URLs by default.
  • Reject unsupported URL schemes with a clear error.
  • Treat remote workspace paths as out of scope for the MVP unless there is already a safe local mapping.
  • Do not try to infer “the current generated file” automatically in the MVP. A future follow-up could add /open recent or an artifact picker if Codex has a reliable artifact model for that.

Additional information

I searched for existing issues and PRs and did not find an existing Codex CLI /open slash command proposal or implementation.

Related but distinct:

  • #28209 asks for opening an image externally from Codex App. This proposal is for a CLI slash command, but the underlying workflow is similar: users want a direct way to open local artifacts created or referenced by Codex.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗