Skip to content

Tools and system prompt CLI options are not persisted in the created session #6498

Description

@bittervec

What happened?

pi CLI allows us to configure the agent toolset with -nt, -nbt or -t options, system prompt with the --system-prompt option when creating a new session.

However, when we were to continue the said session later with either -r or -c options, those options are reset to the default ones if not passed explicitly.

I'm not sure if this is by design but seems to be highly undesired, since the users are not expected to replicate those options passed initially if they were to resume the session later.

On the other hand, since these information is not present in the TUI directly, it's very likely for unaware users to assume those settings are preserved, hence act on that belief which may produce unexpected outcome, e.g. an agent supposed to be read-only starts writing files.

Steps to reproduce

  1. Overwrite default tools and system prompt when creating a new session:
    pi -ne -nt --system-prompt 'hi'
  2. Use /export cmd to export the session summary.
  3. Exit the session.
  4. Continue the session created above:
    pi -c
  5. Use /export cmd again to inspect the session.

Expected behavior

The tools and system propmpt passed via CLI options initially should be present in the resumed session.

Version

0.80.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingno-actionThis issue has been rejected after triage

    Type

    No type

    Fields

    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