ccc-reset

A command that deletes and rebuilds a project's ccc code-search index from the beginning.

In plain words
What is it for?
Use it after changing include or exclude settings, switching between CPU and CUDA, recovering from index problems, or upgrading incompatible storage.
Why use it?
It fixes indexes made invalid by changed settings, embedding-device switches, corruption, or incompatible upgrades, but takes the full indexing cost again.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/iliaal/ccc-plugin/ccc-reset
Clone the repo
git clone --depth 1 https://github.com/iliaal/ccc-plugin
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 725 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00022 $0.00725
Opus 5 $0.00011 $0.00362
Sonnet 5 $0.00004 $0.00145
Haiku 4.5 $0.00002 $0.00072

Measured yesterday against content hash d6621e1445a9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ccc-reset scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/ccc-tools/commands/ccc-reset.md · 60 lines

How it starts

The opening of the file, as written. The whole thing — 60 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Reset and rebuild a ccc index

Drops the project's index databases and performs a full re-index from scratch. Use this after:

  • Editing .cocoindex_code/settings.yml to change includes/excludes
  • Switching embedding device (CPU ↔ CUDA — embeddings are tied to the device that produced them)
  • Index corruption or weird state
  • Upgrading cocoindex-code to a version with incompatible storage

Do NOT use for routine refresh — that's /ccc-reindex. Reset is destructive and pays the full embedding cost.

Step 1: Resolve the target and confirm

$ARGUMENTS is the project path. If empty, fall back to cwd. Verify it has .cocoindex_code/settings.yml — if not, stop and tell the user to run /ccc-onboard first.

Before touching anything, confirm with the user what's about to happen: "About to reset ccc index for <project>. This drops the existing database and rebuilds from scratch — on CUDA this typically takes 1-10 minutes depending on project size. Proceed?" Wait for explicit yes.

Skip confirmation only if $ARGUMENTS contains --yes.

Step 2: Capture pre-reset state

Run cd <project> && ccc status and record the current chunk count, file count, and language breakdown. This is the baseline for the post-reset diff.

Step 3: Drop the index

cd <project> && ccc reset -f

The -f skips the interactive confirmation inside ccc reset. Report what was deleted (it lists the dropped files).

Step 4: Re-index

cd <project> && ccc index

Almost always takes longer than 30 seconds for a full rebuild. Run in background, stream or poll the output file, and report progress to the user every minute or so if it's taking a while.

Step 5: Verify and report

After ccc index completes:

  • Run cd <project> && ccc status and compare to the pre-reset baseline. Chunk count should be similar (minor drift is expected from chunker non-determinism).
  • If the chunk count dropped by more than 20%, that's a red flag — surface it to the user.
  • Run one sanity query against the new index to prove it's functional. Pick something obvious from the project context ("authentication", "main entry point", "config", whichever fits).
  • Report: elapsed time, old vs. new chunk count, sanity-query top hit and score.

Read the full file on GitHub · 60 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 60 lines · 22 tokens per session scan A d6621e1445a9

Subscribe to this mod's changes

ccc-reset is a command published in the GitHub repository iliaal/ccc-plugin (1 stars, last pushed 4mo ago), licensed MIT. It adds 22 tokens to every session and 725 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.