Skip to content

Add the ability to manually set a session id when creating a new sessionΒ #167

@alexneyler

Description

@alexneyler

Describe the feature or problem you'd like to solve

A user creates a docker container with copilot cli available on it. The user sends a copilot -p command to the container to get a response from the agent. Ideally, future prompts from the user would use the same session. --resume <session-id> is available, but we don't know the right session id, and can only discover it using the interactive --resume command.

Proposed solution

I can think of a couple options that would work:

  1. Allow users to optionally specify a session id via a command line argument, like copilot -p <prompt> --session-id <session-id>
  2. Add a command line argument to run in the "previous session", like copilot -p <prompt> --prev-session

Example prompts or workflows

Option 1:
User creates a docker container with copilot running
User sends copilot -p <prompt> --session-id <session-id> to start a new session
User sends a follow-up prompt with the --resume option to resume the previously created session, copilot -p <prompt> --session-id <session-id>

Option 2:
User creates a docker container with copilot running
User sends copilot -p <prompt> to the container to start a new session
User sends a follow-up prompt with a flag indicating to re-use the last session copilot -p <prompt>--prev-session

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions