#8890: fix: increase bash output chunk limit from 8KB to 32KB
agents
stale
Cluster:
Context Management Enhancements
## Problem
Bash command output is chunked and aggregated with a limit of 8KB. Commands that produce larger output get truncated, losing context the model needs.
Affected commands:
- `git diff` on larger changesets
- Test runners with multiple failures
- Build logs
- `find` or `grep` with many results
## Solution
Increase `CHUNK_LIMIT` from 8KB to 32KB.
## Trade-offs
- **Pro:** More complete output for the model to work with
- **Con:** Slightly higher memory usage during command execution
32KB is still conservative and prevents unbounded growth while giving 4x more context.
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR increases the internal `CHUNK_LIMIT` used when chunking/aggregating bash command output from 8KB to 32KB in `src/agents/bash-tools.shared.ts`, aiming to reduce truncation of large command outputs (e.g., `git diff`, test/build logs). The change is localized to the shared bash tooling utilities and preserves existing behavior aside from allowing larger chunks per aggregation step.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk.
- The change is a small, localized constant bump (8KB→32KB) with no control-flow changes; it should only affect how bash output is chunked/aggregated and is unlikely to introduce functional regressions.
- No files require special attention.
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#8888: fix: increase tool result/error context limits
by joetomasone · 2026-02-04
80.0%
#12064: fix: prevent chunker from truncating messages that fit within limit
by joetomasone · 2026-02-08
73.8%
#5808: fix(memory): truncate oversized chunks before embedding
by douvy · 2026-02-01
73.7%
#3872: improve bash-tools.exec.ts code quality
by Bestom927 · 2026-01-29
73.2%
#12737: feat: add maxLines option for memory chunk splitting
by fastroc · 2026-02-09
72.5%
#23803: Fix tool metadata truncation
by kamal-ayman · 2026-02-22
72.0%
#12871: fix: use bash and warn about shell injection (issue #12836)
by ambicuity · 2026-02-09
71.5%
#9710: fix(ui): prevent CPU spike when opening large tool outputs (#9700)
by divol89 · 2026-02-05
71.4%
#9620: fix: increase auto-compaction reserve buffer to 40k tokens
by Arlo83963 · 2026-02-05
71.3%
#5057: fix: add per-tool-result hard cap to prevent context overflow
by hanxiao · 2026-01-31
71.0%