A managed policy lets an administrator set defaults, lock settings, and restrict capabilities (such as maximum permission mode, allowed providers, or remote access) for every user on a machine. The T3 Code server enforces the policy for all connected clients (desktop, web, and mobile).
- Author a JSON policy (see Write a policy). Do not include secrets—all local users can read the policy.
- Validate it:
t3 policy check policy.json. - Deploy via MDM/GPO or a file to one supported location.
- Restart T3 Code on the machine (policies load at startup only).
- Verify with
t3 policy show.
{
"schemaVersion": 1,
"organization": "Example Corp",
"supportUrl": "https://it.example.com/t3",
"settings": {
"defaultRuntimeMode": { "value": "approval-required", "locked": false },
"enableAgentBrowserAccess": { "value": false, "locked": true }
},
"limits": {
"maxRuntimeMode": "auto-accept-edits",
"clients": ["desktop", "local-browser"],
"telemetry": false
}
}schemaVersion and organization are required. Locked controls display your organization name and optional supportUrl in Settings.
Use one source per machine (having both a native policy and a policy file prevents T3 Code from starting):
| OS | Native policy | Policy file (admin-writable only) |
|---|---|---|
| macOS | Device configuration profile for com.t3tools.t3code |
/Library/Application Support/T3Code/policy.json |
| Windows | GPO template or Policy (REG_SZ) under HKLM\SOFTWARE\Policies\T3Tools\T3Code |
C:\Program Files\T3Code\policy.json |
| Linux | — | /etc/t3code/policy.json |
- macOS profile: Generate
macos/t3code.mobileconfigwitht3 policy templates <dir> --policy policy.json(orplutil -convert xml1 -o com.t3tools.t3code.plist policy.json). Deploy as a single device profile (profiles cannot representnull; use a policy file if needed). - Windows GPO: Generate
windows/t3code.admxandwindows/en-US/t3code.admlwitht3 policy templates <dir>, import intoPolicyDefinitions/Intune under Computer Configuration → Administrative Templates → T3 Code, set Organization, rungpupdate /target:computer /force, and restart T3 Code. - Windows registry: Set
Policy(REG_SZ) to single-line JSON (do not mix with GPO template values).
Run t3 policy show as the user running T3 Code to inspect the installed policy, fingerprint, and whether the running server has loaded it. After any policy change or removal, restart the desktop app or run t3 service restart. Removing a policy restores the user's own saved settings.
Note: T3 Code refuses to start if a policy is unreadable, invalid, uses unknown keys from a newer version, or conflicts with another policy source. Always validate with
t3 policy checkand upgrade T3 Code before deploying newer keys.
Run t3 policy settings to list every manageable path from settings.json and its default.
"locked": falsesets a default (users can override)."locked": trueenforces the value across Settings and project overrides.
Key constraints:
- Lock
worktreeCleanuptogether withstorageCleanupworktree rules. observability(OTLP endpoints) cannot be managed by policy.- Manage
idleCompaction(not legacycompactIdleThreads). - Lock
providerInstances.<id>as a whole, or pin per-driver fields underlimits.providers.instances.
{
"schemaVersion": 1,
"organization": "Example Corp",
"limits": {
"maxRuntimeMode": "auto-accept-edits",
"clients": ["desktop"],
"connect": false,
"webhookTasks": false,
"browserCookieImport": false,
"previewTunnel": false,
"worktreeLayoutCommands": false,
"telemetry": false,
"providers": {
"allowedDrivers": ["claudeAgent", "codex"],
"instances": {
"claudeAgent": {
"locked": true,
"environment": [{ "name": "CLAUDE_CODE_USE_BEDROCK", "value": "1" }]
}
}
},
"updates": { "mode": "auto", "feedUrl": "https://updates.example.com/t3code/" }
}
}maxRuntimeMode caps all threads (approval-required, auto-accept-edits, auto, or full-access). Threads above the cap cannot run until lowered.
When maxRuntimeMode is set, users cannot modify provider launch settings (binaryPath, launchArgs, config home, or env vars)—pin required values (including absolute binaryPaths so user PATH entries can't shadow them) in providers.instances. Leave acpRegistry out of allowedDrivers if you don't want users adding arbitrary ACP Registry agents.
clients allows any subset of desktop, local-browser, and remote (keep desktop on desktop machines).
- Omitting
remoterestricts the server to loopback, revokes paired devices, disables LAN/Tailscale Serve/T3 Connect, and refuses startup if a Tailscale Serve route still forwards to T3 Code (or if a legacy service has LAN enabled—runt3 up --no-lan). - Set
"connect": falseto disable T3 Connect while allowing LAN/Tailscale remote access.
webhookTasks: false: Disables scheduled-task and workflow webhooks.browserCookieImport: false: Disables importing cookies from other browsers.previewTunnel: false: Disables remotelocalhosttunneling and port forwarding (streams tabs instead).worktreeLayoutCommands: false: Disablest3.jsonworktreeLayoutcreate/removecommands.telemetry: false: Disables product usage data and relay tracing for the server, desktop app, and server-opened browsers (does not controlapp.t3.codesor mobile).
providers.allowedDrivers: Whitelist of driver IDs (codex,claudeAgent,cursor,grok,opencode,antigravity,fx,kiro,pi,muse,acpRegistry).providers.instances: Sets or locks ("locked": true) fields across all instances of a driver (e.g., Bedrock/gateway env vars,binaryPath,launchArgs). Lockingcodex(or usingmaxRuntimeMode) disables ChatGPT-managed Codex; lockingopencodedisables externalserverUrl.
mode:"auto"or"off"(when updates are managed externally).feedUrl: Custom update mirror matching GitHub Release layout (latest*.ymland installers at root;t3-*archives andSHA256SUMSunderv<version>/).allowNightly: false: Disables the nightly channel.
- Provider CLIs: Restrict underlying CLIs with their own managed settings (e.g., Claude Code managed settings).
- WSL: Managed Windows desktop disables its WSL environment; a server started manually inside WSL reads
/etc/t3code/policy.jsonin that distro. - Local admins / port forwarding: Administrators can modify policies or T3 Code binaries, and users can still port-forward loopback sockets with external tools. Use OS/MDM controls for binary integrity and network isolation.