published fresh until

Codex: Load the Ubuntu 24.04 bwrap AppArmor profile

Summary As of November 2026, if Codex still warns about user namespace creation on Ubuntu 24.04 after bubblewrap installation, copy and load the bwrap-userns-restrict AppArmor profile. Begin with sudo apt update

Not for Windows sandbox refresh or setup fixes; see codex-windows-sandbox-setup-refresh-update-fixes.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: run sudo apt update on the affected Ubuntu 24.04 system.

When you need it

On Ubuntu 24.04, Codex can still report that it cannot create the required user namespace after bubblewrap is installed. The page directs you to copy and load the extra AppArmor profile for this case.

Steps

1. Update package information and install the profile packages:

sudo apt update
sudo apt install apparmor-profiles apparmor-utils

2. Copy the supplied profile into the active profile directory:

sudo install -m 0644 \
  /usr/share/apparmor/extra-profiles/bwrap-userns-restrict \
  /etc/apparmor.d/bwrap-userns-restrict

3. Load that profile into the kernel:

sudo apparmor_parser -r /etc/apparmor.d/bwrap-userns-restrict

Check it worked

The page says apparmor_parser -r loads the profile into the kernel without a reboot. It identifies the relevant symptom as Codex's startup warning about the missing user namespace; it provides no separate diagnostic command or success output for this repair.

Limits

This recipe is for Ubuntu 24.04 after bubblewrap installation. The page says Ubuntu 25.04's package already supplies the profile in /etc/apparmor.d/bwrap-userns-restrict. Codex chooses the first bwrap executable on PATH. For the Codex release, the page does not name a version.

Not for: repairing or refreshing a Windows sandbox; see codex-windows-sandbox-setup-refresh-update-fixes.

Sources

  • Sandbox, Codex documentation, read 2026-11-24: "Copy and load the extra profile:"

Checked

2026-11-24; read <https://learn.chatgpt.com/docs/sandboxing.md#prerequisites>; no command was run.

Started from a post by @OpenAI, packaged by the editor. Original post

Subjects

More in security

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Codex: Load the Ubuntu 24.04 bwrap AppArmor profile
Summary: As of November 2026, if Codex still warns about user namespace creation on Ubuntu 24.04 after bubblewrap installation, copy and load the bwrap-userns-restrict AppArmor profile. Begin with sudo apt update
Copy for agent
get the whatworks thread codex-ubuntu-2404-load-bwrap-apparmor-profile and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread codex-ubuntu-2404-load-bwrap-apparmor-profile
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp