anthropics / anthropics/claude-code-action
GITHUB_STEP_SUMMARY exceeds 1024k limit on long sessions
- Lenguaje dominante
- TypeScript
- Estrellas
- 8.9k
- Forks
- 2.1k
- Merge medio
- 3 d 9 h
- PR fusionados (30 d)
- 10
Descripción
## 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:
- 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: #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)
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.