You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
passthrough_max_chars truncates output silently (no marker) — git log shows 50 of 252 commits, misleads scope #2204
[limits].passthrough_max_chars (default 2000) caps passthrough command output, but truncates silently — no ... N more lines marker, no hint that output was cut. A consumer (human or LLM agent) reads the truncated output as complete.
This caused a real correctness failure: git log <base>..HEAD on a 252-commit branch returned only ~50 lines. An automated agent read "50 commits", planned a history rewrite (squash/rebase) on that wrong scope, and had to redo work once the true count (git rev-list --count = 252) surfaced. wc -l on the piped output also reads 50, so even a line-count sanity check is fooled.
To reproduce
On a branch with >50 commits ahead of base
Run git log <base>..HEAD through the RTK hook (rewritten to rtk git log)
Output stops at ~2000 chars (~50 lines) with no indication it was truncated
git rev-list --count <base>..HEAD shows the true (larger) number
Expected
Truncation should be visible. Any one of:
Append a marker when output is cut, e.g. … [rtk: truncated, N of M lines shown — full: rtk run git log …]
Exempt history-listing commands (git log, git rev-list) from the char cap by default — these are exactly the cases where completeness matters
Make the cap a line count rather than a char count for git log, and document it
Environment
rtk 0.42.0 (Homebrew, macOS)
Config at ~/Library/Application Support/rtk/config.toml — note: the README/docs reference ~/.config/rtk/. On macOS the active path is the Application Support one; might be worth documenting the platform difference.
Workaround
Added "git log" to transparent_prefixes so it bypasses the cap. Works, but the silent-truncation behavior is the real issue — a visible marker would have surfaced it immediately instead of after a wrong-scope history rewrite.
passthrough_max_chars silently truncates command output with no marker, causing consumers to read partial output as complete — fix by appending a visible truncation notice when the limit is hit
This looks like a simple fix that could be auto-resolved. Repo maintainers can use /wshm fix to attempt it.
Triaged automatically by wshm · This is an automated analysis, not a human review.
The parser fallback path (truncate_passthrough/ truncate_output in src/parser/mod.rs) already appends the [RTK:PASSTHROUGH] marker when output exceeds passthrough_max_chars.
Still affected (using silent truncate() without marker):
src/cmds/go/golangci_cmd.rs:274 — fallback when golangci-lint JSON parsing fails
src/cmds/python/ruff_cmd.rs:104 — fallback when ruff JSON parsing fails
Separate but related (own line-capping, no character-level truncation marker):
src/cmds/git/git.rs — run_log / filter_log_output limits commit count without emitting a restorable hint
Happy to submit a follow-up PR to fix the golangci and ruff fallback paths to use truncate_passthrough instead, and to add a recovery hint to git log's cap.
Activity
pszymkowiak commentedon Jun 1, 2026
🔍 Automated Triage
bughighSummary
passthrough_max_chars silently truncates command output with no marker, causing consumers to read partial output as complete — fix by appending a visible truncation notice when the limit is hit
Triaged automatically by wshm · This is an automated analysis, not a human review.
mikeangstadt commentedon Jun 2, 2026
Analysis of current state:
Already fixed:
truncate_passthrough/truncate_outputinsrc/parser/mod.rs) already appends the[RTK:PASSTHROUGH]marker when output exceedspassthrough_max_chars.Still affected (using silent
truncate()without marker):src/cmds/go/golangci_cmd.rs:274— fallback when golangci-lint JSON parsing failssrc/cmds/python/ruff_cmd.rs:104— fallback when ruff JSON parsing failsSeparate but related (own line-capping, no character-level truncation marker):
src/cmds/git/git.rs—run_log/filter_log_outputlimits commit count without emitting a restorable hintHappy to submit a follow-up PR to fix the golangci and ruff fallback paths to use
truncate_passthroughinstead, and to add a recovery hint to git log's cap.