Skip to content
Latchkey

GitHub Actions step debug logs truncated

GitHub truncates very large step logs in the web UI. With ACTIONS_STEP_DEBUG enabled, a chatty step can blow past the display limit, so the relevant line is cut off even though it was produced.

What this error means

The log view shows a truncation notice and the detail you need is missing from the rendered output.

github-actions
##[warning]The logs for this step have been truncated because they exceeded the maximum size.

Common causes

Debug logging produced more than the display limit

ACTIONS_STEP_DEBUG plus verbose tooling generated more log than the UI renders, truncating the tail.

How to fix it

Capture full logs to an artifact

  1. Redirect the noisy command output to a file and upload it as an artifact for the complete log.
  2. Scope debug logging to the step under investigation rather than the whole run.
  3. Download the artifact to read the untruncated output.
.github/workflows/ci.yml
- run: npm run build --verbose > build.log 2>&1 || (cat build.log; exit 1)
- if: always()
  uses: actions/upload-artifact@v4
  with:
    name: build-log
    path: build.log

How to prevent it

  • Persist verbose logs to artifacts instead of relying on the UI view.
  • Enable step debug narrowly to keep logs under the display limit.

Related guides

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