codex - 💡(How to fix) Fix Plugins need declarative router-selection metadata for broad host workflows [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#19883Fetched 2026-04-28 06:35:38
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3
RAW_BUFFERClick to expand / collapse

What version of Codex is running?

Current main as of 2026-04-27.

What problem should this solve?

Codex plugins can expose many skills, MCP servers, and app connectors. For some plugin families, broad user requests need one top-level router skill to own the turn before more specialized skills are considered.

Today the reliable paths for activating a plugin skill are explicit user selection, $skill mention syntax, or model interpretation of the available skills list. Those are good for explicit invocation, but they do not give a plugin a declarative way to say:

  • this host surface is allowed to auto-select me
  • these prompt or workspace signals indicate my broad router should own the turn
  • do not auto-select me if the user already selected a skill explicitly
  • when matched, select this specific top-level router skill

That leaves host integrations with weaker alternatives:

  • encode plugin-specific lexical routing in the host
  • inject synthetic user text to force a router
  • require users to manually name the router for every broad request
  • hope the model infers the intended owner from available-skill prose

Desired behavior

It would be useful for a plugin manifest, or another plugin-owned metadata surface, to support declarative router-selection metadata.

Conceptually, the metadata could describe:

  • host scopes where the rule is eligible, such as desktop/app-server surfaces
  • prompt signals that indicate the plugin's broad domain
  • workspace markers such as files or extensions
  • suppression policy when an explicit skill has already been selected
  • the fully qualified top-level router skill to select

The host would consume this metadata from normal plugin load/cache state and, when enabled for that host surface, convert a match into structured skill selection. It should not need to synthesize user text or rediscover plugin manifests per turn.

Non-goals

This issue is not asking Codex to:

  • hardcode any particular plugin or domain into the host
  • change explicit $skill invocation semantics
  • auto-run plugin tools
  • mutate the user's message
  • make broad routing mandatory for every plugin

The ask is only for a generic contract that lets a plugin declare when a host may select one top-level router skill for broad workflows.

Minimal validation shape

A useful validation shape would cover:

  • explicit skill selection wins and suppresses automatic router selection
  • a natural broad prompt can select the configured top-level router
  • a non-matching prompt does not select the router
  • workspace-only markers can select the router when configured
  • disabled or missing target skills are not selected
  • route evidence identifies the selected router independently of final answer text

Why this belongs in plugin metadata

The plugin is the component that knows its broad entrypoint, domain signals, and suppression policy. The host should provide the safe selection mechanism, but it should not need domain-specific routing rules for each plugin.

extent analysis

TL;DR

Add a declarative router-selection metadata to the plugin manifest to enable hosts to auto-select top-level router skills for broad workflows.

Guidance

  • Introduce a new metadata field in the plugin manifest to describe the host scopes, prompt signals, workspace markers, and suppression policy for the top-level router skill.
  • Define a validation shape to ensure the metadata is correctly interpreted by the host, covering cases such as explicit skill selection, broad prompts, and workspace-only markers.
  • Update the host to consume the metadata from the plugin load/cache state and convert matches into structured skill selection.
  • Consider implementing a fallback mechanism to handle cases where the target skill is disabled or missing.

Example

{
  "routerSelection": {
    "hostScopes": ["desktop", "app-server"],
    "promptSignals": ["keyword1", "keyword2"],
    "workspaceMarkers": ["file_extension"],
    "suppressionPolicy": "explicit_skill_wins",
    "topLevelRouterSkill": "fully_qualified_skill_name"
  }
}

Notes

The proposed solution relies on the plugin providing accurate metadata, and the host correctly interpreting it. Additional error handling and logging may be necessary to ensure a smooth user experience.

Recommendation

Apply workaround by introducing the declarative router-selection metadata to the plugin manifest, as it provides a flexible and scalable solution for plugins to declare their broad entrypoints and domain signals.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING