Skip to main content

Configure coding tools with Cortega AI Pack

Use the extension in desktop VS Code on Windows or macOS to connect supported coding assistants to your Cortega gateway. Endpoint Guard on macOS adds Shadow AI controls when you need to monitor or block unapproved applications.

Set up​

  1. Install the Cortega AI Pack extension in desktop VS Code and set cortega.ai.serverUrl to your Cortega server if your organization uses its own installation.
  2. Install the coding tools you want to use. Cortega detects Claude Code, Codex, Continue, OpenCode, Pi, Goose, Aider, and Cursor from installed editor extensions, existing configuration directories, or commands on PATH. Standalone tools need no VS Code plugin.
  3. Quit Cursor before configuring it. Open it once first if its configuration database does not yet exist. Keep Cursor closed when syncing or restoring its settings.
  4. Run Cortega AI Pack: Sign in, complete your organization's sign-in, and review the tool terms shown by the extension. Cortega does not install standalone tools.
  5. Run Cortega AI Pack: Sync AI tools with Cortega. In router mode Cortega uses the organization's default model alias. In direct mode, choose an available model first.
  6. Restart the configured clients or start fresh sessions. Reopen Cursor and select the configured model if needed. Check the Cortega status tooltip for individual tool errors and verify requests in gateway observability.

Coverage​

ToolWhat Cortega configures
Claude CodeShared CLI/extension gateway settings and legal MCP servers
CodexShared CLI/desktop/extension custom provider and legal MCP servers
ContinueLocal chat/edit/apply profile and legal MCP connection
OpenCodeCustom provider, authentication, default and small model
PiProvider registry, authentication, default provider/model
GooseDedicated custom provider and default provider/model
AiderOpenAI-compatible endpoint/key and main, weak, editor models
CursorSaved OpenAI BYOK base URL, key, and model selections

Continue autocomplete is not configured. The additional adapters configure model traffic; legal MCP provisioning remains limited to Claude Code, Codex, and Continue.

Cursor's adapter uses internal saved settings, which may change between versions. It refuses active SQLite journals or a running Cursor process. Cursor documents that BYOK requests still pass through Cursor's servers for prompt building, and Tab completion uses Cursor models. Configuring a private model does not make Cursor fully local or route every Cursor feature through Cortega. The gateway must be reachable through Cursor's request path.

Files and profiles​

The extension configures the local user's global profile. Project settings, environment variables, explicit CLI flags, separate profiles, and resumed sessions may override it. Those overrides are not prevented by the extension; gateway controls apply only to routed requests. Use Endpoint Guard on macOS for device-level Shadow AI controls.

  • OpenCode uses ~/.config/opencode/opencode.json (or existing opencode.jsonc) and ~/.local/share/opencode/auth.json; XDG config/data overrides are respected.
  • Pi uses ~/.pi/agent/{models,auth,settings}.json or PI_CODING_AGENT_DIR.
  • Goose uses its configuration directory and custom_providers/custom_cortega.json. On Windows that is %APPDATA%/Block/goose/config; macOS recognizes .config/goose and an existing Library/Application Support/Block/goose directory. GOOSE_PATH_ROOT redirects configuration to its config subdirectory.
  • Aider uses ~/.aider.conf.yml.
  • Cursor uses User/globalStorage/state.vscdb inside %APPDATA%/Cursor on Windows or ~/Library/Application Support/Cursor on macOS.

Undo and troubleshoot​

Run Cortega AI Pack: Undo all changes to my AI tools to restore managed settings and pause management. Sign out also restores settings. Close Cursor first. If restoration fails, the extension reports the affected tools and retains recovery information so you can retry Undo.

New adapters preserve unrelated values and comments, record original managed values privately, and leave later user edits intact on undo. Credentials and recovery files are written with private permissions on Unix; Windows files inherit user-profile access rules.

Drift is checked every five minutes; settings are synced every thirty minutes. Run Sync to repair immediately. Malformed configuration is left unchanged and reported per tool, so one broken client does not prevent the others from configuring. For Cursor, run Sync from VS Code while Cursor is closed, then reopen it.

Matters, projects and sensitive work​

Cortega AI Pack serves developers, lawyers and other teams. Choose matter/project selects a shared matter or project identifier; the gateway records the server-held selection on requests. Privilege/sensitive work requires a Sensitive choice in the caller's team model authorization, and blocks a marked request when no suitable route exists.

At sign-in and sync, the extension registers cortega-matters-projects in Claude Code and Codex. Assistants can discover both project and matter tools: list, add, update/retire and bulk-import entries. Reading and writing follow the caller's permissions; writes are audit-logged.

Enable the Matter/Project agent and provide active entries with useful descriptions (repository/product/task for developers, parties/subject/facts for lawyers). After a quiet gap, the agent assigns matches with confidence of at least 80%; uncertain suggestions stay for review. Human session decisions take priority on reruns. The assignment does not change the person's selection for other work.

View Cortega Agents → Insights → Matter/Project → Cost by matter/project for governed LLM request counts, tokens and spend. Explicit request selections take priority; assigned session usage follows, and unmatched usage appears as Unassigned. Classification calls are excluded. Choose a reporting window of up to 90 days. Different opening conversations are grouped separately when a usable fingerprint is captured; identical openings or history truncation can affect grouping.