Skip to content

Read AGENT_PERSONA envvar as first-class identity input and select histories by persona name #40

Description

@hai-pilgrim

Context

AGENT_PERSONA is already read in one place (tui/src/pets/talking_signal.rs:66) but only to write the talking-file PID signal. It is not used as a first-class identity selector.

Meanwhile, conversation histories (thread-store, message-history) are keyed by thread ID and are not strongly bound to a persona name. A user running AGENT_PERSONA=pilgrim clanker and later AGENT_PERSONA=hai clanker in different directories should get separate, persona-scoped history — not directory-scoped or thread-ID-only history.

What is needed

  1. AGENT_PERSONA as identity input. When set, this envvar should determine which persona is active for the session — selecting the character manifest, history partition, and TUI identity. It should be the canonical way for a launcher script or wrapper to tell clanker "you are X."

  2. Directory-agnostic history selection by name. Histories must not be scoped to the working directory. A persona's conversation history should follow the persona name, not the $PWD. If I run AGENT_PERSONA=pilgrim clanker from /home/me/project-a and then from /home/me/project-b, I should see the same persona history (or at least have the option to).

  3. CLI integration. The existing --name flag and AGENT_PERSONA envvar should converge on a single identity-resolution path: --name > AGENT_PERSONA > last-active (from CC-01 remainder: persisted clanker_id and bare last-active-character continuation #32) > default.

Relationship to existing issues

Acceptance criteria

  • AGENT_PERSONA=<name> clanker selects the named persona (manifest, avatar, history)
  • --name <name> takes precedence over AGENT_PERSONA
  • Conversation history is retrievable by persona name regardless of working directory
  • Existing thread-store and message-history paths do not break for users without AGENT_PERSONA set

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions