Skip to content

GITHUB_STEP_SUMMARY exceeds 1024k limit on long sessions #927

@simonszalai

Description

@simonszalai

Bug Description

When Claude runs a long session (1h+ with many tool calls), the step summary output exceeds GitHub's 1024k hard limit, causing the error:

$GITHUB_STEP_SUMMARY upload aborted, supports content up to a size of 1024k, got 1026k.

Root Cause

In src/entrypoints/run.ts, writeStepSummary() formats the entire execution output into markdown via formatTurnsFromData() and appends it to $GITHUB_STEP_SUMMARY with no total size check.

While formatResultContent() in format-turns.ts truncates individual tool results to 3000 chars, the total accumulated markdown from many turns can easily exceed 1MB.

Steps to Reproduce

  1. Tag @claude on a complex issue that requires many tool calls (planning a multi-step feature, etc.)
  2. Let the session run for 30+ minutes
  3. The step summary upload fails with the 1024k error

Expected Behavior

The step summary should be truncated to stay under GitHub's 1024k limit. Possible approaches:

Actual Behavior

The action errors with the $GITHUB_STEP_SUMMARY upload aborted message. The error is non-fatal (the Claude work itself still succeeds), but it's noisy and prevents viewing the execution summary.

Environment

  • anthropics/claude-code-action@v1
  • Session duration: ~1h with many tool calls
  • Generated summary size: 1026k (just over the 1024k limit)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp2Non-showstopper bug or popular feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions