# Codex capability audit

Rule: add only an independent missing capability. A different flag, tool name or implementation does not make one; overlaps stay unchanged.

- **147**: feature flags
- **30**: CLI subcommands
- **38**: tool-handler modules

All classified, including experimental, removed and internal entries, so these are not counts of independent capabilities. An overlap classification does not assert identical behaviour.

## Adopted

| Subsystem | Decision and reason |
| --- | --- |
| `openprogram permissions check`, `test` | Read-only explanation and self-test of permission rules with the original matcher. Enforcement unchanged. |
| Command network domains | Optional, macOS: authenticated local proxy plus Seatbelt. Default networking unchanged. Private destinations rejected. Linux and WSL refuse execution in domain mode. |
| `execution.prevent_idle_sleep` | Off by default. One handle per active execution, released on completion, error or cancellation: an IOKit assertion on macOS, a system-required power request on Windows, a `systemd-inhibit` lock on idle and sleep on Linux. Display sleep is unaffected; on Linux a suspend the user asks for waits too. Read at the next execution. Failure to acquire logs a warning; the task continues. A resource lifecycle around dispatcher execution only. |
| `bash` sessions | See `execution` below. |
| `execution` | `bash` follows unified_exec's exec_command: it yields after `yield_time_ms` and a running command continues as a session that `write_stdin` polls, interrupts or types into (tty), with Codex's 64-session cap and LRU pruning. Sessions run on the existing managed-process supervisor, so they survive worker restarts. zsh forks and shell snapshots are not adopted. See [command sessions](https://fzkuji.github.io/OpenProgram/docs/reference/design/runtime/execution/command-sessions.html). |
| `network` | Baseline shell sandbox has a network boolean; safe_http protects managed HTTP clients, not arbitrary command sockets. Per-command OS-enforced destination domains are missing. Retain optional macOS managed proxy; default network modes remain unchanged. |
| `power` | No baseline power assertion or sleep inhibitor found in runtime, desktop or scripts. Separate opt-in runtime power assertion is an independent missing capability; no display wake or permanent power-setting changes. |

Not added: context, patching, environment filtering, project instruction hierarchy, context-remaining tools. Existing implementations stay.

## Overlaps, left unchanged

| Subsystem | Decision and reason |
| --- | --- |
| `context` | Context projection, summaries, budgets and occupancy already exist. Different algorithms or provider endpoints are overlapping implementations; leave them unchanged. |
| `patch` | Patch editing, file-change receipts and worktrees already exist. Move syntax, fuzzy matching, line-ending preservation and streaming patch progress are extensions of existing behavior; excluded. |
| `runtime` | Durable execution, programmatic calls and cancellation already exist. A JavaScript/V8 runtime or different execution transport would overlap, not fill a missing product function. |
| `history` | Persistence, branches, resumable effects and transcript UI already exist. Codex rollout migration and compression concern a different storage format; no storage rewrite. |
| `memory` | Persistent memory, archived sources and consolidation exist. Foreign memory formats and passive screen memory expand that existing system and are excluded under the no-overlap rule. |
| `permissions` | Existing rule enforcement, approval and model review remain unchanged. Only a separate read-only rule explanation/self-test CLI is retained. |
| `sandbox` | Existing Seatbelt and bubblewrap/WSL enforcement overlaps these mechanisms. Native Windows and Landlock are alternate implementations, not adopted. |
| `providers` | Model discovery, credential sources, proxy-aware HTTP, failover and transport already exist. OpenAI-specific payload compression and infinite retry policies are overlapping/provider-specific behavior; no replacement. |
| `multiagent` | Child agents, message delivery, durable jobs and goals already exist. Do not add a second collaboration or goal subsystem. |
| `mcp` | MCP tools/resources/auth and resource interfaces exist. Protocol revisions, MCP Apps and endpoint overrides extend overlapping integrations; not automatically migrated. |
| `discovery` | Tool discovery, marketplace installs, plugin hooks and skills already exist. Recommendations, sharing and dependency convenience features overlap these systems; leave them unchanged. |
| `interaction` | Questions, owner responses, queued follow-ups and messaging exist. Async variants and mention UI are overlapping interaction behavior. |
| `web` | Web search, image viewing, browser tools and GUI control exist. Provider-specific external/full-CDP variants are not new standalone gaps. |
| `media` | Images, attachments, speech output, dictation and canvas/artifacts exist. Full realtime duplex voice and image-budget algorithms overlap media subsystems; no rewrite or parity claim. |
| `desktop` | Worker supervision, chat, scheduled work and updates already exist. Transport/daemon variants remain unchanged. |
| `diagnostics` | Usage accounting, execution observation and health diagnostics exist. Plan-allowance history and internal Responses metadata are provider-specific or overlapping. |
| `hooks` | Existing hook/gate system remains unchanged; no new compaction gate in this scoped migration. |
| `guidance` | Agent workspace instructions, time/environment context, rendering guidance and bundled document dependencies exist. Project-rule hierarchy and a context-capacity tool overlap these existing abilities and are removed from the candidate. |
| `wait` | Waiting/polling/scheduling already exists; no duplicate sleep tool. |

**Source paths**

| Subsystem | Paths |
| --- | --- |
| `execution` | `openprogram/programs/tools/files/bash/session.py` `openprogram/programs/tools/files/write_stdin.py` `openprogram/host/processes/` `openprogram/host/resources/terminal.py` |
| `context` | `openprogram/runtime/context/compaction/request.py` `openprogram/runtime/context/engine.py` `openprogram/runtime/context/token_accounting/session_stats.py` `openprogram/runtime/context/compaction/bounded_summary.py` |
| `patch` | `openprogram/programs/tools/files/apply_patch.py` `openprogram/state/store/snapshot/checkpoint` `openprogram/state/worktree` |
| `runtime` | `openprogram/runtime/agent/runtime` `openprogram/programs/tools/code/execute_code.py` `openprogram/runtime/execution` |
| `history` | `openprogram/state/store/session` `openprogram/runtime/execution` `apps/web/components/chat` |
| `memory` | `openprogram/state/memory/store.py` `openprogram/state/memory/scheduler.py` |
| `permissions` | `openprogram/runtime/permissions/policy.py` `openprogram/runtime/permissions/approvals/approval.py` `openprogram/runtime/permissions/auto_mode/auto_review.py` |
| `sandbox` | `openprogram/host/sandbox/__init__.py` `openprogram/host/_platform/environment.py` |
| `network` | `openprogram/host/sandbox/__init__.py` `openprogram/host/security/safe_http.py` `openprogram/host/security/url_policy.py` |
| `providers` | `openprogram/models/providers` `openprogram/models/auth` `openprogram/host/security/safe_http.py` |
| `multiagent` | `openprogram/programs/tools/agents` `openprogram/runtime/jobs` `openprogram/programs/tools/planning/goal` |
| `mcp` | `openprogram/extensions/mcp/client.py` `openprogram/extensions/mcp/oauth_flow.py` `openprogram/host/resources` |
| `discovery` | `openprogram/programs/__init__.py` `openprogram/extensions/plugins/marketplace.py` `openprogram/extensions/plugins/installer.py` `openprogram/extensions/plugins/hooks.py` `openprogram/extensions/skills/discovery.py` `openprogram/extensions/skills/loader.py` |
| `interaction` | `openprogram/programs/tools/interaction/clarify.py` `openprogram/programs/tools/interaction/ask_user.py` `openprogram/runtime/agent/loop/` `openprogram/interfaces/channels` |
| `web` | `openprogram/programs/tools/web` `openprogram/programs/tools/computer_use/computer_use/code_mode/sandbox/isolation.py` `openprogram/programs/applications/browser` `apps/desktop` |
| `media` | `openprogram/programs/tools/web/image_generate` `openprogram/programs/tools/web/image_analyze` `openprogram/interfaces/speech/tts.py` `openprogram/state/attachments.py` `openprogram/programs/tools/interaction/canvas.py` `apps/web` |
| `desktop` | `openprogram/operations/worker` `openprogram/runtime/scheduler` `openprogram/runtime/proactive` `openprogram/operations/self_update` `apps/desktop` `apps/cli` |
| `diagnostics` | `openprogram/models/usage` `openprogram/runtime/events` `openprogram/runtime/execution` `openprogram/interfaces/cli/commands/maintenance/doctor.py` |
| `hooks` | `openprogram/runtime/events/bus.py` `openprogram/runtime/events/shell_hooks.py` `openprogram/extensions/plugins/hooks.py` |
| `guidance` | `openprogram/runtime/context/prompt_assembly/components.py` `openprogram/runtime/agent_registry/workspace.py` `openprogram/programs/applications/office_editor/assets.py` |
| `wait` | `openprogram/runtime/agent/runtime` `openprogram/runtime/scheduler` `openprogram/host/processes` |
| `power` | `openprogram/host/_platform` `openprogram/runtime/conversation/turn_runtime/loop_runner.py` |

**Feature flags (147)**

| Subsystem | Status: flags |
| --- | --- |
| `diagnostics` | Experimental: `analytics_plan_history` Stable: `content_item_kinds` Under development: `executed_tool_call_metadata`, `runtime_metrics`, `concurrent_reasoning_summaries` Removed: `workspace_owner_usage_nudge` |
| `desktop` | Experimental: `daemon_auto_start` Stable: `in_app_chat`, `in_app_local_automation`, `in_app_updates` Removed: `remote_control`, `tui_app_server` |
| `history` | Under development: `transcript_v2`, `local_thread_store_compression`, `background_paginated_rollout_migration` Removed: `sqlite`, `local_thread_store_shared_compression`, `item_ids` |
| `patch` | Removed: `undo`, `codex_git_commit`, `apply_patch_freeform` Under development: `cwd_relative_turn_diffs`, `apply_patch_streaming_events`, `apply_patch_preserve_line_endings` Stable: `worktrees` |
| `execution` | Stable: `shell_tool`, `unified_exec`, `unified_exec_tty`, `shell_snapshot` Under development: `shell_zsh_fork`, `powershell_shell_version`, `shell_snapshot_v2`, `deferred_executor`, `executor_capability_discovery` Removed: `unified_exec_zsh_fork` |
| `web` | Stable: `view_image`, `in_app_browser`, `browser_use`, `browser_use_full_cdp_access`, `browser_use_external`, `computer_use` Deprecated: `web_search_request`, `web_search_cached` Under development: `standalone_web_search` Removed: `search_tool` |
| `wait` | Stable: `sleep_tool` |
| `providers` | Stable: `secret_auth_storage`, `enable_request_compression`, `unbounded_connection_retries`, `fast_mode` Removed: `remote_models`, `responses_websockets`, `responses_websockets_v2` Under development: `api_key_model_discovery`, `respect_system_proxy`, `use_xaa`, `reasoning_effort_override`, `bedrock_setup_wizard`, `step_model_switching`, `use_agent_identity` |
| `runtime` | Removed: `js_repl`, `code_mode_buffered_exec`, `js_repl_tools_only` Under development: `code_mode`, `code_mode_prewarm`, `code_mode_interrupt`, `code_mode_only` Stable: `code_mode_host` |
| `guidance` | Removed: `terminal_resize_reflow`, `personality` Under development: `terminal_visualization_instructions`, `current_time_reminder`, `nonfatal_clock_read_errors` Stable: `workspace_dependencies` |
| `memory` | Stable: `memories` Under development: `external_agent_memory_import`, `chronicle` |
| `permissions` | Under development: `exec_permission_approvals`, `write_stdin_approval`, `request_permissions_tool`, `guardianv2.thread_context`, `guardian_reuse_parent_compaction`, `guardian_enhanced_node_repl_transcripts`, `guardian_node_repl_transcript_images`, `guardianv2` Removed: `request_rule`, `guardian_ext` Stable: `guardian_approval` |
| `hooks` | Stable: `hooks` |
| `sandbox` | Removed: `use_linux_sandbox_bwrap`, `experimental_windows_sandbox`, `elevated_windows_sandbox` Deprecated: `use_legacy_landlock` Under development: `windows_sandbox_service` |
| `network` | Experimental: `network_proxy` |
| `multiagent` | Stable: `multi_agent`, `multi_agent_v2`, `goals` Removed: `multi_agent_mode`, `enable_fanout`, `send_async_message`, `collaboration_modes` |
| `mcp` | Stable: `apps`, `tool_call_mcp_elicitation`, `auth_elicitation` Under development: `psp`, `enable_mcp_apps`, `mcp_2026_07_28`, `codex_apps_mcp_2026_07_28`, `mcp_oauth_refresh_coordination`, `non_prefixed_mcp_tool_names` Removed: `apps_mcp_path_override` |
| `discovery` | Removed: `tool_search`, `tool_search_always_defer_mcp_tools`, `unavailable_dummy_tools`, `plugin_hooks`, `external_migration`, `skill_env_var_dependency_prompt` Under development: `deferred_tool_world_state`, `skip_host_skill_discovery` Stable: `tool_suggest`, `recommended_plugins`, `plugins`, `remote_plugin`, `plugin_sharing`, `skill_mcp_dependency_install`, `skill_search` |
| `media` | Stable: `in_app_dictation`, `image_generation`, `realtime_conversation` Under development: `omit_app_server_notification_media`, `image_resize_notice`, `unified_image_budget`, `artifact` Removed: `resize_all_images`, `image_detail_original` |
| `interaction` | Stable: `mentions_v2` Removed: `steer` Under development: `default_mode_request_user_input`, `send_message_to_user_async` |
| `context` | Under development: `token_budget`, `context_management`, `rollout_budget`, `retain_client_developer_messages` Removed: `remote_compaction_v2` Stable: `compaction_image_budget` |
| `power` | Experimental: `prevent_idle_sleep` |

**CLI subcommands (30)**

| Class | Entries |
| --- | --- |
| `history` | `Agents`, `Resume`, `Queue`, `Archive`, `Delete`, `MigrateRollouts`, `Unarchive`, `Fork` |
| `internal` | `TcpTunnel`, `ResponsesApiProxy`, `StdioToUds` |
| `execution` | `Exec`, `Review`, `ExecServer` |
| `providers` | `Login`, `Logout` |
| `mcp` | `Mcp` |
| `discovery` | `Plugin` |
| `desktop` | `AppServer`, `RemoteControl`, `App`, `Completion`, `Update` |
| `diagnostics` | `Doctor`, `Debug`, `Features` |
| `sandbox` | `Sandbox` |
| `permissions` | `Execpolicy` |
| `patch` | `Apply` |
| `external` | `Cloud` |

**Tool handlers (38)**

| Class | Entries |
| --- | --- |
| `patch` | `apply_patch`, `apply_patch_spec` |
| `guidance` | `current_time`, `get_context_remaining`, `get_context_remaining_spec` |
| `discovery` | `dynamic`, `extension_tools`, `list_available_plugins_to_install`, `list_available_plugins_to_install_spec`, `request_plugin_install`, `request_plugin_install_spec`, `tool_search`, `tool_search_spec` |
| `mcp` | `mcp`, `mcp_resource`, `mcp_resource_spec` |
| `multiagent` | `multi_agents`, `multi_agents_common`, `multi_agents_spec`, `multi_agents_v2`, `plan`, `plan_spec` |
| `context` | `new_context_window`, `new_context_window_spec` |
| `permissions` | `request_permissions` |
| `interaction` | `request_user_input`, `request_user_input_async`, `request_user_input_spec`, `send_message_to_user_async` |
| `execution` | `shell_spec`, `unified_exec` |
| `wait` | `sleep`, `wait_for_environment` |
| `internal` | `test_sync`, `test_sync_spec`, `permission_preapproval_tests` |
| `web` | `view_image`, `view_image_spec` |

`external`: depends on an OpenAI-hosted service. `internal`: transport or test infrastructure, not a portable product gap.

**Acceptance**

Through the public entries: CLI rule explanations and assertions, sandbox command restrictions, configuration and the real dispatcher lifecycle. Covers disabled defaults, cleanup on failure, independent concurrent assertions and unsupported platforms.

## Sources and limits

[Official Codex source](https://github.com/openai/codex): `codex-rs/features/src/lib.rs`, `codex-rs/cli/src/main.rs`, `codex-rs/core/src/tools/handlers/mod.rs`, `codex-rs/utils/sleep-inhibitor`. Covers public capability entry points of a pinned snapshot, not every Rust crate or closed service, and claims no parity with current Codex products.

## Implementation status

Permission CLI, macOS domain restrictions and idle-sleep prevention are in place. Native assertion acquire and release are verified.
