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

オープン 初心者向け
#60,287 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
70/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust
領域
tooling

調査の方向性

スキップは codex-rs/ext/skills/src/extension.rs の contribute 関数で発生します。ここでは include_instructions && !host_catalog_in_world_state のガードが、カスタムソースについてもターン入力へのリスト表示を抑制しています。まずこのガードと、カタログのエントリが authority.kind をどのように保持しているかを読んでください。次に既存の skills 拡張のテストと、コアの skills_extension のテストを確認します。完了の条件は、カスタムスキルがターン入力に表示され、ホストのスキルは World State にのみ残ること、そしてカスタムソースがない場合の動作が変わらないことです。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Rust
スター
133k
フォーク
21.1k
平均マージ
1分
マージ済み PR(30日)
995

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

openai/codex のほかの issue

openai/codex の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。