[Bug] Runtime-only tag list in core_agent.py prompt names OUTPUT_REF/CODE_EXEC_RESULT but omits completed_action_history and completed_action

Abierto Apto para principiantes
#4,381 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
84/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

Lee la lista de etiquetas en tiempo de ejecución en sdk/nexent/core/agents/cores/smolagents/core_agent.py y compárala con las etiquetas que se muestran en sdk/nexent/core/agents/context/rendering.py y se rechazan en sdk/nexent/core/agents/cores/smolagents/output_protocol.py. Actualiza la lista del prompt para que coincida con los registros y las vistas previas en tiempo de ejecución; después, comprueba que incluya todas las etiquetas emitidas y omita CODE_EXEC_RESULT.

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

Descripción

Nexent Version

68da442425

Problem Description

The system prompt text in sdk/nexent/core/agents/cores/smolagents/core_agent.py:682 tells the model which tags only the runtime emits:

"Only the runtime emits CODE_EXEC_RESULT, SUMMARIED_RESULT and OUTPUT_REF tags; "

This list no longer matches what the runtime does:

  • It names CODE_EXEC_RESULT, which the runtime does not emit anymore.
  • It leaves out the tags the runtime does emit now. sdk/nexent/core/agents/context/rendering.py:111,114,155,167-168 renders completed_action_history, completed_action, <OUTPUT preview="head_tail"> previews and OUTPUT_REF.
  • The output protocol rejects model output that contains these runtime record tags (sdk/nexent/core/agents/cores/smolagents/output_protocol.py:93-96,286-288).

Why it matters: the model sees completed_action_history blocks in its own assistant history, and the prompt never tells it not to write these tags. It can copy that format into a reply. When it does, classify_model_output raises UNSUPPORTED_OR_TAG_ONLY_OUTPUT. That forces a protocol-repair retry, or uses up all the retries and the step fails. The format notice inside the record lowers the chance of this, but the prompt still names the wrong tags.

Expected: the list of runtime-only tags in the prompt should match the tags that rendering.py emits and output_protocol.py rejects.

Suggested text:

"Only the runtime emits completed_action_history, completed_action, SUMMARIED_RESULT, OUTPUT_REF and <OUTPUT preview=\"head_tail\"> tags; "
Reproduction Steps
  1. Open sdk/nexent/core/agents/cores/smolagents/core_agent.py:682 and read the list of runtime-only tags.
  2. Compare it with the tags rendered in sdk/nexent/core/agents/context/rendering.py:111,114,155,167-168.
  3. Compare it with the tags rejected in sdk/nexent/core/agents/cores/smolagents/output_protocol.py:93-96,286-288.
  4. Run an agent long enough that completed_action_history shows up in the history. If the model copies that block into its reply, classify_model_output raises UNSUPPORTED_OR_TAG_ONLY_OUTPUT and a protocol-repair retry starts.
Lenguaje dominante
Python
Estrellas
6.2k
Forks
785
Merge medio
1 d 10 h
PR fusionados (30 d)
123

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

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 ModelEngine-Group/nexent

Todos los issues de ModelEngine-Group/nexent

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.