nikivdev/code · error

open/resolve is only supported for Codex sessions; use `f co

Error message

open/resolve is only supported for Codex sessions; use `f codex ...`

What it means

Raised when the `open` or `resolve` action is dispatched under the Claude provider branch in run() (src/ai.rs:809-811). Both actions operate on Codex session rollout files/internals and are not implemented for Claude sessions, so the match arm bails with a pointer to the Codex subcommands. Nothing is partially executed; it is a pure pre-execution guard.

Source

Thrown at src/ai.rs:810

            Some(ProviderAiAction::List) => list_sessions(Provider::Claude)?,
            Some(ProviderAiAction::LatestId { path }) => {
                print_latest_session_id(Provider::Claude, path)?
            }
            Some(ProviderAiAction::Sessions { path, json }) => {
                provider_sessions(Provider::Claude, path, json)?
            }
            Some(ProviderAiAction::Browse { .. }) => {
                bail!("browse is only supported for Codex sessions; use `f ai codex browse ...`");
            }
            Some(ProviderAiAction::Continue { session, path }) => {
                continue_session(session, path, Provider::Claude)?
            }
            Some(ProviderAiAction::New) => new_session(Provider::Claude)?,
            Some(ProviderAiAction::Connect { .. }) => {
                bail!("connect is only supported for Codex sessions; use `f codex connect ...`");
            }
            Some(ProviderAiAction::Open { .. }) | Some(ProviderAiAction::Resolve { .. }) => {
                bail!("open/resolve is only supported for Codex sessions; use `f codex ...`");
            }
            Some(ProviderAiAction::Runtime { .. }) => {
                bail!(
                    "runtime helpers are only supported for Codex sessions; use `f codex runtime ...`"
                );
            }
            Some(ProviderAiAction::Doctor { .. }) => {
                bail!("doctor is only supported for Codex sessions; use `f codex doctor`");
            }
            Some(ProviderAiAction::Eval { .. }) => {
                bail!("eval is only supported for Codex sessions; use `f codex eval`");
            }
            Some(ProviderAiAction::TouchLaunch { .. }) => {
                bail!(
                    "touch-launch is only supported for Codex sessions; use `f codex touch-launch`"
                );
            }
            Some(ProviderAiAction::EnableGlobal { .. }) => {

View on GitHub (pinned to a747e741ae)

Solutions

  1. Use the Codex subcommand: `f codex open ...` / `f codex resolve ...` (or `f ai codex ...`).
  2. For Claude sessions, use the supported actions: `f ai claude continue`, `f ai claude new`, `f ai claude sessions`, `f ai claude show`.
  3. Update any generic provider-loop script to whitelist codex for open/resolve.

Example fix

// before (shell)
f ai claude resolve my-session
// after (shell)
f codex resolve my-session
Defensive patterns

Strategy: validation

Validate before calling

# shell: open/resolve are Codex-only
ACTION=$1; PROVIDER=$2
if [ "$ACTION" = "open" ] || [ "$ACTION" = "resolve" ]; then
  [ "$PROVIDER" = "codex" ] || { echo "open/resolve require 'f codex ...'" >&2; exit 1; }
fi

Try / catch

f ai claude resolve "$SESSION" 2>err.log || { grep -q 'open/resolve is only supported for Codex' err.log && exec f codex resolve "$SESSION"; } || { cat err.log >&2; exit 1; }

Prevention

When it happens

Trigger: Running `f ai claude open <session>` or `f ai claude resolve <session>` (ProviderAiAction::Open / ProviderAiAction::Resolve routed to Provider::Claude).

Common situations: Trying to reopen or resolve a stale/interrupted session but invoking it under the wrong provider; scripts that enumerate providers and call open/resolve generically; copying a Codex command and swapping 'codex' for 'claude' assuming feature parity.

Related errors


AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01). Data as JSON: /api/errors/91cb2d780807836a. Report an issue: GitHub.