nikivdev/code · error

daemon is only supported for Codex sessions; use `f codex da

Error message

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

What it means

The Daemon action (daemon management) is implemented only for Codex sessions. run_provider with Provider::Cursor and a Daemon action bails with this message directing the user to `f codex daemon ...`.

Source

Thrown at src/ai.rs:586

            }
            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 { .. }) => {
                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 { .. }) => {

View on GitHub (pinned to a747e741ae)

Solutions

  1. Use `f codex daemon ...` to manage the daemon
  2. Check whether a daemon is even needed for your Cursor-only workflow (likely not)
  3. Add a provider guard in scripts before daemon operations

Example fix

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

Strategy: validation

Validate before calling

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

Type guard

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

Try / catch

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

Prevention

When it happens

Trigger: Running `f cursor daemon <start|stop|status|...>` with any daemon subcommand.

Common situations: Managing background daemons and assuming a Cursor daemon exists; ops scripts iterating provider names against the same subcommands.

Related errors


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