Repository navigation
Description
What happened
On Ubuntu with kernel.apparmor_restrict_unprivileged_userns=1, T3 Code's managed Antigravity runtime (~/.t3/tools/antigravity-acp/linux-x64/versions/<release-id>/antigravity) cannot use its terminal sandbox and omits auto from ACP session/new (modes.availableModes and the mode config option). Fresh T3 threads also omit Auto.
I want Auto enabled for T3's managed agy while keeping kernel.apparmor_restrict_unprivileged_userns=1 on, with an AppArmor profile that applies only to a trusted executable and survives provider updates.
Diagnosis
Checked against 0.1.12-nightly.20261123.5151 (856b105fa23f9cb9fdd49a8f102cb66a71b78265):
- T3 has no AppArmor profile, host setup command, or blocked-sandbox diagnostic for Antigravity. It only manages AppArmor for
/opt/T3 Code (Beta)/t3code(.deb) andchrome-headless-shell(t3 browser setup).docs/user/permission-modes.md:34-36only mentions account eligibility as a reason Auto is absent. AntigravityInstallation(apps/server/src/provider/AntigravityInstallation.ts:197-205, 841-1204) installs under~/.t3/tools/antigravity-acp/<platform>-<arch>/versions/<releaseId>/antigravity, wherereleaseIdisasset.sha512.slice(0, 64)and changes on every update.resolve()rejects symlinks across the managed tree (300-313, 427, 464-475) and acquires a write-requiringproper-lockfilelock besidemanagedDirectory(393-421, 689). There is no read-only system runtime lookup.- Launches run via
execthroughsystemd-run --user --scope(packages/provider-acp/src/server/AcpSessionRuntime.ts:1497-1532,apps/server/src/process/agentScope.ts:426-471), soantigravityruns under AppArmor labelunconfined.agylogsTerminal sandbox unavailable: AppArmor restricts unprivileged user namespacesand dropsauto.AntigravityProvider(apps/server/src/provider/AntigravityProvider.ts:187-195) only offers Auto whensession/newadvertises it. - Reusing
t3-chrome-headless-shell's wildcard pattern against~/.t3/tools/antigravity-acp/...breaks the trust boundary. AppArmor matches resolved paths, not ownership or hashes. Because the user owns$HOMEandversions/(even with0500/0555modes, the owner canchmod u+wor rename), any process running as that user could drop an arbitrary binary at the matched path to getuserns.
Proposed design:
- Add a root-owned system runtime root on Linux (e.g.
/usr/local/lib/t3code/antigravity-acp/<platform>-<arch>/versions/<releaseId>/antigravityandactive.json,root:root,0755/0555/0644). HaveAntigravityInstallation.resolve()prefer it over~/.t3/tools/antigravity-acp/when no explicitbinaryPathis set, verifying root ownership and reading without a write lock beside the directory. - Ship
/etc/apparmor.d/t3-antigravitymatching only/usr/local/lib/t3code/antigravity-acp/linux-{x64,arm64}/versions/[0-9a-f]*/antigravity. Root ownership keeps unprivileged users from abusing the glob, and the glob survives updates without reloading AppArmor. Verify on Ubuntu 24.04+ whetheragy1.5.13+ acceptsflags=(unconfined) { userns, }(which sets/proc/self/attr/apparmor/currenttot3-antigravity (unconfined)) or needs a confined profile likebwrap-userns-restrictthat prevents sandboxed child commands from inheritinguserns. - Add
sudo t3 antigravity setupandupdate(mirroringt3 browser setup): fetch Google's pinned manifest, verify SHA-512, run ACPinitializevalidation unprivileged, publish atomically into the root-owned tree, load/etc/apparmor.d/t3-antigravity, and verify a fresh session advertisesautoand can run a sandboxed command. When the system runtime is active, do not let unprivileged UI updates silently drop an unprofiled copy into~/.t3—point tosudo t3 antigravity update, or offer an opt-in root updater service/timer that only pulls from Google's verified manifest with no user-supplied URL or path. - When
kernel.apparmor_restrict_unprivileged_userns=1andsession/newomitsauto, show a setup hint in Antigravity provider settings and document it indocs/user/providers-antigravity.mdanddocs/user/permission-modes.md.
Steps to reproduce
- On Ubuntu 24.04+ x64 with
kernel.apparmor_restrict_unprivileged_userns=1,kernel.unprivileged_userns_clone=1, anduser.max_user_namespaces > 0, install T3's managed Antigravity (1.5.13) and sign in withoauth-personal. - Probe ACP
session/newagainst~/.t3/tools/antigravity-acp/linux-x64/versions/<release-id>/antigravityor open a fresh Antigravity thread in T3. - Both
modes.availableModesand themodeconfig option contain onlydefault,accept-edits, andplan, T3 omits Auto, andagy's ACP log records the AppArmor userns warning.
Version
0.1.12-nightly.20261123.5138 (also verified on 0.1.12-nightly.20261123.5151)
Environment
Ubuntu 24.04.5 LTS (Linux x64, kernel 7.0.0-43-generic, AppArmor 4.0.1, kernel.apparmor_restrict_unprivileged_userns=1), Node v26.13.1, managed agy 1.5.13 (oauth-personal), T3 Code t3code.service with Windows desktop client 0.1.12-nightly.20261123.5151
Evidence
$ sysctl kernel.apparmor_restrict_unprivileged_userns kernel.unprivileged_userns_clone user.max_user_namespaces
kernel.apparmor_restrict_unprivileged_userns = 1
kernel.unprivileged_userns_clone = 1
user.max_user_namespaces = 115347
$ cat /proc/<agy-pid>/attr/current
unconfined
# ~/.t3/userdata/providers/antigravity/<instance-hash>/antigravity-acp/log/acp-server-*.log
W1124 09:05:13.214921 283 store.go:31] Terminal sandbox unavailable: AppArmor restricts unprivileged user namespaces (kernel.apparmor_restrict_unprivileged_userns = 1)Related issues
- [Bug]: Auto mode silently unavailable when AppArmor restricts unprivileged user namespaces google-antigravity/antigravity-cli#1512 (upstream
agybehavior; this issue covers T3's managed install, profile, and updates) - [Bug]: Cursor Auto fails on Ubuntu AppImage because AppArmor blocks the bundled cursorsandbox helper #30348 / fix(cursor): a blocked Cursor sandbox names the cause instead of a generic retry #30385 (same Ubuntu AppArmor restriction for Cursor's
cursorsandbox), t3 browser setup reports ready inside an Incus/LXC guest, but the host's AppArmor userns restriction still blocks Chrome's sandbox #38222 (t3 browser setupAppArmor verification), [Bug]: Antigravity thread set to Auto stays in agy's default mode, so every shell command asks for approval #40896 / fix(server): an Antigravity thread in Auto asks agy for Auto instead of silently running Supervised #40906 (Antigravity Auto fallback), fix(server): allow a system-managed browser executable #31740 (system-managed browser executable)
Fix applied or workaround
None applied. Manually copying antigravity to a root-owned path, adding an AppArmor profile for it, and setting Antigravity's Binary path works around the restriction today, but opts out of T3's managed updates (ProviderInstallation.start disables managed updates when binaryPath is set).
Filed by
Gemini 4 Neon in Antigravity via t3 triage
Activity
juliusmarminge commentedon Nov 23, 2026
Thanks for writing this up. It asks for new behaviour rather than reporting a defect, so it does not belong in the bug tracker and I'm closing it as not planned here. Feature ideas are discussed in Discussions: please post it there.