Subprocess-only permission errors occur when the agent launches children with a different identity, environment, namespace, filesystem view, or security policy.
An agent process may read a household file or call a tool successfully, then receive permission denied when the same action runs through a shell, Python worker, container, or sandbox. The child can lose supplementary groups, credentials, environment variables, capabilities, socket access, mount visibility, or executable permission. The command text is identical, but its security context is not.
The Child Can Inherit a Different User and Credential Set
Launchers can set UID, GID, supplementary groups, umask, working directory, environment, and file descriptors. Service managers, setuid helpers, containers, and worker pools may intentionally drop privileges before executing generated code. This distinction remains visible during later household testing.
A practical analysis of process security context starts with identity, security policy, and namespace checks rather than assuming Unix mode bits tell the whole story. The signature is different id, groups, umask, or credential availability inside the child.
A parent running as root does not guarantee an unrestricted child, and numeric IDs can map differently across containers or network shares. Compare effective identity at the failing syscall. The intermediate result must remain inspectable before automation follows.
Namespaces, Mounts, and Sandboxes Change the Filesystem View
A subprocess may enter a container or sandbox where paths are read-only, hidden, remapped, mounted noexec, or owned by another numeric ID. Unix sockets and device files may be absent even when regular files appear.
A sandbox troubleshooting case shows sandbox socket permissions when a child cannot access the forwarded socket it needs. The lesson is that permission denied can describe connectivity or namespace policy, not only file contents. That boundary should be measured separately under realistic operating conditions.
If the child sees another inode, mount options, or path, changing host permissions may not affect it. Resolve the path and mount identity from inside the failing context. The practical consequence appears when several sources compete for limited context.
Capabilities and Mandatory Policies Can Deny Allowed Mode Bits
Linux capabilities split root privileges, while SELinux, AppArmor, seccomp, and sandbox rules can reject operations despite owner read or execute bits. Network, ptrace, device, and mount operations are common boundaries. This dependency should remain explicit in the final interface.
The capabilities and security labels model lists UID and GID controls alongside capabilities and security labels. Those independent layers explain why chmod alone can leave the subprocess failure unchanged. The result must therefore be checked against the original evidence.
The failure boundary is an application-generated permission message that does not correspond to an OS denial. Capture errno, audit logs, and the exact syscall before weakening sandbox policy or making files world-writable. This distinction remains visible during later household testing.
Diff Parent and Child Security Contexts at the Failing Call
Capture executable path, arguments, cwd, UID, GID, groups, umask, environment names, file descriptors, namespace IDs, mount table, path inode, mode, ACL, security label, capabilities, seccomp state, socket presence, errno, and audit decision in parent and child.
Use agent capability controls to relate the result to agent tool scope. Reproduce with a minimal child process and add the launcher, container, and sandbox layers back one at a time. The intermediate result must remain inspectable before automation follows.
Grant only the missing capability, group, mount, socket, or path. Keep the restriction when it reflects intended isolation; subprocess failure can be evidence that the home AI trust boundary is working correctly. That boundary should be measured separately under realistic operating conditions.
Tech & AI HUB
More to Read

What Causes an AI Agent Planner to Repeat Steps It Already Completed?
Trace repeated planner steps through state persistence, completion evidence, tool-result parsing, context retention, retries, replanning, and stop conditions.

What Causes CPU Saturation When Hardware Transcoding and Video AI Run Together?
Trace CPU saturation across codec offload, pixel conversion, frame copies, AI preprocessing, audio, subtitles, storage, and process scheduling.

What Causes the Same Local LLM to Return Inconsistent JSON Schemas?
Diagnose inconsistent local JSON by freezing the model path, prompt, schema, decoder constraints, sampling, context, stop conditions, and repair layer.

