Symptom
OpenCode TUI inside herdr showed ghost/stale cells and missing elements during a heavy render phase (dotfiles-change-review subagent fan-out). Screenshot from 2026-08-02.
Diagnosis (verified 2026-08-02)
- The shared herdr server (PID 32759, started 2026-07-30) still maps an older build:
/nix/store/bmac4ml36avimb89vl31h00dwzlxd87y-herdr-0.7.3, while the profile binary is /nix/store/3nznsbvcp8k68vj9bpd3f96i4j90424m-herdr-0.7.3. Both are 0.7.3 but different builds.
- All clients negotiate
SemanticFrame (~/.config/herdr/herdr-client.log: handshake succeeded version=16 encoding=SemanticFrame).
- Mechanism: in SemanticFrame mode the client keeps its own BlitEncoder diff baseline against the terminal (src/client/mod.rs ~1505), while the server keeps its own frame state. Any dropped frame or queue-full deferral (server/headless.rs retained_send_fallback) desyncs the two baselines; every later frame diffs against stale state -> ghosts and missing cells.
HERDR_RENDER_ENCODING=terminal-ansi moves the diff encoder to the server (one baseline) and makes the client write bytes verbatim. This is the mode herdr itself forces for remote clients (src/remote/unix.rs sets it). It works but is a fallback path that masks whether the real bug is fixed.
Plan
- Restart the shared herdr server onto the current profile binary (drops all sessions, needs approval, fleet respawns, reconnect with
herdr).
- Reproduce the heavy-render scenario (run the dotfiles-change-review workflow) in default SemanticFrame mode.
- If artifacts persist on the new binary: bake
HERDR_RENDER_ENCODING=terminal-ansi into home/base/terminal/shell/bash_herdr_autostart.sh declaratively, plus an eval check in home/base/terminal/__tests__/checks.nix asserting the env var is set.
- If artifacts are gone: close this issue, no config change needed.
Refs
- herdr input:
github:Castrozan/herdr/v0.10.1 (flake.nix)
- client encoding selection: src/client/mod.rs
requested_render_encoding() reads HERDR_RENDER_ENCODING
- staleness already tracked by telemetry:
home/base/claude/telemetry/performance-sampler/scripts/multiplexer_metrics.py (multiplexer.herdr_binary_stale)
Symptom
OpenCode TUI inside herdr showed ghost/stale cells and missing elements during a heavy render phase (dotfiles-change-review subagent fan-out). Screenshot from 2026-08-02.
Diagnosis (verified 2026-08-02)
/nix/store/bmac4ml36avimb89vl31h00dwzlxd87y-herdr-0.7.3, while the profile binary is/nix/store/3nznsbvcp8k68vj9bpd3f96i4j90424m-herdr-0.7.3. Both are 0.7.3 but different builds.SemanticFrame(~/.config/herdr/herdr-client.log:handshake succeeded version=16 encoding=SemanticFrame).HERDR_RENDER_ENCODING=terminal-ansimoves the diff encoder to the server (one baseline) and makes the client write bytes verbatim. This is the mode herdr itself forces for remote clients (src/remote/unix.rs sets it). It works but is a fallback path that masks whether the real bug is fixed.Plan
herdr).HERDR_RENDER_ENCODING=terminal-ansiintohome/base/terminal/shell/bash_herdr_autostart.shdeclaratively, plus an eval check inhome/base/terminal/__tests__/checks.nixasserting the env var is set.Refs
github:Castrozan/herdr/v0.10.1(flake.nix)requested_render_encoding()readsHERDR_RENDER_ENCODINGhome/base/claude/telemetry/performance-sampler/scripts/multiplexer_metrics.py(multiplexer.herdr_binary_stale)