hermes-agent/tui_gateway
cryptoyasenka f2d03c1f2a fix(state,cli,tui-gateway): keep reasoning fields intact across forks and branches
get_messages() only deserializes content and tool_calls; the structured
reasoning columns (reasoning_details, codex_reasoning_items,
codex_message_items) come back as the raw TEXT they were stored as.
Feeding those rows straight back into a write, which is exactly what
the POST /api/sessions/{id}/fork handler does by piping get_messages()
into replace_messages(), hit an unguarded json.dumps() and stored the
already-serialized string encoded a second time. On replay of the fork,
json.loads() then yields the inner string instead of a list, and every
consumer's isinstance(..., list) gate silently drops it: preserved
Anthropic thinking blocks, Codex encrypted-reasoning/message-item
replay, and OpenRouter multi-turn reasoning context are all lost after
a fork, with one more encoding layer added per fork.

The /branch copy loop had the same defect from the other side: it
forwarded reasoning but none of the structured columns, and both TUI
branch writers persisted role/content alone, dropping reasoning and
reasoning_content along with them.

Route the six dumps sites in append_message and _insert_message_rows
through a shared guard that keeps already-serialized strings as-is;
structured values from the live runtime are dumped exactly as before.
Forward the reasoning fields in all three branch writers, matching the
set gateway/slash_commands.py already forwards on its own /branch path.
2026-08-08 17:37:26 -07:00
..
__init__.py
_stdin_recovery.py fix: Windows guard, dedup recovery, profile-safe paths, clear SO_RCVTIMEO 2026-07-20 12:48:50 +05:30
compute_host.py tui_gateway: close dedicated profile SessionDB handles at teardown too 2026-08-07 19:44:41 +05:30
entry.py fix(review): harden portable plugin boundaries 2026-08-07 09:44:21 -07:00
event_publisher.py
git_probe.py fix(gateway): normalize common repo root separators in the git probe 2026-08-07 12:48:41 -05:00
host_supervisor.py fix(windows): widen utf-8 subprocess decode guard to sibling desktop-backend sites 2026-07-24 09:48:28 -07:00
loop_noise.py
method_ctx.py refactor(tui): split @method handlers into methods_* modules (mechanical move, registry set-equality verified) 2026-07-29 11:46:31 -07:00
methods_complete.py Port from superagent-ai/grok-cli: description-aware slash-menu fuzzy scoring 2026-08-08 04:29:16 -07:00
methods_config.py fix(tui): rebind extracted config handler to shared indicator constants 2026-07-31 22:33:16 -07:00
methods_prompt.py style(hud): tighten the surface-note comments and test helper 2026-08-08 16:21:15 -05:00
methods_session.py fix(state,cli,tui-gateway): keep reasoning fields intact across forks and branches 2026-08-08 17:37:26 -07:00
methods_tools.py fix(gateway): report bundled auto-loading plugins as enabled 2026-08-08 17:34:20 -05:00
project_tree.py fix(desktop): stop rendering a repo's main checkout as a duplicate sidebar lane 2026-08-07 12:48:41 -05:00
render.py
server.py fix(state,cli,tui-gateway): keep reasoning fields intact across forks and branches 2026-08-08 17:37:26 -07:00
slash_fuzzy.py Port from superagent-ai/grok-cli: description-aware slash-menu fuzzy scoring 2026-08-08 04:29:16 -07:00
slash_worker.py polish(mem): readonly config read, debug-level trim logs, loud frame test 2026-08-02 22:44:38 +05:30
synthetic_turn.py feat(dashboard): isolate turns in compute host (#65895) 2026-07-16 15:24:03 -04:00
transport.py
turn_marker.py feat(desktop): crash-survivable in-flight turn journal 2026-07-24 23:31:55 -05:00
ws.py perf(cold-start): mitigate ~14s GIL stall during backend init (#60800) 2026-08-03 21:16:09 +05:30