upstash/context7 · info

Cancelled

Error message

Cancelled

What it means

In `ctx7 skill remove <name>`, promptForSingleTarget asks the user which IDE/scope to remove the skill from. If the user aborts the prompt (Ctrl-C, Esc, or selecting cancel), the command prints this warning and returns without modifying anything. It is an intentional user-cancel exit, not a failure.

Solutions

  1. Re-run the command and complete the target selection prompt
  2. Pass the target explicitly via --ide/--scope flags to skip the interactive prompt
  3. Run in an interactive TTY so prompts can be answered
Defensive patterns

Strategy: fallback

Validate before calling

// Skip interactive prompt by resolving target first
const isTTY = process.stdout.isTTY;
if (!isTTY) console.log('Non-interactive shell: pass --ide <ide> --scope <scope> to skip prompts');

Type guard

const target = await promptForSingleTarget(options);
if (!target) return; // treat as user-cancel, not error
if (typeof target?.ide !== 'string') return;

Prevention

When it happens

Trigger: Running `ctx7 skill remove <name>` and aborting the interactive target-selection prompt (promptForSingleTarget returns null/undefined because the user cancelled).

Common situations: User changes their mind mid-prompt; presses Ctrl-C/Ctrl-D or Esc in the interactive selector; running in a non-interactive terminal where the prompt cannot be answered.

Related errors


AI-assisted analysis of upstash/context7@4416fb855b (2026-09-16). Data as JSON: /api/errors/26b6c7f8816d9aa5. Report an issue: GitHub.

Appendix: source

Thrown at packages/cli/src/commands/skill.ts:755

    return;
  }

  log.blank();

  for (const { label, displayPath, skills } of results) {
    log.plain(`${pc.bold(label)} ${pc.dim(displayPath)}`);
    for (const skill of skills) {
      log.plain(`  ${pc.green(skill)}`);
    }
    log.blank();
  }
}

async function removeCommand(name: string, options: RemoveOptions): Promise<void> {
  trackEvent("command", { name: "remove" });
  const target = await promptForSingleTarget(options);
  if (!target) {
    log.warn("Cancelled");
    return;
  }

  const skillsDir = getTargetDirFromSelection(target.ide, target.scope);
  let skillPath: string;
  try {
    skillPath = assertSkillNameInRoot(skillsDir, name);
  } catch {
    log.error(`Invalid skill name: ${name}`);
    return;
  }

  try {
    await rm(skillPath, { recursive: true });
    log.success(`Removed skill: ${name}`);
  } catch (err) {
    const error = err as NodeJS.ErrnoException;
    if (error.code === "ENOENT") {

View on GitHub (pinned to 4416fb855b)