nikivdev/code · error

telemetry is only supported for Codex sessions; use `f codex

Error message

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

What it means

This error is raised by `run_provider` in src/ai.rs when a `telemetry` action is dispatched against a Cursor session. Cursor transcripts in this tool are read-only (list/copy/context only); Codex-specific integrations like telemetry are deliberately rejected with `bail!` instead of failing silently. The message points the user to the Codex subcommand namespace.

Source

Thrown at src/ai.rs:592

            }
            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 ...`"
                );
            }
            Some(ProviderAiAction::SkillSource { .. }) => {
                bail!(

View on GitHub (pinned to a747e741ae)

Solutions

  1. Run the telemetry action against Codex instead: `f codex telemetry ...`
  2. If you only need Cursor transcript data, use `f cursor list`, `f cursor copy`, or `f cursor context`
  3. Check the current provider before dispatching: gate ProviderAiAction::Telemetry so it is only sent when provider == Provider::Codex
  4. If dispatching programmatically, match on the provider first and emit a clearer CLI error or skip the action

Example fix

// before
f cursor telemetry --session abc
// after
f codex telemetry --session abc
Defensive patterns

Strategy: validation

Validate before calling

fn supports_action(provider: Provider, action: &ProviderAiAction) -> bool {
    matches!(provider, Provider::Codex)
        || matches!(action, ProviderAiAction::List | ProviderAiAction::LatestId { .. })
}
if !supports_action(Provider::Cursor, &action) {
    eprintln!("telemetry requires Codex: use `f codex telemetry ...`");
}

Type guard

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

Try / catch

match run_provider(Provider::Cursor, Some(ProviderAiAction::Telemetry { .. })) {
    Err(e) if e.to_string().contains("only supported for Codex") => {
        eprintln!("falling back to `f codex telemetry ...`");
    }
    Err(e) => return Err(e),
    Ok(()) => {}
}

Prevention

When it happens

Trigger: Running `f cursor telemetry ...` (or invoking run_provider(Provider::Cursor, Some(ProviderAiAction::Telemetry{..}))). Also produced when a script or alias generically maps `f <provider> <action>` without checking provider capability.

Common situations: Users habituating the same command shape across providers (f claude/codex/cursor), shell scripts or fuzzer-driven dispatch iterating ProviderAiAction variants, and docs/aliases written for Codex applied to a Cursor session.

Related errors


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