Reading agent output: the terminal as a reading instrument
The job changed before the tools did. Writing code means looking at static text you authored; supervising an agent means reading a stream someone else is producing, for hours. Every terminal default — cursor blink, bright ANSI accents, a bell that flashes the window — was chosen for the first job. Under the second one they are a tax you pay all day without noticing.
This is agent-mistake-fix-harness pointed at the human: the agent makes a mistake, you fix the environment rather than the agent. When you get tired, the same move applies. Fix the environment, not your willpower.
Three fatigue sources, three different fixes
They get conflated constantly, and each needs a different remedy.
Motion. Reading text that moves breaks the saccadic rhythm: the eye re-hunts a fixation
point on every frame instead of holding one. The complaints are specific and documented —
Claude Code issues #9158
(“Excessive UI Blinking/Flickering Causes Eye Strain”) and
#25095 on the spinner, tagged
a11y and citing WCAG 2.2.2 (Pause, Stop, Hide). The fixes are frame-level: alt-screen
rendering so frames update atomically (/tui fullscreen), synchronized output, a slower
repaint (repaint_delay 20 in kitty halves redraw frequency and turns a shimmer into
chunks), no cursor blink, no visual bell.
Contrast. Pure #000/#fff is 21:1. Halation — the glow bleeding around glyphs — is
worst there, and it is punishing with uncorrected astigmatism. 7–12:1 is the target on
either polarity.
Habit. The largest effect and the only one that isn’t a setting: stop watching the stream. Launch, switch away, get called back by a bell or a tab badge, read the finished diff as static text. Reviewing a still diff costs an order of magnitude less than watching it being typed. Four live panes in one window is the same mistake at a larger scale — four independent motion sources in one visual field, all of which the brain processes whether you want it to or not.
Polarity: light wins in a lit room
Dark text on a light ground reads measurably better, an effect called the positive polarity advantage. Buchner & Baumgartner (2007) found it holds regardless of ambient illumination and color contrast; Piepenbrock et al. (2014) supplied the mechanism — a lighter screen constricts the pupil, which increases depth of field and sharpens accommodation. Same optics as squinting. Proofreading accuracy, not just speed, improves.
The caveats matter more than the headline:
- Match the screen to the room, not to taste. A white screen in a dark room blinds; a black screen in a bright room makes the pupil oscillate between screen and surroundings.
- The effect is small per-hour and compounds over a day. It matters exactly in the read-heavy regime, and not much otherwise.
- Adaptation takes days. First impression of a polarity switch is always “too bright” and it passes in two or three days. Judge it on day four.
- Photophobia, dry eye and some retinal conditions invert the recommendation outright.
The ANSI trap nobody checks
This is the finding worth keeping. Ported light themes almost always inherit their sixteen
ANSI colors from a dark ancestor, where those hues were chosen against a dark ground. On a
cream background the canonical Novel yellow #d06b00 and cyan #0087cc land near
2–3:1. Nothing is broken, so nobody investigates; the user just reports that “accents
look washed out” and assumes it is the light theme’s fault.
Two rules fix it:
- Re-derive all sixteen against the actual background — normal ≥4.5:1, bright ≥3.5:1, since bright carries bold text.
- On a light theme make
color7/color15dark. Solarized Light keeps them light, and every TUI that paints “white” text disappears into the background.
A palette built by eye does not pass this. Ours didn’t: a contrast checker found five colors below their floor in a palette that looked fine on screen — bright green at 3.39, bright cyan at 3.22, and three more in the dark variant. Measure, then look; the math catches what the eye rationalizes, and the eye catches hues the math approves of.
Agents have their own layer of this. Claude Code’s theme tokens are separate from the
terminal palette, and several that carry real accent weight are missing from the docs
(professionalBlue, chromeYellow, skill, background) — a light terminal with the
agent still in its dark theme is the worst of both.
Follow the room, not the clock
macOS exposes the ambient light sensor to userspace. On Apple Silicon it is not
AppleLMUController (that was Intel) but AmbientBrightness in the display driver:
ioreg -r -l -w 0 -k AmbientBrightness, divided by 65536 for lux, ~25 ms per read. A dim
room with one lamp reads 10–30 lux, a normally lit room 40–120.
Two properties separate a switcher you keep from one you disable within a day: a dead zone between thresholds, so a passing cloud doesn’t flip the theme, and a manual override that suppresses the automation for a few hours after you switch by hand. Automation that argues with an explicit choice gets turned off, permanently.
And keep the blast radius small: switching the OS appearance changes Finder, Safari and every other app, which is not what “make my terminal readable” asked for.
What this looks like as a tool
Packaged as project-solo-factory’s solo:terminal-eyes: the one-setting-six-terminals
matrix (each names these differently), contrast-checked palettes, a contrast checker, an
Apple Terminal profile generator (its colors are archived NSKeyedArchiver blobs, so one
palette can drive both terminals), and the ambient-light switcher.
If the strain survives all of it, that is an optometrist question rather than a config one. Uncorrected astigmatism and presbyopia produce exactly this picture, and they surface when the work shifts from writing to reading — which is precisely what happened.
Orca: theming a terminal app from outside
Orca (a desktop app that hosts terminals and agents) takes palettes from plugins: a
data-only plugin (contributes.terminalThemes and themes for the app chrome, JSON files,
no approval needed) loads with orca plugin dev load <dir> and is hot-reloaded when its
files change. What Orca does not expose is global settings: font, line height, cursor and
which theme is selected sit in the app’s own profile database, with no CLI or plugin
call, and plugins may only write their own settings.
The workable pattern for a light-sensor switcher: ship one extra theme, live, select it
once in both the light and the dark slot, and let the switcher overwrite live.json with
the current palette (write to a temp file, then mv). The switcher never has to touch the
OS appearance or call the orca CLI, which would launch a closed app. Measured: each
overwrite registered as a plugin change within seconds. Not measured: how the app chrome
reacts when the theme’s base flips between light and dark.
Orca rendering: measured
An owner reported that text in Orca looked “rippled or not sharp” next to Apple Terminal. Setup: same text, JetBrains Mono 14, line height 1.2, same palette, a 3024x1964 @2x display. Lossless window captures at native pixels; metrics run on identical crops of 29 repeated lines, checked first on a synthetic image (a sharp 2 px bar reads rise 0.8 px, the same bar blurred 1 px reads 1.6 px). All numbers measured unless marked.
| Config | Row pitch (px) | Unique rows of 29 | Column pitch (px) | Edge rise 10-90% (px) | Ink vs Terminal | Shape match (NCC) |
|---|---|---|---|---|---|---|
| Apple Terminal, Regular | 48 | 1 | 16.00 | 0.81 | 100% | 1.000 |
| Orca, GPU auto, weight 400 | 43 | 1 | 16.00 | 1.14 | 86% | 0.981 |
| Orca, GPU auto, weight 500 | 43 | 1 | 16.00 | 0.81 | 93% | 0.988 |
| Orca, GPU auto, weight 600 | 43 | 1 | 16.00 | 1.01 | 101% | 0.986 |
| Orca, GPU off (DOM) | 43 | 1 | 16.80 | 1.36 | 81% | 0.30 |
What the numbers say:
- No row ripple. With a fractional line height (14 x 1.2) the WebGL renderer still rounds the cell to whole device pixels, so every repeated line is bit-identical. The fractional-pitch theory did not hold.
- GPU “off” is the worse path.
terminalGpuAccelerationisauto | on | off;offswitches xterm.js to its DOM renderer, which lays glyphs out at the font’s 16.8 px advance. Letters then sit at drifting sub-pixel phases and the edges soften. Keepauto(WebGL on macOS). - Thin, not rippled. Orca at weight 400 draws 14% less ink than Terminal, whose CoreText smoothing thickens stems (2.84 px against 2.53). Weight 500 closes most of the gap with the same edge sharpness; 600 overshoots (stems 3.03 px, softer edges).
- Antialiasing is grayscale in both apps (colour fringe measure 0.02-0.03, near zero). Glyph size is identical: cap height 21 px in both.
Motion was not measured in Orca itself: a window on an inactive Space is not painted by Chromium, so a screen recording of it is empty. A proxy (headless Chromium on the M5 GPU, the same xterm.js version, 10.9 MB of output) showed a 16.7 ms frame time and equal throughput for DOM and WebGL, so speed does not separate them; headless caps at 60 Hz, so nothing is claimed about 120 Hz.
Sources
- Buchner & Baumgartner (2007), Text–background polarity affects performance irrespective of ambient illumination and colour contrast
- Piepenbrock et al. (2014), Smaller pupil size and better proofreading performance with positive polarity displays
- Claude Code issues #9158, #25095
- Terminal configuration — Claude Code docs
- Related: claude-code-anatomy, harness-engineering-summary