Skip to content

Harden Codex unattended launch: apps connector, hook trust, flag order, alt-screen - #392

Merged
tildesrc merged 1 commit into
mainfrom
panopticon/codex-launch-hardening
Aug 24, 2026
Merged

Harden Codex unattended launch: apps connector, hook trust, flag order, alt-screen#392
tildesrc merged 1 commit into
mainfrom
panopticon/codex-launch-hardening

Conversation

@tildesrc

Copy link
Copy Markdown
Contributor

Summary

  • features.apps = false disables Codex's built-in apps connector, which cannot start in a container and stalls every spawn on its 30 s MCP timeout. The [mcp_servers.codex_apps] enabled = false alternative is invalid config that crash-loops Codex at startup — the feature flag is the only safe disable.
  • --dangerously-bypass-hook-trust added to launch_argv on both first-run and resume paths: since PR Wire the Codex turn-flip hooks (M3.6: completes the AgentCLI seam) #387 wired Stop/UserPromptSubmit hooks into config.toml, Codex now prompts interactively to trust each hook hash; with no operator in the container this hangs forever.
  • Bypass flags moved after resume --last (codex resume --last --flags), matching the reference implementation's required argument order.
  • --no-alt-screen on every launch so Codex renders into tmux scrollback instead of the alternate screen, keeping tmux attach history accessible.

🤖 Generated with Claude Code

…r, alt-screen

Four fixes to make Codex spawn reliably without an operator in the container:

- `features.apps = false` in config.toml disables the built-in apps connector,
  which cannot start in a container and stalls every spawn on its 30 s MCP timeout.
  The `[mcp_servers.codex_apps] enabled = false` alternative is invalid config that
  crash-loops Codex — the feature flag is the only safe disable.

- `--dangerously-bypass-hook-trust` added to launch_argv (first run and resume):
  since PR #387 wired Stop/UserPromptSubmit hooks into config.toml, Codex prompts
  interactively to trust each hook hash; with no operator this hangs indefinitely.

- Bypass flags moved after the `resume` subcommand (`codex resume --last --flags`),
  matching the reference implementation's required argument order.

- `--no-alt-screen` on every launch so Codex renders into tmux scrollback instead
  of the alternate screen, keeping `tmux attach` history accessible.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@tildesrc
tildesrc force-pushed the panopticon/codex-launch-hardening branch from 1343440 to 622bf0b Compare August 24, 2026 02:12
@tildesrc
tildesrc merged commit 8e0f466 into main Aug 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant