Skip to content

fix: don't advertise skills the user disabled - #386

Draft
Ruijian-Zha wants to merge 1 commit into
agentclientprotocol:mainfrom
Ruijian-Zha:fix/available-commands-respect-skill-enabled
Draft

fix: don't advertise skills the user disabled#386
Ruijian-Zha wants to merge 1 commit into
agentclientprotocol:mainfrom
Ruijian-Zha:fix/available-commands-respect-skill-enabled

Conversation

@Ruijian-Zha

Copy link
Copy Markdown

Fixes #385.

buildAvailableCommands() iterated every skill returned by skills/list without checking skill.enabled, so a skill disabled via [[skills.config]] enabled = false in ~/.codex/config.toml was still published to the client as a $-command. The /skills builtin listed them for the same reason.

A client that renders the advertised command list had no way to tell the skill was already turned off, so its UI ended up contradicting the user's own config — a user who disables a skill and reopens the session still sees it offered.

Changes

  • buildAvailableCommands(): skip entries with enabled === false
  • /skills listing: same filter, so the two surfaces agree

Test

Added should not advertise skills the user disabled in CodexAcpClient.test.ts — publishes a skills/list response with one enabled and one disabled skill and snapshots the resulting available_commands_update (data/available-commands-skills-disabled.json): $build is present, $deploy is not.

npm run typecheck clean; full suite 401 passed / 28 skipped.

One thing worth knowing before merging

enabled is not the whole story for model visibility. Codex has a second, independent filter — <skill-dir>/agents/openai.yaml with policy.allow_implicit_invocation: false — and a skill with that set is absent from the model-visible prompt while skills/list still reports enabled: true (the bundled review-agent ships exactly this). So after this PR a policy-disabled skill is still advertised. That would need the policy state surfaced on the skills/list entry first, so I left it out of this change — happy to follow up if you'd like it tracked separately.

Verifying any of this locally costs no model turn: codex debug prompt-input renders the model-visible prompt list as JSON.

`buildAvailableCommands()` iterated every skill returned by `skills/list`
without checking `skill.enabled`, so a skill disabled via
`[[skills.config]] enabled = false` in `~/.codex/config.toml` was still
published to the client as a `$`-command. The `/skills` builtin listed them
for the same reason.

A client that renders the advertised command list had no way to tell the
skill was already turned off, so its UI ended up contradicting the user's
own config.

Fixes agentclientprotocol#385
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

available_commands ignores the skill "enabled" flag from skills/list

2 participants