Skip to content

fix(cli): remember "Start new chat session" until summary changes#3308

Merged
tanzhenxin merged 3 commits intoQwenLM:mainfrom
reidliu41:issue-3088-welcome-back-choice
Apr 16, 2026
Merged

fix(cli): remember "Start new chat session" until summary changes#3308
tanzhenxin merged 3 commits intoQwenLM:mainfrom
reidliu41:issue-3088-welcome-back-choice

Conversation

@reidliu41
Copy link
Copy Markdown
Contributor

TLDR

Fixes the Welcome Back flow so choosing Start new chat session is remembered for the current project until .qwen/ PROJECT_SUMMARY.md changes.

This avoids repeatedly showing the same dialog on every restart after the user has already chosen to start fresh.

Screenshots / Video Demo

=================================

  > /summary

  ✅ Project summary generated and saved successfully! Saved to: .qwen/PROJECT_SUMMARY.md


/tmp/qwen-3088-repro$ cat .qwen/PROJECT_SUMMARY.md
The user wants a project summary in markdown format based on the conversation history.

    *   User provided context: Date, OS, working directory (`/tmp/qwen-3088-repro`), folder structure (contains `READM

select -- start a new session
Tips: Try /insight to generate personalized insights from your chat history.
   ╭──────────────────────────────────────────────────────────────────────────────────────────────────╮
   │                                                                                                  │
   │ 👋 Welcome back! (Last updated: just now)                                                        │
   │                                                                                                  │
   │ 🎯 Overall Goal:                                                                                 │
   │                                                                                                  │
   │   The user is currently orienting themselves and the agent within a new project environment      │
   │   located at `/tmp/qwen-3088-repro`.                                                             │
   │                                                                                                  │
   │ 📋 Current Plan:                                                                                 │
   │                                                                                                  │
   │   Progress: 0/2 tasks completed                                                                  │
   │                                                                                                  │
   │   Pending Tasks:                                                                                 │
   │   • [TODO] Analyze `README.md` to understand the project's objectives and technical stack.       │
   │   • [TODO] Await further instructions from the user on specific tasks to perform.                │
   │                                                                                                  │
   │                                                                                                  │
   │ What would you like to do?                                                                       │
   │ Choose how to proceed with your session:                                                         │
   │                                                                                                  │
   │ › 1. Start new chat session                                                                      │
   │   2. Continue previous conversation                                                              │
   │                                                                                                  │
   ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯



$ cat .qwen/welcome-back-state.json
{
  "version": 1,
  "lastChoice": "restart",
  "summaryFingerprint": "1776297794736.0078:1850"
}


=================================

quit -> access again:

/tmp/qwen-3088-repro$ qwen

   ▄▄▄▄▄▄  ▄▄     ▄▄ ▄▄▄▄▄▄▄ ▄▄▄    ▄▄   ┌──────────────────────────────────────────────────────────┐
  ██╔═══██╗██║    ██║██╔════╝████╗  ██║  │ >_ Qwen Code (v0.14.4)                                   │
  ██║   ██║██║ █╗ ██║█████╗  ██╔██╗ ██║  │                                                          │
  ██║▄▄ ██║██║███╗██║██╔══╝  ██║╚██╗██║  │ API Key | gemma4:31b (/model to change)                  │
  ╚██████╔╝╚███╔███╔╝███████╗██║ ╚████║  │ /tmp/qwen-3088-repro                                     │
   ╚══▀▀═╝  ╚══╝╚══╝ ╚══════╝╚═╝  ╚═══╝  └──────────────────────────────────────────────────────────┘

  Tips: Try /insight to generate personalized insights from your chat history.

───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
>   Type your message or @path/to/file
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

=================================


summary again and changed, ask again:

  > /summary

  ✅ Project summary generated and saved successfully! Saved to: .qwen/PROJECT_SUMMARY.md


quit --> access again
   │ What would you like to do?                                                                       │
   │ Choose how to proceed with your session:                                                         │
   │                                                                                                  │
   │ › 1. Start new chat session                                                                      │
   │   2. Continue previous conversation

$ cat .qwen/welcome-back-state.json
{
  "version": 1,
  "lastChoice": "restart",
  "summaryFingerprint": "1776298405153.2666:1435"
}

Dive Deeper

Root cause:

  • Welcome Back only checked whether .qwen/PROJECT_SUMMARY.md existed.
  • Choosing Start new chat session only updated in-memory UI state for the current process.
  • After restarting Qwen Code, that choice was lost, so the dialog appeared again.

Reviewer Test Plan

Testing Matrix

🍏 🪟 🐧
npm run
npx
Docker
Podman - -
Seatbelt - -

Linked issues / bugs

Fixes #3088

  Persist a project-scoped Welcome Back restart choice keyed to the
  current PROJECT_SUMMARY fingerprint.

  This suppresses the Welcome Back dialog after choosing "Start new chat
  session", while still showing it again after the project summary is
  updated.
tanzhenxin
tanzhenxin previously approved these changes Apr 16, 2026
Copy link
Copy Markdown
Collaborator

@tanzhenxin tanzhenxin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

Clean fix for a real UX annoyance — persists the "Start new chat session" choice so the dialog doesn't re-appear on every restart. Implementation is well-scoped and the state file schema is properly versioned.

One minor note: the mtime:size fingerprint can trigger false re-shows after operations like git stash pop that touch mtime without changing content. Not blocking — a content hash could be a follow-up improvement.

Looks good! Please rebase to resolve the merge conflict and this is ready to go.

Verdict

APPROVE

…back-choice

# Conflicts:
#	docs/users/configuration/settings.md
@reidliu41
Copy link
Copy Markdown
Contributor Author

thanks, updated

Copy link
Copy Markdown
Collaborator

@tanzhenxin tanzhenxin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the update!

@tanzhenxin tanzhenxin merged commit 0747502 into QwenLM:main Apr 16, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remember "Start new chat session" or reduce repeated Welcome Back prompts

2 participants