Skip to content

Add --history Option to Display Previous Session History on Resume #1865

@CodeMan1729

Description

@CodeMan1729

Please explain the motivation behind the feature request.
Currently, when I use ./goose session -n my_session -r to continue a previous session, I can’t see the past conversation history within the current session. This sometimes makes it difficult to recall what was discussed before. I have to manually open the file(it's hard to read .jsonl file) in a text editor to review it.
This feature would solve the problem by letting me see the full context directly in the session, improving efficiency and usability. It would unlock use cases like:

  • Resuming long-term project discussions without losing track of prior decisions.
  • Collaborating with others on a shared session file, where seeing the history is key to staying aligned.
  • Quickly referencing past answers or ideas without external tools.

Describe the solution you'd like
I’d like an option, such as -history, to be added to goose session. When combined with -resume, it would load and display all previous messages from the session file before letting me continue the conversation. For example:
./goose session -n my_session -r -history
This would print the historical messages (e.g., in a readable format) and then prompt me to proceed with the current dialogue.
If you don't add -history, it's default to non-display the previous histroy.

Describe alternatives you've considered
Manual file review: I could keep checking the .jsonl file in a separate editor, but this is inconvenient and breaks the flow of using goose. I have tried tools like cat,less,jq. It's hard to read when session is long using above tools.
Using -debug : I tried --debug hoping it would show more details, but it didn’t display the history in a user-friendly way.

Additional context
With the proposed feature, I’d expect something like:
./goose session -n my_session -r -history
[History]
User: Hello
(0 )>: Hi there!
User: I like goose!
(0 )>: Thank you,friend.
[Resuming session]
(0 )> [my next input]

This is my first time contributing to an open-source project, so I’d appreciate feedback on whether this fits the project’s goals!

  • I have verified this does not duplicate an existing feature request

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestp3Priority 3 - Low

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions