An installable proof-of-concept plugin that remembers configured Codex capabilities and helps avoid repeated discovery when a capability is explicitly failing.
Version 0.2 narrows automatic activation and compact output to reduce the plugin's own context overhead. It does not guarantee lower total token use on every task; savings depend on whether the registry prevents a longer repeated-discovery loop.
An installed capability can be configured correctly yet still be unavailable to a particular thread because of authentication, startup, policy, runtime, or session-attachment problems. Treating every failure as "not installed" causes repeated probing, misleading installation prompts, unnecessary fallbacks, and extra context usage.
This project distinguishes configured, ready, needs_auth, unavailable_in_session, unhealthy, and missing.
- The skill activates only for explicit missing, unavailable, authentication-blocked, unhealthy, repeated-rediscovery, or fallback symptoms.
showreturns onlyname,kind,state, and knownenabled/checked_atfields by default.show --verbosereturns the complete cached entry.- Schema-1 caches created by v0.1 remain readable.
- A deterministic fixture benchmark reports context-facing character and token estimates.
Add this repository as a Codex marketplace:
codex plugin marketplace add BochengYao/codex-capability-registryRestart Codex, open /plugins, select the Capability Registry marketplace, and install Codex Capability Registry. Start a new thread after installation.
The skill activates automatically only when a capability problem is explicit. It can also be invoked directly:
$use-capability-registry Check why Browser is unavailable before choosing a fallback.
Refresh the local inventory:
python plugins/codex-capability-registry/scripts/capability_registry.py scanInspect one capability:
python plugins/codex-capability-registry/scripts/capability_registry.py show --name browserRequest the complete cached entry only when needed:
python plugins/codex-capability-registry/scripts/capability_registry.py show --name browser --verboseThe default cache is $CODEX_HOME/capability-registry/cache.json, falling back to ~/.codex/capability-registry/cache.json.
Run:
python plugins/codex-capability-registry/scripts/benchmark_context.pyThe v0.2.0 fixture uses the conservative estimate ceil(characters / 4):
| Artifact | Characters | Estimated tokens |
|---|---|---|
| Skill metadata | 205 | 52 |
| Skill body | 952 | 238 |
| Scan output | 155 | 39 |
| Compact single-capability output | 151 | 38 |
| Verbose single-capability output | 425 | 107 |
| Full disk cache | 643 | 161 |
The full disk cache is measured for comparison but is not automatically loaded into model context. These figures measure deterministic plugin artifacts, not a real tokenizer bill or universal end-to-end savings.
The registry stores capability names, types, enabled flags, versions, short descriptions, local metadata source paths, fingerprints, timestamps, states, and short diagnostics.
It intentionally does not store tokens, secrets, credentials, environment-variable names or values, MCP endpoints, headers, commands, arguments, complete tool output, or skill instruction bodies.
This plugin cannot change Codex's core tool injection or make a tool appear in the current session. A cached ready or configured state is evidence about local setup, not proof of current-thread availability. The skill still requires one targeted live check before an action depends on a session-scoped tool.
The plugin also cannot bypass sandboxing, approvals, authentication, workspace policy, or administrator controls. It never installs missing software silently.
scan Refresh configured skills, plugins, and MCP servers
show Print compact cached entries; add --verbose for complete entries
check Record an evidence-based state after one targeted check
invalidate Remove one entry or clear the plugin-owned cache
Run python plugins/codex-capability-registry/scripts/capability_registry.py COMMAND --help for command options.
The runtime uses only the Python 3.11+ standard library.
python -m unittest discover -s tests -v
python plugins/codex-capability-registry/scripts/benchmark_context.pyPlugin and skill validation use the validators bundled with Codex's plugin-creator and skill-creator skills.
Open /plugins, select Codex Capability Registry, and choose Uninstall. Remove the marketplace with:
codex plugin marketplace remove codex-capability-registryThe optional cache can then be deleted from ~/.codex/capability-registry/cache.json. No Codex core files are modified.
This is an independent proof of concept, not an OpenAI product. A linked feature request proposes native capability-state caching and session diagnostics inside Codex itself.