Skip to content

t1k:model-router:hop-view

FieldValue
Modulemodel-router
Version4.0.2
Effortlow
Tools—

Keywords: background, band, claude-code-mod, hop, mod, pane, routed, visibility

/t1k:model-router:hop-view

t1k-model-router-hop-view: routed-hop view mod

Section titled “t1k-model-router-hop-view: routed-hop view mod”

A Claude Code mod (in-process function-hook plugin), not a prompt skill. Claude Code loads it by itself from ~/.claude/skills/t1k-model-router-hop-view/; this file only makes the folder a valid T1K skill so the module pipeline ships it. Same delivery shape as core’s t1k-compact. Background: docs/mr-hop-output-visibility.md (“Hop view mod”).

Opt-in, off by default (2026-10-13). The Claude Code agents panel already lists the hops, so by default this mod draws nothing. Turn the band on with modelRouter.ui.hopView.enabled: true in ~/.claude/t1k-config-mr.json or a project’s .claude/t1k-config-mr.json (nearest wins), or env MR_HOP_VIEW=1 (env wins; 0 forces off). Only a literal true counts. The flag is read once at session start, so a change needs a session restart; off, the mod runs its one start-up helper and then spawns, lists and draws nothing. hopLive below is independent but only visible while the band is on. What follows describes the band when it is on.

While a routed (cheap-model) background hop of THIS session runs, a band above the prompt shows one status line per hop: ⋯ <agent> · <model> · running <elapsed>, and under it the hop’s last 2 rendered lines as ▸ <line> rows (at most 6 such rows in the whole band). When the hop finishes the rows disappear and the band shows ✓ <agent> · <model> finished (exit N) with two buttons: view answer opens a pane with the abridged, redacted final answer, dismiss removes the row. With no hop the mod draws nothing.

A hop the fan-out gate has not admitted yet (#1012) is drawn as its own state, never as running 0s: ⋯ <agent> · queued (<reason>) <wait>, with the reason (swap-high, cap-session, … — core t1k-slots.cjs’s own values, allowlisted) and the wait counted from the wrapper’s spawn. No <model> token appears: nothing is running. The signal is the launcher’s own — the wrapper creates <id>.state/fanout-id as the acquire helper’s stdout target and the gate’s token lands in it only on admission, so an EMPTY fanout-id beside a live pid and no exit/fanout-refused is the queue. It becomes running the moment the hop is admitted.

The lines are the hop’s own words and may be wrong. They are the first line of its assistant text and one Name target summary per tool call, never tool results, thinking or the prompt. They come from the hop’s own session transcript, which is found BY CONTENT (the launcher’s [t1k:hop-bind ...] marker in the prompt records, plus a birth floor from the state dir), never from a pid, a /proc command line or a path in a file the hop wrote. The marker must sit in the file’s first 5 records (cheap defence in depth against an appended marker, not a barrier) and the file must have been born after the hop’s state dir. Accepted residuals, stated plainly: a same-user hop can author a decoy transcript with a copied marker and put its own text on its own row; and a same-user hop can make a row show any real session born during the hop, whatever its history, by rewriting that file in place with the marker in its head (a hop with Bash can read those files directly anyway, so the band gives it nothing new). Limit and design: docs/mr-hop-live-binding.md (S1-S8), docs/mr-hop-output-visibility.md.

Kill switch. MR_HOP_LIVE=0 in the environment, or modelRouter.ui.hopLive.enabled: false in t1k-config-mr.json / t1k-config-mr.local.json (project .claude/ first, then ~/.claude/), turns the lines off: the band is status only. Only MR_HOP_LIVE=0 cannot be overridden by a hop: a same-user hop can write a t1k-config-mr.local.json into the project .claude/ (read first) and re-enable the lines, so the config switch is a convenience, not a boundary. modelRouter.ui.hopLive.rowsPerHop (integer 1-6, default 2) sets how many lines a hop shows. With a router that has no mr-hop-transcript.cjs yet (older scripts) or a hop launched without the marker, the mod shows status only.

  • UI only, zero model tokens. The mod hooks session.start and ui.render and nothing else: no tool.call, no Bash hook, no $.session.append, $.prompt.*, $.model.*, $.tool.*, $.agent.*, $.command.*, network or file write. Pinned by tests/mod-tests.test.cjs.
  • Reads only the hop’s own state dir and its marker-bound transcript, hardened. All reads happen in hooks/hop-digest.cjs (run through $.process.run; the mod sandbox has no Node). It verifies the stage dir and each <id>.state dir (real dir, this uid, mode 0700), reads only regular single-link files owned by this uid (symlink, FIFO, hard link refused), reads at most 256 KB of result.md, and passes the agent and model names (hop-writable) and every answer line through sanitizeMultiline, redactSecretLines (shared with mr-ui-abridge.cjs) and a clip. The pid file feeds only a liveness probe; the helper never touches /proc. The live lines come from the shared reader scripts/mr-hop-transcript.cjs (it binds by the marker, opens with O_NOFOLLOW, reads at most 64 KiB per tick, and its scrubber redacts and strips control characters); the helper starts no process and writes nothing. If the redactor is unavailable it shows nothing. A seed that lost its parentSid key shows nothing at all.
  • Scoped to this session. A hop is shown only when its meta-seed.json parentSid equals this session’s id. The hop writes that file, so a same-user local process can forge it and spoof its own text into the band; it cannot read another session’s content.
  • Cheap when idle. One 2 s timer; a tick with no unsettled <id>.state directory is one directory listing and spawns nothing. The helper script runs only while a hop of this session is live (and once at session start, which also answers the opt-in flag: off means nothing else ever runs).
  • Fails quiet. Any error returns to “draw nothing”; the engine’s own band is untouched. A hop whose transcript cannot be bound (no marker, old launcher, ambiguous, pre-existing file) stays a status row.
  • Needs Claude Code >= 2.1.296 (mod-pin.json). An older build ignores the folder. Turn the lines off with the kill switch above; turn the whole mod off by uninstalling the model-router module or deleting ~/.claude/skills/t1k-model-router-hop-view/.
Terminal window
claude plugin validate .claude/skills/t1k-model-router-hop-view
bun .claude/skills/t1k-model-router-hop-view/tests/digest.test.cjs
bun .claude/skills/t1k-model-router-hop-view/tests/mod-tests.test.cjs
bash tests/test-mr-hop-view.sh # both of the above plus the mutation (red) proof

hooks/hop-digest.cjs has no executor at all: no model and no agent runs it. The mod’s timer runs it through $.process.run (4 s timeout) while a hop of the session is live, and the mod draws the result (status and live lines). Nothing in this skill is delegable to a cheap-tier agent.