Skip to content

Persistent capability registry for skills and tools with lazy health checks #30578

Open

Description

@BochengYao

Summary

Codex should maintain a persistent, privacy-safe capability registry for installed skills, plugins, MCP servers, and tools, then use lazy targeted health checks instead of repeatedly rediscovering capabilities from scratch.

This would reduce unnecessary tool calls, latency, context usage, misleading "not installed" messages, and premature fallback to less suitable methods.

Problem

An installed capability is not the same as a capability that is usable in the current session.

A skill, plugin, or MCP server may be:

  • installed and configured;
  • waiting for authentication;
  • healthy locally but not attached to the current thread;
  • temporarily unhealthy;
  • disabled by policy;
  • genuinely missing.

Today these states can be conflated. In practice, Codex may repeatedly check whether a known skill or tool exists, conclude that an installed capability is unavailable or absent, ask about installation again, or fall back to another method. The repeated discovery loop consumes time and model context without resolving session-level failures.

Proposed behavior

Add a host-owned persistent capability registry with explicit states such as:

  • configured
  • ready
  • needs_auth
  • unavailable_in_session
  • unhealthy
  • missing

Each entry could include only safe metadata:

  • capability name and type;
  • enabled/configured state;
  • source and version;
  • a configuration or content fingerprint;
  • last successful targeted check;
  • a short non-secret diagnostic;
  • session attachment status stored separately from persistent configuration state.

Suggested flow:

  1. Consult the registry before broad discovery.
  2. Reuse unchanged installation and configuration facts.
  3. Invalidate an entry when its plugin version, skill content, MCP configuration, authentication state, or policy fingerprint changes.
  4. When an action needs a session-scoped tool, perform one targeted live check.
  5. Distinguish "configured but not attached to this session" from "not installed".
  6. Suggest installation only for a genuinely missing capability.
  7. Avoid repeating an identical failed check within the same turn or thread unless evidence changes.

A compact diagnostics surface could also show:

Configured: yes
Authenticated: yes/no
Attached to current session: yes/no
Last targeted check: success/error/timeout
Last non-secret error: ...

Security and privacy boundaries

The registry should not store tokens, credentials, headers, environment-variable values, full tool outputs, or sensitive endpoint details.

Cached state must never bypass:

  • tool approvals;
  • sandbox restrictions;
  • authentication;
  • workspace or administrator policy;
  • a required current-session readiness check.

In particular, a cached ready state must not be treated as proof that the capability is attached to a new thread.

Benefits

  • fewer redundant discovery calls;
  • lower token and latency overhead;
  • fewer incorrect installation prompts;
  • more precise recovery guidance;
  • less unnecessary fallback behavior;
  • clearer separation between installation, runtime health, authentication, policy, and per-session attachment.

Proof of concept

I built an installable Codex plugin that demonstrates the state model, fingerprint invalidation, redacted inventory, compact scan output, and agent workflow:

https://github.com/BochengYao/codex-capability-registry

The plugin intentionally cannot change Codex's host-level tool injection. It exists to demonstrate the workflow and the boundary that requires native support.

Related issues

Those issues cover narrower discovery and diagnostics failures. This request is for a shared capability-state layer across skills, plugins, MCP servers, and session tool availability.

Success criteria

  • unchanged capability metadata is reused across sessions;
  • configuration changes invalidate only affected entries;
  • per-session readiness remains live and separate from persistent configuration state;
  • Codex performs targeted checks instead of broad repeated discovery;
  • error messages distinguish missing, authentication-required, unhealthy, policy-blocked, and unavailable-in-session states;
  • cached state never weakens existing security or approval behavior.

Activity

  1. added
    enhancement
    CLI
    skills
    mcp
    session
    config
    on Jun 29, 2026
  2. BochengYao commented on Jun 30, 2026

    @BochengYao
    Author

    I published codex-capability-registry v0.2.0 as a more token-conscious proof of concept for this proposal.

    Changes in v0.2:

    • implicit skill activation is limited to explicit capability failures (missing, unavailable, auth-blocked, unhealthy, repeated discovery, or fallback);
    • show is compact by default, with --verbose for the full cached entry;
    • v0.1 schema-1 caches remain compatible;
    • a deterministic generated-fixture benchmark is included.

    Using ceil(characters / 4), the current fixture measures:

    Artifact Estimated tokens
    Skill metadata 52
    Skill body 238
    Scan output 39
    Compact one-capability lookup 38
    Verbose one-capability lookup 107
    Full disk cache 161

    The full disk cache is measured for comparison but is not automatically loaded into model context. These are plugin-overhead measurements, not proof that every end-to-end Codex task will use fewer tokens; actual savings depend on whether cached capability state prevents a longer repeated-discovery loop.

  3. Rae-physics commented on Aug 29, 2026

    @Rae-physics

    I have a controlled Windows Codex Desktop reproduction of the installed/configured versus model-visible capability conflation described here.

    Environment: Codex Desktop / CLI 0.150.0-alpha.12.2, Windows, 2026-08-29.

    Setup:

    • A valid user-scoped claude skill was installed in the documented user skill location.
    • Its agents/openai.yaml intentionally set policy.allow_implicit_invocation: false.
    • The skill and its external Claude Code transport had already passed real exact-model controls.

    I started twelve fresh tasks covering gpt-5.6-sol, gpt-5.6-terra, and gpt-5.6-luna, each at Low, Medium, High, and X-high. Every task received the same two read-only prompts: first, how it would invoke Opus 5 at Medium without taking action; second, whether a Claude skill was available. They were explicitly forbidden from invoking an external model or changing files.

    Result: 12/12 concluded that no Claude skill, connector, or external-model route was available. Several explicitly treated the injected skill catalog as exhaustive. Some also searched only Codex/plugin compatibility paths and omitted the documented user skill root. No external model was contacted and no file was changed in this matrix.

    Positive control: a fresh gpt-5.6-terra High task received an explicit $claude selection. The host immediately injected the installed skill. Its wrapper requested exact claude-opus-5 at Medium; after the expected narrow outbound-network approval, the call succeeded with model_verified: true, zero observed tools/MCP servers/plugins, and successful first-party claude.ai Max authentication. Applied effort was correctly left unverified because Claude Code did not expose it.

    So the installation and transport were healthy. The failure is that all tested models converted “not present in my implicit-routing catalog” into “not installed/unavailable,” rather than distinguishing installed/configured, implicit-eligible, explicitly resolvable, and runtime-ready states.

    The raw rollout identifiers are retained locally and can be supplied through a private /feedback upload if an OpenAI maintainer wants them.

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

    CLIconfigenhancementmcpsessionskills

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions