Problem
The execute_code tool fails with:
bwrap: No permissions to create new namespace, likely because the kernel does not allow non-privileged user namespaces.
Impact
- Agents cannot execute shell commands via
execute_code
- Agents cannot run
docker ps, ssh, or other system commands
- Agents fall back to MCP tools (which may not be available)
- Limits agent autonomy for system administration tasks
Root Cause
The sandbox uses bubblewrap (bwrap) which requires user namespaces. The kernel on the staging server does not allow non-privileged user namespaces.
Current Workaround
Agents use MCP tools instead:
mcp_ssh_bridge_ssh_exec for SSH commands
mcp_ssh_bridge_ssh_docker_ps for Docker
mcp_ssh_bridge_ssh_postgresql_query for PostgreSQL
Investigation Needed
-
Check kernel configuration:
sysctl kernel.unprivileged_userns_clone
-
If disabled, enable it:
echo 'kernel.unprivileged_userns_clone=1' >> /etc/sysctl.conf
sysctl -p
-
Alternative: Use a different sandboxing mechanism (Docker, chroot, etc.)
Security Considerations
- User namespaces can be a security risk if not properly configured
- Need to balance security vs functionality
- Consider using AppArmor/SELinux profiles for additional protection
Acceptance Criteria
Problem
The
execute_codetool fails with:Impact
execute_codedocker ps,ssh, or other system commandsRoot Cause
The sandbox uses bubblewrap (
bwrap) which requires user namespaces. The kernel on the staging server does not allow non-privileged user namespaces.Current Workaround
Agents use MCP tools instead:
mcp_ssh_bridge_ssh_execfor SSH commandsmcp_ssh_bridge_ssh_docker_psfor Dockermcp_ssh_bridge_ssh_postgresql_queryfor PostgreSQLInvestigation Needed
Check kernel configuration:
If disabled, enable it:
Alternative: Use a different sandboxing mechanism (Docker, chroot, etc.)
Security Considerations
Acceptance Criteria