Skip to content
Latchkey

GitHub Actions "Failed to create step summary" (GITHUB_STEP_SUMMARY too large)

GITHUB_STEP_SUMMARY accepts Markdown up to a per-step size limit. Writing more than that (a huge table, full test output) causes the summary upload to fail.

What this error means

A step that appends a large amount of Markdown to GITHUB_STEP_SUMMARY fails the summary upload, and the job annotation reports the summary could not be created.

github-actions
Error: Failed to create step summary using 'GITHUB_STEP_SUMMARY': Caused by: The size of the step summary content exceeds the maximum allowed size

Common causes

Summary content over the size limit

A step dumped very large output (full logs, a massive table) into GITHUB_STEP_SUMMARY, exceeding the per-step cap.

Appending in a loop without bounds

A loop keeps appending rows to the summary with no truncation, eventually crossing the limit.

How to fix it

Trim the summary content

  1. Write only a concise summary; link to full output as an artifact.
  2. Truncate large tables to the top N rows.
  3. Reset the summary between steps if you rebuild it.
.github/workflows/ci.yml
- run: |
    echo "## Results" >> "${GITHUB_STEP_SUMMARY}"
    head -n 50 results.md >> "${GITHUB_STEP_SUMMARY}"

How to prevent it

  • Keep step summaries short and link bulky output to artifacts.
  • Truncate generated tables to a reasonable row count.
  • Avoid unbounded loops appending to the summary.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →