nikivdev/code · error

memory is only supported for Codex sessions; use `f codex me

Error message

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

What it means

The Memory action (session memory helpers) is Codex-only. When dispatched with Provider::Cursor, run_provider bails with this message pointing to `f codex memory ...`.

Source

Thrown at src/ai.rs:589

            }
            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 { .. }) => {
                bail!(
                    "global Codex enablement is only supported for Codex sessions; use `f codex enable-global`"
                );
            }
            Some(ProviderAiAction::Daemon { .. }) => {
                bail!("daemon is only supported for Codex sessions; use `f codex daemon ...`");
            }
            Some(ProviderAiAction::Memory { .. }) => {
                bail!("memory is only supported for Codex sessions; use `f codex memory ...`");
            }
            Some(ProviderAiAction::Telemetry { .. }) => {
                bail!(
                    "telemetry is only supported for Codex sessions; use `f codex telemetry ...`"
                );
            }
            Some(ProviderAiAction::Trace { .. }) => {
                bail!("trace is only supported for Codex sessions; use `f codex trace ...`");
            }
            Some(ProviderAiAction::ProjectAi { .. }) => {
                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 ...`"
                );

View on GitHub (pinned to a747e741ae)

Solutions

  1. Use `f codex memory ...` for memory helpers
  2. For Cursor sessions, rely on copy/context/show actions to manage context manually
  3. Update automation to restrict memory operations to the codex provider

Example fix

// before
$ f cursor memory list
// error: memory is only supported for Codex sessions
// after
$ f codex memory list
Defensive patterns

Strategy: validation

Validate before calling

fn assert_codex_for_memory(provider: &Provider) -> Result<()> {
    if *provider != Provider::Codex {
        bail!("memory requires the codex provider");
    }
    Ok(())
}

Type guard

fn supports_memory(p: &Provider) -> bool { matches!(p, Provider::Codex) }

Try / catch

if let Err(e) = run_provider(Provider::Cursor, Some(ProviderAiAction::Memory { .. })) {
    if e.to_string().contains("memory is only supported") {
        eprintln!("use: f codex memory ...");
    }
}

Prevention

When it happens

Trigger: Running `f cursor memory <subcommand>` with any memory arguments.

Common situations: Managing long-term memory/context stores and swapping provider names; confusion over which providers support memory management.

Related errors


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