What Tegment changes on your machine

Every file Tegment writes when you connect an AI coding agent, and the safeguards around those writes.

Last updated Jun 17, 2026

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:

WhatWhere
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#

AgentFiles Tegment writes
Claude CodeA 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.
CodexA 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 CLITwo keys in ~/.gemini/settings.json: a Tegment-named hook group under hooks, and mcpServers.tegment. Your own entries under those keys are left untouched.
CursorA Tegment command entry per event in ~/.cursor/hooks.json, and mcpServers.tegment in ~/.cursor/mcp.json.
OpenCodeA 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:

config → backup
~/.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.