feat(cli): show session-id on exit, add resume <session-id> subcommand#218
Merged
Conversation
… display Exit interactive CLI shows the session ID so users can copy-paste `vibe-trading resume <id>` to resume later. The resume subcommand loads a specific session by ID and enters the interactive loop with full history — messages are persisted through the existing _run_one_turn / _append_message path. Signed-off-by: zwrong <1003912034@qq.com>
Simplify / Brooks-Lint follow-up: - Extract _build_session_history() helper to eliminate the duplicated get_messages -> role/content filter -> _HISTORY_RETAINED_TURNS slice pattern from both _maybe_resume_last_session and the resume path. - Use _extract_max_iter instead of hardcoded max_iter=50 for the resume dispatch so future default changes propagate consistently. - Add TestResumeByIdDispatch (3 tests) covering the vibe-trading resume <session-id> CLI dispatch path — previously uncovered. Signed-off-by: zwrong <1003912034@qq.com>
warren618
added a commit
that referenced
this pull request
Jun 13, 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.
Summary
vibe-trading resume <session-id>subcommandWhy
When troubleshooting, users need to find the trace file associated with a
session. Previously, vibe-trading CLI did not show the session-id on exit —
the only way to identify a session was to check timestamps under
agent/sessions/and guess which folder was newly created. Printing thesession-id solves this, while
vibe-trading resumealso enables resuminga session by ID.
Changes
_interactive_loop()gains aresume_session_idparameter;main()routesresume <session-id>to the interactive loop;session-id is printed on exit
_build_session_history()extracted to eliminate duplicatelogic; add
TestResumeByIdDispatch(3 test cases)Test Plan
Checklist