Skip to content

🚀 Feature Request: “Resume Previous Conversations” Workflow #1100

@tanzhenxin

Description

@tanzhenxin

1. Summary

Introduce a resume workflow that lets qwen seamlessly continue previous sessions scoped to the current project (i.e., the current working directory). This enables multi-step development workflows without reconstructing context manually.

Breaking Changes:

  • Old JSON session files are not supported
  • /chat slash commands are removed, and history chat list are ignored

2. --continue: Resume the Most Recent Session

qwen --continue
  • Resumes the most recent session in the current project
  • Restores message history, (model config?), and tool state
  • Starts in interactive mode

Non-interactive usage

qwen --continue --p "Continue my task"
  • Same as above, but non-interactive
  • Ideal for scripts and CI

3. --resume: Pick a Session

qwen --resume
  • Shows an interactive list of sessions from the current project only
  • Includes summary, timestamps, message count, and optional git info
  • Arrow keys to navigate; Enter to select

4. Technical Notes

🔄 Breaking Change: JSON → JSONL Storage

The old JSON session format is replaced by a project-scoped JSONL system.

  • No backward compatibility
  • Sessions are stored under a directory tied to the current working directory
  • Sessions from one project are not visible in another

JSONL Structure

  • Line 1: Metadata

    • id, title, timestamps
    • model configuration
    • project root path / git metadata
  • Line 2+: Message entries

    • user, assistant, tool events

Benefits: fast listing, incremental saves, improved safety.


đź“„ Listing, Loading & Auto-Save

Conversation Listing

  • Only the first line of each JSONL file is read
  • Listing is restricted to the project’s session directory

Conversation Loading

  • Full JSONL is deserialized
  • Restores complete history + tool state + config

Auto-Save

  • New messages appended as new JSONL lines
  • Metadata never rewritten
  • Safe, incremental persistence

5. ACP Integration

The resume system is fully exposed through customized ACP endpoints:

session/list

  • Returns metadata for sessions in the current project only
  • Mirrors CLI scoping behavior

session/load

  • Loads full session history for a given project-scoped session
  • Restores configuration + tool state

This ensures consistent behavior across CLI, IDE plugins, and external clients.


6. Breaking Change: Removal of /chat Commands

All /chat slash commands (e.g., /chat new, /chat list, /chat switch) are removed.

Rationale

  • Fully superseded by the new session system
  • Simplifies UX by having one unified flow
  • Reduces duplicated functionality and edge cases

7. Example Usage

# In a project folder
qwen --continue
qwen --continue --print "Run tests again"
qwen --resume            # lists sessions for this project only

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions