Follow-up from the threadhop copy / /threadhop:copy work (2026-04-22). That change introduces an include_tool_calls: bool parameter on indexer._extract_assistant_blocks (paired with include_tool_results: bool on _extract_user_text). The copy command passes False; the TUI and every other caller keeps the current True behavior via the parameter's default. That's the correct v1 — deterministic, unambiguous, no user-facing flag surface — but it hardcodes a rendering preference that users will reasonably want to toggle.
This issue tracks promoting that knob into ~/.config/threadhop/config.json so the same switch drives the TUI's transcript view and the copy command, with per-caller defaults preserved and user override supported.
1. What ships in the copy change (baseline)
include_tool_calls: bool = Trueonindexer._extract_assistant_blocks—Truekeeps current abbreviation behavior (e.g.[Read(file.py)]),Falsedropstool_useblocks entirely.include_tool_results: bool = Trueonindexer._extract_user_text— same shape fortoolUseResultuser-role messages.- Caller hardcoding: the TUI (
TranscriptView._parse_messagesand the transcript-build path) passesTrueimplicitly via the default;copy.pypassesFalseexplicitly. - No config key, no CLI flag, no user-facing surface.
2. What this issue adds
Two config keys in ~/.config/threadhop/config.json, read on load by the TUI and by copy:
{
\"tui\": {
\"include_tool_calls\": true
},
\"copy\": {
\"include_tool_calls\": false
}
}Defaults stay identical to the hardcoded v1 (tui=true, copy=false). Users who want the TUI to hide tool calls set tui.include_tool_calls = false; users who want copy to preserve tool-call abbreviations set copy.include_tool_calls = true.
Nested keys rather than flat (tui_include_tool_calls) for two reasons: (a) it leaves room for a future tui.density, copy.format, etc., cluster without a prefix-war; (b) it matches how users mentally scope the toggle ("change the TUI, not copy").
migration.py already preserves unknown keys in config.json, so adding these keys is forward-compatible for users on older builds and rolling back is safe.
3. Callers intentionally left hardcoded
Not every caller should read the config. Keep these at include_tool_calls=True regardless:
- Search indexing (
indexer.parse_messages,indexer.index_session) — FTS rows need tool-call abbreviations so searches for tool names or file paths land correctly. Dropping them silently breaks search. - Observer / reflector (
observer.observe_session,reflector.reflect_session) — these reason about decisions and todos at the turn level; abbreviated tool calls are signal, not noise. Dropping them removes evidence the model uses to extract structure. - Handoff (
handoff.py) — parked on a dev branch per current planning, but when it returns it should continue to abbreviate, since handoff is about faithful session context, not minimal context (that's whatcopyis for).
The config keys are scoped specifically to the consumer-facing callers (TUI rendering, copy payload) — not the internal pipelines. Worth a one-line comment at each hardcoded call site so the decision is visible from the code.
4. Open questions
-
Also promote
include_tool_results? Paired withinclude_tool_callsin the indexer.copyneeds itFalsetoo. Same config shape —tui.include_tool_results,copy.include_tool_results— or fold into the same key? Current bias: one key per parameter, keeps the mapping mechanical and avoids a silent coupling. -
CLI flag override on
threadhop copy? Something likethreadhop copy --include-tool-callsfor the one-off case where the user wants a verbatim copy. Explicitly deferred from v1 per the copy design discussion, but worth listing here so future-us doesn't have to re-derive the ergonomics. -
TUI live reload? If a user edits
config.jsonwhile the TUI is running, does the renderer pick up the new value on the next 5 s refresh, or only on restart? Other config knobs (theme, sidebar width) are set-and-forget today — defaulting to restart-only keeps parity. -
Keybinding in the TUI to toggle
include_tool_callsat runtime? Natural extension — a density toggle mapped to e.g.T. Not required for this issue but should land in the same PR if the UX ergonomics demand it. Ties into the density-toggle thread indocs/UI-IMPROVEMENTS.md.
5. Action items
- Add
tui.include_tool_callsandcopy.include_tool_calls(and optionally*.include_tool_results) to the~/.config/threadhop/config.jsonschema with defaultstrueandfalserespectively - Thread the config values to the TUI transcript-build path and
copy.py's indexer calls, falling back to the hardcoded default when the key is absent - Leave search indexing, observer, reflector, and handoff hardcoded to
True— add a one-line comment at each site so the decision is grep-able - Document the two new keys and their effect in
README.md(orINSTALL-MACOS.md, wherever the config surface is described) - Verify via
migration.pythat upgrading users without the keys silently get default behavior - Decide the four open questions above (results parity, CLI flag, live reload, keybinding) before cutting the implementation PR
References
indexer._extract_assistant_blocks,indexer._extract_user_text— where the parameters live after the copy change~/.config/threadhop/config.jsonandmigration.py— existing config surface; preserves unknown keysCLAUDE.md(Persistent Config section) — canonical list of what belongs inconfig.jsonvssessions.dbcopy.py(introduced alongside/threadhop:copy) — first consumer-facing caller to passFalse- Issue #58 (turn-as-unit transcript rendering) — adjacent TUI rendering work; if both land together, the density toggle (Q4) slots cleanly into the turn composer
Activity
0No activity yet.