Repository navigation
perf(tools): drop the column padding from read line numbers - #424
Merged
Merged
Conversation
This was referenced Nov 7, 2026
Every `read` line was `{n:6} {tag}|text`: the number padded to six
columns. o200k spends about two tokens a line on that padding, 14% of a
400-line read of this repo's Rust files (subagent.rs 5,732 -> 4,932
tokens), and a model gains nothing from aligned numbers. Lines are now
`42 a3|text`; the tag stays, since tag-addressed edits need it.
The TUI's read painter did not recognise tagged lines at all (the tag made
the left side non-numeric), so it showed them raw and unhighlighted.
`split_read_line` now accepts `42 a3|` and the older padded form, hides
the tag and right-aligns the number, so read results get the code
highlighting plain numbered lines already had.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
mrnasil
force-pushed
the
perf/read-grep-format
branch
from
November 7, 2026 13:55
9ba0cd5 to
227a733
Compare
This was referenced Nov 7, 2026
Merged
mrnasil
added a commit
that referenced
this pull request
Nov 9, 2026
#437) Release PRs only bump [workspace.package] version, which made affected_tests.py select `cargo test --workspace`. At CARGO_BUILD_JOBS=1 that took 26-32 minutes (v0.6.34, v0.6.36) while Coverage ran the same tests in ~6. The selector now compares the root manifest against the base and skips it when only the workspace version changed; any other root edit still runs the workspace. watchdog_keeps_checking_until_aborted used real 5ms/30ms sleeps. On a loaded runner both expired in one tick, the task was aborted before its first check, and whycodes-server's 100% floor failed at 1518/1519 (#424 push). A paused clock makes the order deterministic. Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the token-efficiency series (#418–#423).
Problem
Every
readline was{n:6} {tag}|text, with the line number padded to six columns. With o200k the padding costs about two tokens per line, which is 14% of a read. A model gains nothing from aligned numbers.crates/session/src/title.rs(337 lines)crates/agent/src/subagent.rsChange
format_read_linenow emits42 a3|text. The tag stays because tag-addressed edits need it. This covers read output, outlines and the edit-error snippets that reuse the helper.split_read_linenow accepts42 a3|and the older padded form, hides the tag and right-aligns the number. As a result, read results get the same code highlighting that plain numbered lines already had.Considered and left out
max_resultswould letcontext: 5return around 550 lines (~8k tokens) per call. The saving is speculative, so the current behavior stays.Checks
whycodes-tools --lib538 passed;whycodes-tui --lib1494 passed.split_read_linetest cases are added for tagged, legacy and non-matching lines.🤖 Generated with Claude Code