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

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

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

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

評価

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

調査の方向性

sdk/nexent/core/agents/cores/smolagents/core_agent.pyのランタイムタグ一覧を読み、sdk/nexent/core/agents/context/rendering.pyでレンダリングされるタグ、およびsdk/nexent/core/agents/cores/smolagents/output_protocol.pyで拒否されるタグと比較してください。プロンプト一覧をランタイムのレコードとプレビューに合わせて更新し、出力されるすべてのタグを含み、CODE_EXEC_RESULTを除外していることを確認してください。

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

説明

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.
主要言語
Python
スター
6.2k
フォーク
785
平均マージ
1日 10時間
マージ済み PR(30日)
123

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

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

ModelEngine-Group/nexent のほかの issue

ModelEngine-Group/nexent の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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