Skip to content

Allow CLI callers to provide session ID #4874

@ertygiq

Description

@ertygiq

What do you want to change?

Add a flag to the CLI command that allows providing a session ID instead of using an autogenerated one.
E.g. pi --session-id <id> -p 'hello'

I searched previous similar issues and did notice a suggestion to use --session with a full file path.
However, the downside of this is that such sessions cannot be found & restored later with pi -r in the project directory.

Why?

Use case: external orchestration of pi instances. To follow up on an existing session or to fork it, the session ID value must be known. There is no reliable way to extract it from the sessions directory in a concurrent environment.

The ideal solution is being able to provide your own in advance.

How? (optional)

No response

Metadata

Metadata

Assignees

Labels

inprogressIssue is being worked on

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions