Skip to content

Indexing

Kodik builds a local semantic index of your workspace. The codebase_search tool uses this index to search code by meaning, not just exact text matches.

On startup Kodik splits the text files in your workspace into chunks (up to 80 lines each), computes vector embeddings via the embeddings API, and stores the results in a local SQLite database in Kodik’s user-data workspace storage. The embeddings API selects the embedding model server-side; the IDE sends text only, validates and splits requests before sending them, and matches codebase_search queries against vectors from that backend-managed model.

The index is stored locally outside the project folder, so it does not appear in Git or need a .gitignore rule. Data persists between sessions so re-opening a workspace does not require a full re-index.

For a Remote SSH workspace, “locally” means on the remote VS Code server: Kodik walks and watches files on the SSH host and stores that workspace’s SQLite cache in the remote server’s user-data storage. Only the embedding requests cross the network to the configured Kodik API; the client machine does not need a matching checkout path.

Indexing starts automatically when you open a workspace, as long as you are signed in to your Kodik account (embeddings are computed through the Kodik API). If you open a workspace while signed out, indexing starts as soon as you sign in — no restart needed. Kodik watches for file changes and updates the index incrementally, processing only the files that changed.

ChangeAction
New filesAutomatically added to the index
Modified filesOld embeddings are removed and new ones are created
Deleted filesRemoved from the index

Partial sync is debounced to avoid interfering with active editing. Before a search returns results, Kodik also reconciles the cache against changed, new, and deleted files so stale chunks are not returned. Unchanged files are checked with fast file metadata, so search does not reopen every indexed file in a large workspace.

By default Kodik indexes all text files except:

  • files listed in .kodikignore or .gitignore — see Ignore Files
  • standard build, cache, and dependency directories (node_modules, bower_components, dist, build, .git, .kodik, .terraform, Pods, etc.)
  • noisy lockfiles and OS metadata files (package-lock.json, yarn.lock, .DS_Store, etc.)
  • binary and media files (images, audio, video, archives, compiled artifacts)
  • minified JavaScript and CSS bundles

Text files are read up to a 1.5 MB prefix, matching VS Code-style workspace indexing behavior. Empty files do not produce chunks. The index is capped at 50,000 chunks, which is sufficient for most repositories; files after that budget are skipped until a later sync.

Check indexing status or trigger a re-index from Kodik Settings → Indexing Settings. From there you can also:

  • pause the current indexing run and automatic sync;
  • disable .kodikignore or .gitignore filtering;
  • clear the index and stop indexing until you run Sync again.

Pausing (or clearing) applies only to the current workspace — other projects keep indexing on their own schedule. Pausing an active run saves its completed-file progress locally while leaving the last complete index searchable. When indexing is paused, Sync continues from that checkpoint instead of starting at 0%; files changed, added, or deleted during the pause are still reconciled before the resumed index replaces the previous complete one. Delete index also discards any saved checkpoint.

image29

The index is stored locally on your machine in Kodik user data, not inside the workspace. File chunks are sent to the embeddings API to compute vectors and are stored locally with those vectors in SQLite. Kodik does not send an embedding model ID from the IDE, and it avoids invalid embedding payloads by skipping empty inputs, capping text sent per item, and splitting large batches before they reach the API. If the embeddings API fails for a file, that file is not marked current; a later sync retries it. To exclude sensitive files from the index, add them to the ignore files.