Skip to content

[FEATURE]: Allow custom session ID when starting qwen-code (e.g., --session my-project) #2603

@seekskyworld

Description

@seekskyworld

What would you like to be added?

Feature hasn't been suggested before.

I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Currently, qwen-code automatically generates a session ID when starting a new session. While this works well, it makes it difficult to organize or intentionally resume sessions for specific projects.

I would like to request support for manually specifying a session ID when launching qwen-code, similar to how OpenClaw allows custom session identifiers.

Example
qwen-code --session my-project

With this feature, users could:

Start a session with a meaningful name
Resume the same session later using the same session ID
Organize multiple projects more easily
Avoid relying only on auto-generated session IDs
Example workflow

Start a session:

qwen-code --session my-project

Later resume the same session:

qwen-code --resume my-project

Why is this needed?

Benefits
Better project-based session organization
Easier session recovery
More predictable workflows when using qwen-code for multiple tasks
Improved scripting and automation possibilities

This feature would be especially useful for developers who use qwen-code across multiple repositories or long-running development sessions.

If session IDs are currently auto-generated internally, this could potentially be implemented as an optional override flag while keeping the current default behavior unchanged.

Additional context

No response

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

Status
In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions