Repository navigation
Description
What variant of Codex are you using?
CLI (codex exec --json), with equivalent app-server support requested.
What feature would you like to see?
Emit a bounded event describing the effective tools and skills offered to the model, through both CLI JSONL and app-server notifications.
Wrappers can observe tool usage through item.* events, but cannot distinguish capabilities that were unavailable, filtered out, or omitted by budgeting from those offered but never used.
The catalog should contain:
- Tools: built-in, hosted, dynamic, extension/plugin, and MCP tool identities, using effective wire namespaces/names. Include provenance and exposure through direct calls, deferred tool search, Code Mode, or multiple surfaces.
- Skills: identities retained in model context after enablement, plugin/environment filtering, and shared budgeting across host, executor, and orchestrator sources. Include source/scope and distinguish duplicate names.
Current behavior
Originally reported with codex-cli 0.142.5; source-rechecked on 2026-09-18 at 7498521d28, since 6be2a6ca95. This latest check is a source audit.
- CLI
thread.startedcarries onlythread_id;turn.startedis empty. Neither stream exposes the effective catalog. skills/listandmcpServerStatus/listprovide separate discovery/inventory views.skills/changedonly signals invalidation. These do not identify the catalog used by a particular model request.- Internal
tool_namespaces_infois opt-in Responses Lite metadata, omits skills and hosted web search, and is not a public lifecycle event.
Event contract
- Emit the initial catalog after tool planning and final skill rendering, before the first sampling request in each turn. Existing thread/turn-start events occur too early.
- Emit updates when the effective catalog changes. Include the captured model and a stable
catalog_idor revision; reflect active policy, including allowlists and exposure restrictions, rather than pending settings. - Associate usage with the originating request/catalog. Yielded Code Mode cells can outlive their turn (#44866), so delayed calls/results cannot simply use the latest catalog event.
- Provide consistent CLI and app-server projections while preserving existing event meanings and fields.
The captured StepContext and finalized ToolRouter provide a starting point (#44242, #45248). For skills, the renderer would need to preserve retained identities alongside its existing text and aggregate counts.
Illustrative event
Proposed CLI shape; event naming and request/call correlation need maintainer agreement:
{
"type": "turn.catalog.updated",
"thread_id": "…",
"turn_id": "…",
"catalog_id": "…",
"model": "…",
"tools": [
{
"namespace": "functions",
"name": "exec_command",
"source": { "kind": "harness" },
"exposure": { "direct": true, "deferred": false, "code_mode_name": null }
},
{
"namespace": "example_mcp",
"name": "search",
"source": { "kind": "mcp", "server": "example_mcp" },
"exposure": { "direct": false, "deferred": true, "code_mode_name": "example_mcp_search" }
},
{
"namespace": null,
"name": "web_search",
"source": { "kind": "hosted" },
"exposure": { "direct": true, "deferred": false, "code_mode_name": null }
}
],
"skills": [
{
"id": "…",
"name": "develop",
"source": { "kind": "host", "scope": "repo" }
},
{
"id": "…",
"name": "review",
"source": { "kind": "orchestrator" }
}
],
"skills_report": {
"total_count": 2,
"included_count": 2,
"omitted_count": 0,
"descriptions_truncated": false
}
}Skill counts describe eligible entries before and after catalog budgeting, not all installed skills.
Constraints
- Emit identity/provenance metadata only: no schemas, descriptions, skill bodies, credentials, or sensitive configuration.
- Bound payload size and explicitly distinguish event truncation from skills omitted from model context. Missing data must not appear as a complete empty catalog.
- Preserve human-readable output and model behavior.
- Keep TUI slash commands, detailed budget utilization, skill-invocation events, and analytics ingestion outside this request.
Activity
rovboyko commentedon Jul 4, 2026
Very useful functionality especially for orchestrating for role-based harnesses. Nice to have this in the CLI.
geserdugarov commentedon Jul 6, 2026
@jif-oai @bolinfest @etraut-openai would you be willing to sanity-check the proposed event shape here? It crosses skills/MCP catalog discovery,
codex exec --json, and app-server stream parity.geserdugarov commentedon Jul 20, 2026
Rechecked against
openai/codexmain atbf3c197(2026-07-20): this is still not implemented in the requested form.Current state:
codex exec --jsonstill definesthread.startedwith onlythread_id, and its JSONL mapper copies only that field fromSessionConfiguredEvent.thread/start/thread/startedpayloads likewise contain no effectivetoolsorskillscatalog.skills/listand thread-scopedmcpServerStatus/list), but they do not solve stream observability: the former is cwd-scoped, the latter covers only MCP inventory, and neither provides the unified set of built-in/MCP/dynamic tools plus skills or commands actually offered to the model.Therefore, a JSONL consumer still cannot calculate “offered → used” without independently reconstructing Codex's discovery and configuration logic.
One relevant implementation detail is that
SessionConfiguredis emitted before MCP initialization, so the earliestthread.startedmay be too early for the negotiated catalog. A dedicated additive event after catalog resolution and before the first turn - such assession.catalogorturn.configured- may therefore be more accurate than extendingthread.started.Before I prepare an implementation, I need explicit maintainer confirmation that this contribution is wanted and agreement on the public event contract.
@pakrym-oai, since you introduced the current
thread.startedJSON event shape, could you please confirm:thread.started, or use a dedicated post-initialization event?codex exec --jsonand app-server parity?If you are not the appropriate owner, could you point me to whoever should approve the direction? I’ll wait for that confirmation before starting implementation.
geserdugarov commentedon Aug 19, 2026
Rechecked against
openai/codexmain at3929c99a97(2026-08-19). This request is still not implemented.Current public surfaces:
codex exec --jsonstill has no catalog/configured event.thread.startedcontains onlythread_id; the mapper and its focused test still assert exactly that shape.thread/startresponse andthread/startednotification expose thread/session metadata but no effective tools, skills, or slash-command catalog.skills/listand thread-scopedmcpServerStatus/listremain separate out-of-band inventories. They do not identify the unified catalog actually offered to the model for a particular turn.One relevant change since
bf3c197is #37492 (2b1811e562), which builds opt-in per-turntool_namespaces_infofor Responses Lite metadata from the effective tool registry. It records model-visible function exposure and harness/MCP ownership, but it is not emitted throughcodex exec --jsonor app-server, does not cover skills, and is not the complete requested catalog.The current lifecycle points more strongly toward a turn-scoped event:
SessionConfiguredis still emitted before initialized MCP bindings are published, while both the effective skill snapshot and effective tool router are resolved per turn. A dedicated additive event after that resolution, such asturn.configured, would therefore be more accurate than extending the earlythread.started.The issue remains current. Maintainer guidance is still needed on the public event contract and whether CLI JSONL and app-server parity should land together.
geserdugarov commentedon Aug 19, 2026
@rka-oai, since you introduced the effective per-turn tool namespace inventory in #37492, could you sanity-check whether exposing a bounded projection of it through
codex exec --jsonand app-server would be an acceptable public contract, and whether such a PR would be welcome?@felixxia-oai, for the skills portion, is the per-turn host skills snapshot the authoritative source for the skill names actually offered to the model?
If either of you is not the appropriate owner, a pointer to the right person would be greatly appreciated.
TyceHerrman commentedon Aug 27, 2026
There is no supported interface that confirms the effective budget, utilization, or whether rendering shortened or omitted anything.
#35597 added useful catalog metrics:
codex.thread.skills.enabled_totalcodex.thread.skills.kept_totalcodex.thread.skills.description_truncated_charscodex.thread.skills.truncated#37149 extended metrics and shared budgeting across executor, orchestrator, and host catalogs. However, these primarily reveal pressure after descriptions have already been shortened or entries omitted. They do not expose the untrimmed catalog cost or percentage of the allowance currently used.
Could the proposed per-turn catalog event include the renderer’s effective report, for example:
This should ideally be emitted after the final per-turn catalog is resolved. That would let Desktop, CLI, hooks, and external dashboards warn at a chosen threshold without independently recreating Codex’s discovery, priority, tokenization, and rendering logic.
geserdugarov commentedon Aug 28, 2026
Thanks - this is adjacent, but I’d prefer to keep #31088 focused on exposing the effective per-turn tool/skill/command identities for offered-to-used analysis. A small omission/truncation indicator may fit, but detailed budget and utilization reporting seems better suited to a separate follow-up and shouldn’t block the core catalog event.
geserdugarov commentedon Aug 28, 2026
Rechecked against
openai/codexmain at6be2a6ca95(2026-08-28). The public gap remains: neithercodex exec --jsonnor app-server lifecycle events expose the effective tool and skill catalog.A relevant change since the previous audit is #41195: the finalized tool plan now lives on the request-scoped
StepContext, including model-visible specifications, Code Mode names, and optional namespace inventory. This provides a clearer authoritative source, but it remains internal, does not cover the final budgeted skill identities, and the existing namespace projection omits hosted web search.I updated the issue description to frame this as a bounded, request-scoped catalog event emitted after resolution and before model sampling, with another event when the effective catalog changes. Detailed budget utilization remains out of scope; a small omission or truncation indicator is sufficient.
geserdugarov commentedon Sep 18, 2026
Source-rechecked at
7498521d28on 2026-09-18, comparing against6be2a6ca95. The effective tool/skill catalog is still absent fromcodex exec --jsonand app-server lifecycle notifications. This was a source/protocol audit.The main changes relevant to this proposal:
ToolRouter.tool_namespaces_inforemains internal, Responses Lite-specific, and incomplete for this request: it omits skills and hosted web search.The proposed scope remains a bounded identity/provenance event before sampling, updated when the catalog changes, with CLI/app-server parity. Skills must reflect the identities retained after filtering and budgeting. Detailed budget utilization and skill-invocation instrumentation remain separate work.
geserdugarov commentedon Sep 18, 2026
@abhinav-oai, your request-inventory work in #45248 seems relevant here. Wrappers can observe tool calls, but cannot distinguish unavailable tools/skills from those offered but unused. A bounded catalog event in
codex exec --jsonand app-server would support capability debugging and offered→used analytics without duplicating Codex's discovery logic.Would a PR be welcome? Could you advise on the event contract or point me to the right owner?
Ksstewart1 commentedon Sep 18, 2026
Pinned Codex0.154.0 App Server over private stdio still lacks a complete effective-tool inventory readback. The generated protocol, server/diagnostics, thread/read, config/read and mcpServerStatus/list expose partial state only. The tool_registry.turn_metadata_includes_tool_info flag is conditional on use_responses_lite in finalize_tool_router; GPT-5.5 currently has use_responses_lite=false. debug prompt-input returns prompt.input, not the finalized tool catalog. Examined0.155.0 ClientRequest/prompt-debug source also does not establish a replacement interface.
Could maintainers identify a supported read-only, session-bound way to obtain the complete finalized inventory BEFORE model sampling, or the smallest upstream change providing it? Our gate must include built-in, hosted, dynamic, MCP/plugin and deferred capabilities, effective wire names/provenance/exposure, model and originating context/catalog identity, and explicit completeness/truncation state. An empty or partial catalog must not count as complete. A prepare-only diagnostic path should use the same captured context and finalized ToolRouter as execution, with changes invalidating the snapshot. It must not require enabling Code Mode, changing authentication, proxying service traffic or logging credentials. This is a request for a supported capability, not a claim that the requested interface exists.