Skip to content

Codex CLI: bubblewrap (bwrap) sandbox fails on Synology NAS — apply_patch broken #16

@tchirou

Description

@tchirou

Image Variant

Full (latest / dev)

Image Tag / Version

Latest

Host OS

Linux

What happened?

Environment

  • Host: Synology NAS (DSM 7.x)
  • HolyClaude: latest
  • Platform: linux/amd64
  • Deployment: Docker Compose behind Traefik + Authentik

Problem

When using the Codex CLI inside HolyClaude on a Synology NAS, the apply_patch
tool fails with the following error:

bwrap: Creating new namespace failed: Operation not permitted

This is caused by Synology's kernel restricting user namespaces, which bubblewrap
requires to create its sandbox. As a result, Codex CLI cannot write files through
its normal sandboxed mechanism and falls back to asking the user to explicitly
authorize "patch via shell" for every file edit.

What did you expect?

No fail

Steps to reproduce

  1. Deploy HolyClaude on a Synology NAS using the provided docker-compose
  2. Start a Codex CLI session
  3. Ask Codex to edit any file
  4. Observe: Failed to apply patch / bwrap: Creating new namespace failed

Expected behavior

Codex CLI should be able to edit files without requiring explicit shell fallback
authorization on every patch.

Suggested fix

Install bubblewrap in the image with the setuid bit set, which allows it to
work without user namespace support:

RUN apt-get install -y bubblewrap && chmod u+s /usr/bin/bwrap


### Docker Compose / Run command

```yaml

Logs / Error output

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions