Skip to content

[Bug]: Codex child started by delegate_task on macOS gets a dead shell (every command exits 134) when the user's config sets default_permissions to a custom [permissions] profile; the built-in :workspace default works #16458

Description

@kamil-koryciorz

Before submitting

Area

apps/server

Steps to reproduce

  1. Codex CLI 0.160.1, authenticated. In ~/.codex/config.toml define a custom permissions profile and make it the default:
default_permissions = "claude-only"

[permissions.claude-only]
description = "Projects only; one folder explicitly denied."

[permissions.claude-only.filesystem]
":root" = "deny"
":minimal" = "read"
"~/Projects" = "write"
"~/.t3/scratch" = "write"
"~/.t3/worktrees" = "write"
"~/<denied-folder>" = "deny"
"~/.config/gh" = "read"
"~/.gitconfig" = "read"
"~/.codex/packages" = "read"
"~/.local/bin" = "read"

[permissions.claude-only.network]
enabled = true

[permissions.claude-only.network.domains]
"api.github.com" = "allow"
"github.com" = "allow"
  1. From a Claude thread (orchestrator V2), call delegate_task with target.providerInstanceId = "codex", model = "gpt-6-sol", runtimeMode = "auto", mode = "wait", task text: run echo probe-ok and report the raw tool result.
  2. Change only line 1 to default_permissions = ":workspace" and repeat step 2.

Expected behavior

Both runs execute the command inside the child's sandbox and return probe-ok.

Actual behavior

  • With the custom profile as default: every exec_command returns at once with {"exit_code":134,"wall_time_seconds":0.000006,"output":""}. Same for cat, ls, pwd. Exit 134 is SIGABRT, so the sandboxed process aborts before the command runs. Text-only tasks (no tool calls) complete normally. With runtimeMode = "approval-required" the child does not start at all: failed to load AGENTS.md instructions: Operation not permitted.
  • With default_permissions = ":workspace": {"exit_code":0,"wall_time_seconds":0.000006166,"output":"probe-ok\n"}.

Controls outside T3, same binary and config, custom profile active (no -s flag), from a terminal: codex exec -m gpt-6-sol 'Run the shell command: echo probe-ok…' returns exit 0 / probe-ok both from ~/.t3/scratch and from a linked git worktree under ~/.t3/worktrees. So the profile works for Codex on its own; it breaks only under T3's launch, where T3 applies its own sandbox settings for the child on top of the user's default profile (per #6976 the user profile is not authoritative in T3). The child's effective profile then starts with a root read grant while the user profile's first entry is ":root" = "deny". That overlap is my best guess at the trigger; not isolated further. This report is not the inheritance request from #6976: whatever T3 decides to apply, the child's shell should either run or fail with a clear configuration error, not abort every command with exit 134.

Reproduced on 2026-10-05 and 2026-10-06 across one nightly update and one Codex patch (0.160.0 → 0.160.1).

Impact

Major degradation or frequent failure (anyone with a custom default_permissions profile cannot use Codex children for shell work)

Version or commit

T3 Code Nightly 0.0.46-nightly.20261005.2689 (also .2676)

Environment

macOS 26.7.1 (Apple Silicon), desktop app, Codex CLI 0.160.1 (also 0.160.0), parent thread on Claude (claude-fable-5-1). Codex binaryPath is a one-line wrapper: exec "$(readlink -f "$(command -v codex)")" "$@".

Logs or stack traces

# child's tool result, every command, custom profile as default
{"exit_code":134,"wall_time_seconds":0.000006,"output":""}
# same child, approval-required
failed to load AGENTS.md instructions: Operation not permitted
# default_permissions commented out (for completeness): Codex refuses to load
failed to load configuration: config defines `[permissions]` profiles but does not set `default_permissions`
# default_permissions = ":workspace"
{"exit_code":0,"wall_time_seconds":0.000006166,"output":"probe-ok\n"}

Workaround

Switch default_permissions to the built-in :workspace while a Codex child needs a shell, which gives up the custom deny rules. Otherwise run Codex children text-only (no tools). Direct codex exec from a terminal is unaffected.

Written with Claude Fable 5.1 through T3's MCP tools; the human owner reviewed before posting.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions