[Bug]: Claude subagent rows show a raw `<tools-used-before-summary>` tag before the summary

Abierto Apto para principiantes
#30,069 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
72/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript
Área
backend, frontend

Línea de trabajo

Empieza en claudeSubagentResultText en apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts, donde el texto del resultado de la herramienta se copia en el result del subagente, y en plainDetail en apps/web/src/components/chat/V2LifecycleRow.tsx, que une las líneas. La prueba del adaptador que envía un resultado de subagente en primer plano que comienza con <tools-used-before-summary> muestra la aserción que falla. Está terminado cuando esa prueba pasa y la línea de etiqueta inicial no se muestra en el resumen de la fila, mientras que los resultados sin la etiqueta siguen sin cambios.

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

Descripción

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area: apps/server

Steps to reproduce

  1. Use the Claude provider with Claude Code CLI 2.1.316.
  2. Ask Claude to hand a small job to a subagent, for example: "Use a subagent to list the functions in math.ts with their line numbers."
  3. Wait for the subagent to finish and look at its row in the thread.

Expected behavior

The settled subagent row shows the subagent's summary:

add (line 1) mean (line 6)

Actual behavior

The row shows Claude Code's internal markup in front of the summary:

<tools-used-before-summary>Read</tools-used-before-summary> add (line 1) mean (line 6)

The subagent's work and the parent agent's answer are correct; only the shown summary is wrong.

Cause: Claude Code 2.1.316 opens a foreground Agent tool result with a <tools-used-before-summary>…</tools-used-before-summary> line. It is a note for the parent model naming the tools the subagent called. claudeSubagentResultText in apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts copies the tool result text into the subagent's result as is. The row's plainDetail in apps/web/src/components/chat/V2LifecycleRow.tsx joins the lines but leaves the tag, which gives the text above. Nothing in the repo handles the tag today (git grep tools-used-before-summary finds nothing).

The CLI does not add the line to every result: its own schema describes it as the tools the subagent called that the conversation's requests did not yet name. So some subagent rows look fine and others don't.

Impact

Cosmetic issue

Version or commit

main @ cefb544af3

Environment

macOS (Darwin 25.6.0), Claude Code CLI 2.1.316 through the Claude Agent SDK.

Logs or stack traces

An adapter test that sends a foreground subagent result opening with the line fails on main:

AssertionError: expected '<tools-used-before-summary>Read, Grep…' to equal 'add (line 1)\nmean (line 6)'

- Expected
+ Received

+ <tools-used-before-summary>Read, Grep</tools-used-before-summary>
  add (line 1)
  mean (line 6)

Workaround

None found.


Note for whoever files this: the row text above was seen in a downstream build that shares this adapter and row code, not in a T3 Code build. On T3 main the defect is shown by the adapter test only.

Lenguaje dominante
TypeScript
Estrellas
24.8k
Forks
6.4k
Merge medio
13 h 48 min
PR fusionados (30 d)
208

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 pingdotgg/t3code

Todos los issues de pingdotgg/t3code

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.