# Real Grok cgroup comparison

Environment: Linux VM, systemd 255 user manager, Grok 1.0.77. No provider stub or replay agent was used. Fresh database per commit, T3CODE_DEV_SEED=0. Browser: Chromium, 1280x800, default dark appearance; evidence recordings are a 1440x900 monitor of real server/process output, not browser screenshots.

Base: 76acabd0a3b11081b48e2e50541614b843b68188
Head: da7aac3868b92822935d4621e4017dfeeffd6cf1

1. Install dependencies in separate checkouts of base and head with `vp i`.
2. Start each real web/server dev build in its own user scope: `T3CODE_DEV_SEED=0 systemd-run --user --scope --unit=t3proof45083-<side> -- vp run dev`. Both reported agent scopes on.
3. Pair each browser using its startup URL. Settings -> Providers -> Add provider -> Grok -> Next -> Next -> Add instance. Both show Grok 1.0.77, Authenticated / xAI API key, from the existing provider credentials.
4. In each checkout use `node apps/server/src/bin.ts project add --base-dir .t3 --title 'Grok cgroup proof' .`.
5. Run `python3 prove.py before <base-checkout> <base-sha>` and `python3 prove.py after <head-checkout> <head-sha>`. This invokes the real server's thread CLI to create a Grok 4.6 thread and send `Reply with OK.`. It samples only Grok stdio processes whose cwd is that checkout. No launch flags or provider implementation were changed.
6. The monitor reads `/proc/<pid>/cgroup`, the corresponding cgroup memory/controller files and `systemctl --user show` during startup. JSON contains every unique PID/cgroup placement; videos retain the last two observations after the processes exit.

Results: five retries per run. Base: every process in a t3-acp-* child of the server scope, outside app-t3code-agents.slice; no memory.current, no controllers, empty parent subtree_control. Head: every process in a t3code-acp-*.scope below app-t3code-agents.slice (via its server-specific subslice); memory.current exists, cpu/memory/pids controllers enabled, MemoryAccounting=yes and OOMPolicy=stop.

The agent slice's live MemoryHigh=10326343680 and MemoryMax=12576595968. ManagedOOMMemoryPressure=auto was observed; no memory-pressure kill experiment was performed.

On both sides the real Grok CLI fails authentication after spawning: `ACP agent did not advertise configured authentication method "xai.api_key".` This is the same CLI mismatch described in the original reproduction. Thus completed turns, MCP bridge inheritance and actual systemd-oomd selection under pressure remain unverified. The comparison proves the process-placement defect and corrected scope policy, not those downstream behaviors.

The first captures used a 35-second window and clipped a redundant ControlGroup line. The final pair repeats the same command with a 15-second window and wraps that line. All raw process observations are included in the archive. Final stills were unchanged across two reads 500ms apart. Videos were inspected via extracted contact sheets and final frames before upload.
