Skip to content

fix(cli): persist close transcript without history alias - #64004

Merged
kshitijk4poor merged 12 commits into
NousResearch:mainfrom
kshitijk4poor:salvage/63274-cli-close-persist
Jul 14, 2026
Merged

fix(cli): persist close transcript without history alias#64004
kshitijk4poor merged 12 commits into
NousResearch:mainfrom
kshitijk4poor:salvage/63274-cli-close-persist

Conversation

@kshitijk4poor

Copy link
Copy Markdown
Collaborator

Summary

  • Salvages the original contribution from fix(cli): persist close transcript without history alias #63274 while retaining its commit and author attribution.
  • Persists terminal-close transcripts exactly once across aliased live histories, resumed prefixes, and user input staged before worker startup.
  • Serializes marker claim → SQLite append for normal turn persistence and every direct session flush path.
  • Keeps voice/model/skills recovery text API-local, including multimodal turns; durable history retains the original clean user input.
  • Preserves first-turn system-prompt initialization before a session row can be created.

Fixes #63766.

Validation

  • 595 passed across affected CLI, agent, persistence, resume/branch, TUI-finalization, approval, and provider regression suites.
  • ruff check, py_compile, and git diff --check passed.
  • Real SQLite probes cover resumed-prefix close, close-before-worker staging, text/multimodal API-local notes, and concurrent direct/normal persistence.
  • Mutation checks prove the new staged-input, direct-flush lock, clean-override, and stale-override guards are exercised.
  • ty diagnostics were reduced versus the same current upstream baseline (716 vs. 719); no net-new type diagnostics.

Attribution

The original contribution remains in the series as:
dsad <sswdarius@gmail.com>.

The salvage follow-up commits are authored by kshitijk4poor.

@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P1 High — major feature broken, no workaround sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state labels Jul 13, 2026
@kshitijk4poor
kshitijk4poor merged commit 0684506 into NousResearch:main Jul 14, 2026
31 checks passed
Gravezzz pushed a commit to Gravezzz/hermes-agent that referenced this pull request Jul 21, 2026
…4-cli-close-persist

fix(cli): persist close transcript without history alias
@kshitijk4poor
kshitijk4poor deleted the salvage/63274-cli-close-persist branch August 5, 2026 07:10
randlee pushed a commit to randlee/hermes-agent that referenced this pull request Aug 11, 2026
…4-cli-close-persist

fix(cli): persist close transcript without history alias
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/cli CLI entry point, hermes_cli/, setup wizard P1 High — major feature broken, no workaround sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(cli): prevent duplicate staged user persistence on terminal close

3 participants