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

Abierto Apto para principiantes
#60,287 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
70/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
rust
Área
tooling

Línea de trabajo

El omitido ocurre en la función contribute de codex-rs/ext/skills/src/extension.rs, donde la guarda include_instructions && !host_catalog_in_world_state también suprime el listado en la entrada del turno para las fuentes personalizadas. Empieza leyendo esa guarda y cómo las entradas del catálogo llevan authority.kind; luego revisa las pruebas existentes de la extensión skills y las pruebas de skills_extension del núcleo. Se considera terminado cuando las skills personalizadas aparecen en la entrada del turno mientras las skills del host permanecen solo en World State, y el comportamiento sin fuente personalizada no cambia.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Rust
Estrellas
133k
Forks
21.1k
Merge medio
1 min
PR fusionados (30 d)
995

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de openai/codex

Todos los issues de openai/codex

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.