Reasoning & Tool Trace Inspector

Hermes Desktop-style live tails plus durable historical inspection

Current gap

Run snapshots persist activities with tool name/status/preview/duration, while conversation history keeps only role/content/citations. Completed bubbles therefore lose trace linkage and raw tool results. Hermes already emits reasoning.available when supported, but Nagato ignores it. Hermes run/event state is transient (active event TTL about 300 seconds; terminal status about 3600 seconds), so Nagato must persist events during the live stream rather than attempt later replay.

Truthful trace taxonomy

Reasoning

Only provider/gateway-emitted reasoning summaries or deltas. Label unavailable when GLM-5.2 emits none.

Tool calls

Name, call ID, validated arguments, lifecycle, duration, raw result reference and errors.

Agent status

“Hermes is reasoning…” is status, not reasoning content. Keep visually distinct.

Derived explanation

Optional local-model explanation, explicitly labeled generated and linked to raw artifact.

Desktop-like interaction

  1. Attach a trace strip to each assistant bubble, including completed historical messages.
  2. Collapsed state shows latest 3–4 lines, newest at bottom, with upper lines fading via opacity gradient/mask.
  3. Chevron ∨/∧ expands inline to full chronological events; preserve scroll position.
  4. Each tool row expands arguments, raw output, parsed preview, timing, errors, source artifacts and “Explain locally.”
  5. Live mode tails events without forcing the conversation scroll if user scrolled away.
  6. Large outputs are paged/chunked and loaded on demand; never put megabytes in polling snapshots.

Durable trace schema

run_traces(run_id, game_id, channel, message_turn_id, model, provider,
  status, created_at, completed_at, reasoning_available)
trace_events(id, run_id, seq, event_type, ts, tool_call_id,
  summary, payload_ref, visibility, duration_ms)
trace_blobs(id, sha256, mime, byte_size, storage_path, compression)
derived_explanations(id, event_id, model, prompt_version, content, created_at)

Bridge/API

Upstream prerequisite: current Hermes tool.started events intentionally omit arguments and tool.completed omits raw return values. Authentic historical tool inspection therefore requires a Hermes Runs API/tool-dispatch enhancement that emits or durably references redacted tool arguments/results. Nagato UI work alone cannot reconstruct them.

Symbol-by-symbol caveat

Use this name only for structured formats (JSON keys, regex, shell commands, stack traces, protocols). For arbitrary prose, call it “annotated breakdown.” A small model may hallucinate semantics, so every annotation must quote/address exact raw spans and offer one-click raw view.

Local model strategy

Live LM Studio reports 22 models: 21 generative and one embedding model. Start explanation experiments with a small 4B/9B loaded model, but discover capabilities dynamically through /v1/models; do not hardcode the current list. Queue explanations at background priority and cache by raw_hash + model + prompt_version.

Acceptance