Repository navigation
Conversation
Organizations can now deploy a settings policy that overrides users' server settings, the way Claude Code's managed-settings.json and Codex's MDM config work. The server reads policy at startup from /Library/Application Support/T3Code/managed-settings.json and the com.t3tools.t3code MDM managed preferences domain on macOS, or from /etc/t3code/managed-settings.json on Linux. The policy uses the same shape as settings.json and is laid over the user's settings when they are read, so managed keys also beat project overrides. It is never written into the user's file, so removing a policy restores the user's own values. Invalid keys or unreadable sources are logged and skipped. The config snapshot reports the managed key paths, and Settings locks those rows and provider cards on web and desktop. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Skipping a bad policy file or dropping a bad key left part of an organization's policy unenforced with only a log line to show for it. Any unreadable, unparseable, unknown, unmanageable, or invalid entry now fails startup with an error naming the file and every bad key. Also clarify that the unmanageable `observability` key holds OpenTelemetry export URLs, not product telemetry. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…P export The policy is now loaded once by the server CLI, before config resolution, and provided to the runtime, so it can outrank flags and env vars and an invalid policy stops the server before it binds anything. The loader moved to @t3tools/shared so the desktop main process reads the same policy for its own export. With that, `observability` is manageable: a managed OTLP URL replaces every other source for its signal, and a blank one turns that signal off. If the desktop cannot read the policy it exports nothing. A managed provider instance whose user config lives only in legacy `providers.<kind>` is now seeded from that config first, so the policy merges into the user's settings instead of replacing them. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ards A managed row's source indicator said "Set on the environment"; it now says "Managed by your organization". A read-only provider card, managed or not, no longer offers "Reset provider settings", a write the server would refuse or override. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (18)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThis change adds host-managed settings policies for macOS and Linux, applies policy values to server settings and OTLP export endpoints, and exposes managed key paths so the settings UI can identify organization-managed controls. It also adds policy documentation and tests. ChangesHost-managed settings
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~45 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant ManagedSettings
participant WebSocketRPC
participant SettingsRow
participant isServerSettingManaged
ManagedSettings->>WebSocketRPC: provide managedSettingPaths in ServerConfig
WebSocketRPC->>SettingsRow: deliver server configuration
SettingsRow->>isServerSettingManaged: check setting path against managed paths
isServerSettingManaged-->>SettingsRow: return managed status
SettingsRow->>SettingsRow: render managed row as read-only
Suggested reviewers: Merge Risk: ⚪ Minimal · up to No specific issue is established that should prevent merging after normal checks. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to Organization-managed settings create a meaningful security boundary. Recognized settings receive strong precedence, but nested policy mistakes may be accepted without enforcement, leaving telemetry export active when an administrator intended to disable it. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error)
✅ Passed checks (4 passed)
Full details: ApprovabilityExplanation This pull request needs a maintainer's review. Rule: adds a subsystem and user workflow, with a large refactor across apps and packages. The diff adds the managed-settings subsystem in
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Note Written by Thanks for explaining your workplace's managed-settings requirement. This introduces a new organization policy system, including machine-wide configuration, enforced precedence, and locked settings controls. Under the prior approval rule, that product direction and scope need explicit maintainer approval; linking #16883 does not establish it. Please bring the requirement to an Ideas discussion and request reconsideration after that scope is approved. |
Before this PR
Organizations have no way to enforce T3 Code settings on the machines they manage, so some won't allow it at all. My workplace is one of them. T3 Code is blocked there until an admin can hard-disable things like telemetry reporting, T3 Connect, and incoming network connections on developer workstations. See #16883.
After this PR
Admins can deploy a managed settings policy that overrides users' server settings. I modeled it on Claude Code's
managed-settings.jsonand Codex's managed config, since admins already know how to deploy those./Library/Application Support/T3Code/managed-settings.jsonand thecom.t3tools.t3codeMDM managed preferences domain (/Library/Managed Preferences/com.t3tools.t3code.plist). On Linux it reads/etc/t3code/managed-settings.json. Users can't write to these locations, and the MDM profile wins over the file, as in both tools.settings.jsonand lists only what it enforces. Nested objects merge key by key. Plain values and arrays replace the user's value.settings.json, so removing a policy gives users their own values back.Admin docs are in
docs/user/managed-settings.md.The "after" policy sets Permissions, Workspace and Auto-resume, and disables the built-in Claude instance.
==COMMIT_MSG==
Organizations can enforce T3 Code settings with a managed settings policy (macOS file or MDM profile, Linux file).
==COMMIT_MSG==
Notes
This PR only covers
settings.jsonoverrides. Telemetry, T3 Connect, and network access aren't settings keys, so each needs an explicit policy restriction enforced where that feature lives. I wrote up the plan on #16883 and want to land this base first.Known limitations:
settings.json, where they stay after the policy is removed. Locked rows and provider cards avoid this in the UI.OTEL_SDK_DISABLED.🤖 Generated by Claude (Opus 5.5) in Claude Code, 👨 directed by @rnorris