Custom skills are not listed in turn input while host skills are in World State

Open Beginner friendly
#60,287 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
70/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
tooling

Research direction

The skip happens in the contribute function in codex-rs/ext/skills/src/extension.rs, where the include_instructions && !host_catalog_in_world_state guard suppresses the turn-input listing for custom sources too. Start by reading that guard and how catalog entries carry authority.kind, then check the existing skills extension tests and the core skills_extension tests. Done means custom skills appear in turn input while host skills stay only in World State, and behavior without a custom source is unchanged.

Written by the indexing model from the issue text.

Description

bug skills
What issue are you seeing?

While the host skill catalog is listed through World State, the turn-input skills listing is skipped entirely, including skills from custom sources (SkillSourceKind::Custom). Custom skills then appear only in the initial context, and a custom catalog that changes during a thread doesn't reach the model until the initial context is rebuilt, e.g. after compaction. Explicit $skill mentions still resolve.

What steps can reproduce the bug?
  1. Install the skills extension with a host provider and a custom source:
    SkillProviders::new().with_host_provider(host).with_provider(SkillProviderSource::new(SkillSourceKind::Custom("embedder".into()), "embedder", custom))
  2. Run a turn with a HostSkillsSnapshot, so the host catalog is rendered into the host_skills World State section.
  3. The turn input contains no skills listing.
What is the expected behavior?

Host skills are listed only by World State. Custom skills are still listed in turn input, as they are when host skills aren't in World State.

Additional information

Seen on main at 748ab55ca7, using codex-rs as an embedded library.

The cause is this guard in contribute in codex-rs/ext/skills/src/extension.rs, added in #33425 so host skills aren't listed twice:

if config.include_instructions && !host_catalog_in_world_state {

World State doesn't list custom skills, so they should not be skipped with the host ones. A possible fix keeps the existing filter and still renders turn input while custom entries remain:

let lists_turn_skills = !host_catalog_in_world_state
    || catalog
        .entries
        .iter()
        .any(|entry| matches!(entry.authority.kind, SkillSourceKind::Custom(_)));
if config.include_instructions && lists_turn_skills {

Without a custom source, nothing changes.

Related: #60288, which proposes listing custom catalogs through World State and would also fix this.

A fix is available in https://github.com/fpedd/codex/pull/1, which narrows the guard as shown above and leaves behavior without a custom source unchanged. It includes a test that fails without the change, and the existing skills extension and core skills_extension tests give the same results as on main.

Dominant language
Rust
Stars
133k
Forks
21.1k
Avg merge
1m
Merged PRs (30d)
995

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openai/codex

All issues in openai/codex

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.