Skip to content

Step summary drops later text blocks from structured tool results #1572

Description

@MicroMilo

Describe the bug

The step-summary formatter recognizes structured tool output shaped like
[{ type: "text", text: "..." }], but it only keeps the first text block.

If a successful tool_result.content contains multiple text items, the GitHub
Actions step summary only shows the first one and silently drops the rest.

That means follow-up details such as extra findings, file paths, or secondary
instructions can disappear from the visible Claude Code Report even though
they are still present in the execution transcript.

To Reproduce

  1. Feed formatTurnsFromData() a transcript with:
    • one assistant tool_use
    • one successful tool_result
    • tool_result.content set to:
[
  { "type": "text", "text": "first line" },
  { "type": "text", "text": "second line" },
  { "type": "text", "text": "third line" }
]
  1. Generate the step-summary markdown.
  2. Observe that the output contains first line only.
  3. Observe that second line and third line are missing.

Relevant logic today:

if (
  Array.isArray(parsedContent) &&
  parsedContent.length > 0 &&
  typeof parsedContent[0] === "object" &&
  parsedContent[0]?.type === "text"
) {
  contentStr = parsedContent[0]?.text || "";
}

Expected behavior

Expected behavior would be for all text blocks in a structured text array to
remain visible in the rendered summary, not only the first one.

Screenshots

Not included.

Workflow yml file

Not provider- or workflow-specific. This appears to be in the shared summary
formatting path used after execution output is written.

API Provider

[x] Anthropic First-Party API (default)
[ ] AWS Bedrock
[ ] GCP Vertex

Additional context

  • The summary path is src/entrypoints/run.ts -> formatTurnsFromData().
  • The formatter code is in src/entrypoints/format-turns.ts.
  • There does not appear to be a regression test for multi-block successful
    tool_result.content.
  • A straightforward fix would be to join all { type: "text" } items rather
    than taking only parsedContent[0].

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions