Fix /history on async saver + 3 config diagnostics (0.6.28: #106, #107, #108, #109) - #111
Merged
Merged
Conversation
…ig persist surface, blank load errors (#106, #107, #108, #109) Ship 0.6.28 fixing four cli-local issues: - #106 (regression from #102): /history threw "Event loop is closed" in the default persist-on config because cmd_history called the SYNC get_state on the async-only AsyncSqliteSaver (opened per-turn and already closed). It now reads through the async API on a freshly-opened saver over the same SQLite file. - #107: --show-config mislabelled a value set via DEEPAGENT_SPEC as [env:DEEPAGENT_AGENT_SPEC] (a var the user never set). The source label now names the alias actually set, matching the stderr note. - #108 (finishes #102 item 3): --show-config now surfaces the persist/session config (value + source + store path) in both on and off states; interactive /config appends the identical block so the two can't diverge. - #109: a top-level/load exception with an empty str(e) printed a blank, typeless "Error:". It now names the exception class and points at -v, like the runtime turn-error path. One regression test per issue; full suite green; ruff check + format clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011HWCfJii6gXd3XL3Gq3W8B
This was referenced Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ships 0.6.28 fixing four cli-local issues in one release. One regression test per issue; full suite green;
ruff check+ruff format --checkclean.#106 (bug, regression from #102) —
/historythrows "Event loop is closed"In the shipped persist-on default the durable checkpointer is the async-only
AsyncSqliteSaver, opened inside each turn's own event loop and closed when the turn ends.cmd_historyread state via the syncgraph.get_state, which against that async, already-closed saver scheduledaget_tupleas a never-awaited coroutine and surfacedCould not retrieve history: Event loop is closed+ aRuntimeWarning— every user hit it (only--no-persistworked). Now reads through the async API (aget_state) on a freshly-opened saver over the same SQLite file, mirroring the run loop; the sync path still serves the in-memory case.#107 (bug) —
--show-configmislabels the source ofDEEPAGENT_SPECA value set via the oldest legacy alias
DEEPAGENT_SPECwas labelled[env:DEEPAGENT_AGENT_SPEC]— the canonical-legacy key the resolver copies it onto, absent from the environment, contradicting the command's own stderr note. The[source]column now reports[env:DEEPAGENT_SPEC](re-attributed inCodeConfig.resolve, same class of fix as #101/#20).#108 (enhancement, finishes #102 item 3) —
--show-confignever surfaced persist/session configPersistence was visible only in interactive
/status.--show-confignow shows the resolvedpersistvalue with its[source], the(env: LANGSTAGE_PERSIST, toml: session.persist)hint, and the store path when on — in both on and off states, so the off-switch is verifiable. Interactive/configappends the identical block so the two can't diverge.#109 (bug) — blank, typeless
Error:on an empty-message load exceptionA bare
assert/raise NotImplementedError/RuntimeError()has an emptystr(e), so the top-level handlers printed justError:. They now name the exception class (Error: NotImplementedError) and point at-v, matching the runtime turn-error path.Tests
tests/test_history_persist.py(/history is broken in the default (persist-on) config: "Could not retrieve history: Event loop is closed" + unawaited-coroutine warning — cmd_history calls sync get_state on an async AsyncSqliteSaver #106),tests/test_load_error.py(A load/top-level exception whosestr(e)is empty prints a blank, typelessError:— no exception class, no-vhint (inconsistent with the runtime turn-error path) #109), and newtests/test_show_config.pycases (--show-configmislabels the source ofDEEPAGENT_SPECas[env:DEEPAGENT_AGENT_SPEC]— a var the user never set (contradicts its own deprecation note) #107,--show-confignever surfaces the persist/session config — only interactive/statusdoes (leaves #102 item 3 half-done) #108). Each verified to fail pre-fix and pass post-fix."stream_mode"/"async_mode" not in outputsubstring checks (they now trip on the sessions_store path, which under pytest embeds the test name) to precise line checks.🤖 Generated with Claude Code
https://claude.ai/code/session_011HWCfJii6gXd3XL3Gq3W8B