From 1f4d058ba404c3a2fc95a4021cf6d5025264f424 Mon Sep 17 00:00:00 2001 From: Jack O'Sullivan Date: Mon, 16 Nov 2026 00:54:32 +0000 Subject: [PATCH] nixos/slop-cannon: Fix Codex procfs fallback Restore the bubblewrap diagnostic expected by Codex so its existing container fallback handles nspawn procfs restrictions. Verified workspace writes succeed and outside writes are denied. `check-system slop-cannon` passes. --- docs/sites/home/sfh/containers/slop-cannon.md | 6 +++--- .../home/palace/vms/sfh/containers/slop-cannon.nix | 11 ++++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/docs/sites/home/sfh/containers/slop-cannon.md b/docs/sites/home/sfh/containers/slop-cannon.md index 1c02e1c..b1abe3f 100644 --- a/docs/sites/home/sfh/containers/slop-cannon.md +++ b/docs/sites/home/sfh/containers/slop-cannon.md @@ -125,9 +125,9 @@ unprivileged user and the approval broker in front of the deploy key. - Claude's managed settings (`/etc/claude-code/managed-settings.json`) repeat the `deny` rules and disable bypass mode; agents can edit `~/.claude` but not `/etc`. The app still lists Bypass, but choosing it fails. -- Codex stores its credentials in a file. Its command sandbox does not work inside nspawn yet: - bubblewrap can't mount a fresh `/proc` in the container, so every Codex command fails outside - full-access mode. +- Codex stores its credentials in a file. A bubblewrap diagnostic compatibility override enables + its existing nspawn fallback; deployed and verified directly and through a fresh Paseo session. + See [Codex sandbox in nspawn](../../../../../agents-remote.md#codex-sandbox-in-nspawn). - Deploys and `ssh-machine` access are meant to go through an approval broker, which is not built yet; until then agents can't deploy. diff --git a/nixos/boxes/home/palace/vms/sfh/containers/slop-cannon.nix b/nixos/boxes/home/palace/vms/sfh/containers/slop-cannon.nix index 36a1f25..8d6bf68 100644 --- a/nixos/boxes/home/palace/vms/sfh/containers/slop-cannon.nix +++ b/nixos/boxes/home/palace/vms/sfh/containers/slop-cannon.nix @@ -36,6 +36,15 @@ in agentUser = "slop-cannon"; agentHome = "/home/${agentUser}"; + # TODO: Drop once Codex recognises bubblewrap's newer `/proc` error wording. + # Restore the diagnostic its procfs preflight expects so it uses its container fallback. + codexBubblewrap = pkgs.bubblewrap.overrideAttrs (old: { + postPatch = (old.postPatch or "") + '' + substituteInPlace bubblewrap.c \ + --replace-fail "Can't mount proc on %s" "Can't mount proc on /newroot%s" + ''; + }); + # Steer agents to the approval broker; these match command text, so they aren't a boundary claudeDeny = [ "Bash(deploy:*)" @@ -109,7 +118,7 @@ in home-manager.users.${agentUser} = { my.agents.enable = true; - home.packages = [ slopClone ]; + home.packages = [ slopClone codexBubblewrap ]; programs = { claude-code.settings.permissions = {