nikivdev/code · error

log is only supported for Codex sessions; use `f codex log .

Error message

log is only supported for Codex sessions; use `f codex log ...`

What it means

Raised by `run_provider` in src/ai.rs when the `log` action is dispatched against a Cursor session. Log inspection is a Codex-only integration; the Cursor match arm bails with a pointer to `f codex log ...`.

Source

Thrown at src/ai.rs:618

                bail!(
                    "project-ai is only supported for Codex sessions; use `f codex project-ai ...`"
                );
            }
            Some(ProviderAiAction::SkillEval { .. }) => {
                bail!(
                    "skill-eval is only supported for Codex sessions; use `f codex skill-eval ...`"
                );
            }
            Some(ProviderAiAction::SkillSource { .. }) => {
                bail!(
                    "skill-source is only supported for Codex sessions; use `f codex skill-source ...`"
                );
            }
            Some(ProviderAiAction::Agent { .. }) => {
                bail!("agent is only supported for Codex sessions; use `f codex agent ...`");
            }
            Some(ProviderAiAction::Log { .. }) => {
                bail!("log is only supported for Codex sessions; use `f codex log ...`");
            }
            Some(ProviderAiAction::Sessions { .. })
            | Some(ProviderAiAction::Browse { .. })
            | Some(ProviderAiAction::Continue { .. })
            | Some(ProviderAiAction::New)
            | Some(ProviderAiAction::Open { .. })
            | Some(ProviderAiAction::Resolve { .. })
            | Some(ProviderAiAction::Resume { .. })
            | Some(ProviderAiAction::Find { .. })
            | Some(ProviderAiAction::FindAndCopy { .. }) => {
                bail!(
                    "Cursor transcripts are readable only; use `f cursor list`, `f cursor copy`, or `f cursor context`"
                );
            }
            Some(ProviderAiAction::Recover { .. }) => {
                bail!("recover is only supported for Codex sessions; use `f ai codex recover ...`");
            }
        }

View on GitHub (pinned to a747e741ae)

Solutions

  1. Run `f codex log ...` for Codex logs
  2. Inspect Cursor transcripts directly via `f cursor list`, `f cursor copy`, or `f cursor context`
  3. Gate Log dispatch to Provider::Codex in scripts
  4. Note the provider capability matrix in team documentation

Example fix

// before
f cursor log --tail 100
// after
f codex log --tail 100
Defensive patterns

Strategy: validation

Validate before calling

fn supports_log(provider: Provider) -> bool {
    matches!(provider, Provider::Codex)
}
if !supports_log(provider) {
    eprintln!("log requires Codex: use `f codex log ...`");
    return;
}

Type guard

fn is_codex(provider: Provider) -> bool {
    matches!(provider, Provider::Codex)
}

Try / catch

if let Err(e) = run_provider(provider, Some(ProviderAiAction::Log { .. })) {
    if e.to_string().contains("log is only supported for Codex") {
        eprintln!("rerun as: f codex log ...");
    } else {
        return Err(e);
    }
}

Prevention

When it happens

Trigger: Running `f cursor log ...`, or run_provider(Provider::Cursor, Some(ProviderAiAction::Log{..})). Occurs when log-triage tooling is pointed at the Cursor provider.

Common situations: Debugging workflows that assume every provider exposes logs, scripts iterated across providers that hit Cursor and abort, muscle memory from Codex usage.

Related errors


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