Skip to content
| Marketplace
Sign in
Visual Studio Code>AI>CosmicCodeNew to Visual Studio Code? Get it now.
CosmicCode

CosmicCode

PanSynapse Labs

|
9 installs
| (0) | Free
Code search, signatures, dependencies and architecture for your AI assistant, from an index of your repository.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CosmicCode for VS Code

Pre-release, private pilot. CosmicCode is available to invited developers only. Without pilot access and an API key the extension can't connect. Request access.

CosmicCode gives your AI assistant (GitHub Copilot agent mode, or any MCP client in VS Code) tools to search your repository by meaning, look up signatures, trace dependencies and see its architecture, from an index of your code hosted by PanSynapse.

Get started

  1. Install the extension. A Get started with CosmicCode walkthrough opens.
  2. Run CosmicCode: Sign In (or click CosmicCode: Sign in in the status bar). Your browser opens app.pansynapse.com:
    • Have an account with CosmicCode: click Connect. VS Code gets its own API key, kept in VS Code's secret storage; there's nothing to copy.
    • New to PanSynapse: choose Create an account. One approval gives you the account and CosmicCode; we email you, you set a password, then run CosmicCode: Sign In again.
    • Account without CosmicCode: click Request access; we email you when it's on.
  3. Open a repository. CosmicCode asks before indexing it: its source files are uploaded to PanSynapse, and each repository counts toward your repository limit.
  4. In Copilot Chat (agent mode), the CosmicCode tools appear under the CosmicCode server.

The status bar shows the index state. Click it for actions.

Claude Code

Run CosmicCode: Connect Claude Code (or accept the offer after indexing). It adds CosmicCode to Claude Code for the open repository with claude mcp add --scope local, so it lives in your private Claude Code settings for that project, not in a committed file. Start a new Claude Code session in the folder and the cosmic_* tools are available. Keep the extension installed: it keeps the index in sync.

Without VS Code: claude mcp add --transport http --scope local cosmiccode https://mcp.pansynapse.com/code --header "Authorization: Bearer <key>" --header "X-CosmicCode-Repo: <repository ID>".

Measuring Copilot and Claude Code (optional)

To see how CosmicCode changes what the agent does, CosmicCode can receive the agent's own OpenTelemetry export on 127.0.0.1:4318 and relay a whitelist to PanSynapse: tool names, model names, token counts, durations and outcomes. Prompts, responses, tool arguments and results are dropped before anything leaves your machine, even if the agent exports them.

  • Copilot Chat: run CosmicCode: Connect Copilot Telemetry. It turns on github.copilot.chat.otel.enabled and points otlpEndpoint at CosmicCode. Disconnect Copilot Telemetry undoes it.
  • Claude Code: start it from a shell with CLAUDE_CODE_ENABLE_TELEMETRY=1 OTEL_LOGS_EXPORTER=otlp OTEL_EXPORTER_OTLP_PROTOCOL=http/json OTEL_EXPORTER_OTLP_ENDPOINT=http://127.0.0.1:4318 and turn on cosmiccode.agentTelemetry.

Both need cosmiccode.telemetry and VS Code's own telemetry to be on.

What gets uploaded

Files CosmicCode can parse (Python, TypeScript/JavaScript, Go, Rust, C) that git would not ignore. The extension applies the rules itself, so it doesn't need a working git on the machine: every .gitignore in the repository, .git/info/exclude, your global excludes file, then a .cosmiccodeignore at the repository root (same syntax; !pattern re-includes) and the cosmiccode.files.exclude / files.include settings. node_modules, virtualenvs, dist/build and similar folders are always skipped, as are files over 1 MB or not UTF-8. CosmicCode: Check Setup shows which ignore files were found and why a folder is in the state it's in.

After the first index, only changed files are sent: on save, branch switch, pull or rebase, and on a check every 30 minutes.

Commands

