Skip to content

herdr TUI artifacts: stale server binary on old SemanticFrame path #115

Description

@Castrozan

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

  1. Restart the shared herdr server onto the current profile binary (drops all sessions, needs approval, fleet respawns, reconnect with herdr).
  2. Reproduce the heavy-render scenario (run the dotfiles-change-review workflow) in default SemanticFrame mode.
  3. 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.
  4. 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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions