What Tegment changes on your machine
Every file Tegment writes when you connect an AI coding agent, and the safeguards around those writes.
When you connect one of your AI coding agents, Tegment wires it up in two ways: it registers the MCP server so the agent can read your projects and issues and control your apps, and it registers lifecycle hooks so Tegment can show that agent's live status. Both work by pointing the agent at a small bundled tegment command that ships inside the app, which owns auth and routing. Tegment never injects your credentials into the agent's own config.
This page lists exactly which files Tegment writes for each agent so you can review them yourself. Everything here is user-level config in your home directory. Tegment never touches enterprise or MDM policy, team config, or per-project agent config.
The bundled command#
Every integration points the agent at the same bundled command, so it is installed once, independently of which agents you set up:
| What | Where |
|---|---|
Per-user copy of the tegment command | <userData>/tegment-cli/tegment (tegment.exe on Windows) |
<userData> is Tegment's own application-data folder: %APPDATA%/tegment on Windows, ~/Library/Application Support/tegment on macOS. The copy is refreshed when the app starts so it matches the installed version. It follows the app's own install and uninstall lifecycle, so removing a single agent integration leaves it in place (it is shared infrastructure).
What Tegment writes per agent#
| Agent | Files Tegment writes |
|---|---|
| Claude Code | A local marketplace plugin under ~/.claude/plugins/marketplaces/tegment/. The plugin carries both the hooks and the MCP registration, and the install is recorded in ~/.claude/settings.json. |
| Codex | A clearly delimited, Tegment-managed [hooks] block inside ~/.codex/config.toml (it honours the CODEX_HOME override), plus the tegment entry in that file's [mcp_servers] table. On Windows, when the command path contains a space, a small ~/.codex/tegment-codex-hook.cmd wrapper is added too. |
| Gemini CLI | Two keys in ~/.gemini/settings.json: a Tegment-named hook group under hooks, and mcpServers.tegment. Your own entries under those keys are left untouched. |
| Cursor | A Tegment command entry per event in ~/.cursor/hooks.json, and mcpServers.tegment in ~/.cursor/mcp.json. |
| OpenCode | A self-contained plugin file at ~/.config/opencode/plugins/tegment.js (OpenCode loads any file in plugins/), and mcp.tegment in ~/.config/opencode/opencode.json. The same path is used on Windows. |
Backups#
The first time Tegment modifies a config file that already exists, it copies the original to a sibling backup so you always have the version from before Tegment touched it:
~/.codex/config.toml → ~/.codex/config.toml.tegment-backup ~/.gemini/settings.json → ~/.gemini/settings.json.tegment-backup ~/.cursor/hooks.json → ~/.cursor/hooks.json.tegment-backup ~/.cursor/mcp.json → ~/.cursor/mcp.json.tegment-backup ~/.config/opencode/opencode.json → …opencode.json.tegment-backup
A backup is taken once: an existing .tegment-backup is never overwritten, so it always holds the earliest version Tegment saw. Files Tegment creates from scratch aren't backed up, since there's nothing to preserve. The backup is best-effort, so if it fails the real write still goes ahead. Separately, if your Cursor hooks.json can't be parsed, Tegment preserves it as hooks.json.bak before rewriting it from a clean base.
Consent and control#
- Tegment only sets up the agents you explicitly enable, after it tells you it's about to configure them.
- You can manage each integration (install, uninstall, or re-sync) per agent at any time under Settings → AI Agents, on the MCP tab and the Status tab.
- An integration you've installed is kept in sync when the app starts, for example to track an updated command path. Tegment never sets up an agent you haven't opted into: a fresh install is always an explicit action in the onboarding wizard or settings, never a silent side effect of starting the app.