Command What it does
CosmicCode: Sign In / Sign Out Sign in through the browser (VS Code gets its own key) / remove the key from this machine
CosmicCode: Enter API Key Manually Paste a key from the web app's API keys page instead
CosmicCode: Index This Repository Start indexing the current folder
CosmicCode: Re-index Repository Upload everything again
CosmicCode: Delete This Repository's Index Delete the uploaded code and index from PanSynapse; frees a repository slot
CosmicCode: Connect Claude Code Add CosmicCode to Claude Code for this repository
CosmicCode: Show My Stats Your own tool calls, index pushes, errors, agent usage and quota, as a Markdown preview
CosmicCode: Open Weekly Survey The pilot survey link (cosmiccode.surveyUrl)
CosmicCode: Connect / Disconnect Copilot Telemetry Relay Copilot Chat's telemetry (names, counts, timings; never content) to PanSynapse
CosmicCode: Copy Repository ID The ID PanSynapse uses for this repository
CosmicCode: Show Status / Show Log Details and troubleshooting

Settings

  • cosmiccode.appUrl: the PanSynapse web app used for sign-in. Leave as is unless PanSynapse asks.
  • cosmiccode.serverUrl: the CosmicCode endpoint. Leave as is unless PanSynapse asks.
  • cosmiccode.sync.enabled: keep indexes in sync as you work (default on).
  • cosmiccode.sync.maxFiles: stop syncing repositories with more files than this (default 20,000).
  • cosmiccode.agentPreference: default lets the agent decide; always tells your coding agents to use CosmicCode's tools before reading or searching files. CosmicCode asks once before writing anything and says exactly where: a Copilot Chat instructions file, a managed block in ~/.claude/CLAUDE.md, and .cursor/rules/cosmiccode.mdc in each open repository (kept out of git). Pick the agents with cosmiccode.agentPreference.agents; default removes everything.
  • cosmiccode.problemReports: ask (default) offers a report when something fails and shows what it contains; auto sends one without asking; off never offers. CosmicCode: Report a Problem always works. Reports never include source code.
  • cosmiccode.telemetry: send usage events (start, sign-in result, errors shown, reports sent) so PanSynapse can see where people get stuck (default on; also off when VS Code telemetry is off). Names and codes only, never source code or chat content.
  • cosmiccode.feedbackPrompts: after an agent task ends, ask "did it help?" at most three times a day (default on; needs the Copilot telemetry relay).
  • cosmiccode.surveyUrl: the weekly survey link (default: the CosmicCode Weekly Product Survey); empty = no survey. A Google Forms pre-filled link with {email} and {week} in place of those answers gets them filled in.
  • cosmiccode.agentTelemetry / cosmiccode.agentTelemetry.port: receive Copilot Chat's or Claude Code's OpenTelemetry export locally and relay the whitelist above (default off; see "Measuring Copilot and Claude Code").

Development

npm install
npm test          # compile + unit tests (node:test)
npm run package   # builds cosmiccode-<version>.vsix

Releasing

  1. Bump version in package.json and add a ## <version> entry to CHANGELOG.md. Odd minor = pre-release (0.1.x, 0.3.x), even minor = release (0.2.x).
  2. Merge to main, then git tag v<version> && git push origin v<version>.
  3. The Release workflow checks the tag matches package.json, the changelog entry exists and the commit is on main, runs the tests and builds the .vsix.
  4. Approve the marketplace deployment in the run (Actions → Release → Review deployments). It then publishes that .vsix to the Marketplace and creates a GitHub Release with it attached.

Needs the VSCE_PAT secret on the marketplace environment (Azure DevOps token, organization "All accessible organizations", scope Marketplace → Manage; expires, renew before it does).

Press F5 ("Run CosmicCode") to try it in an Extension Development Host. To use the dev environment, set cosmiccode.appUrl to https://app-dev.pansynapse.com and cosmiccode.serverUrl to https://cosmiccode-mcp-6hzc45ruba-uc.a.run.app/code.

Repository IDs must match pansynapse-mcp/scripts/push_index.py; test/fixtures/repo-id-vectors.json is generated from it. Regenerate the vectors if either side changes.

Design: gcp/cosmiccode-mcp.md (VS Code extension) and gcp/cosmiccode-indexing.md (keeping the index fresh) in the PanSynapse planning docs.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft