-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
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
- Tag
@claudeon a complex issue that requires many tool calls (planning a multi-step feature, etc.) - Let the session run for 30+ minutes
- 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:
- Truncate the formatted markdown to ~900k with a "... truncated ..." message
- Collapse older turns and only show recent activity in detail
- Add an input option to control max summary size (related: Feature Request: Add option to disable Claude Code Report in GitHub Step Summary #206)
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)