Skip to content

Claude Code agents are global but seeded memory is project-scoped #6

Description

@Sanderhoff-alt

Problem

For the Claude Code harness, self-driving-agents install ... --harness claude-code stages agent content under ~/.self-driving-agents/claude-code/<agent> and asks the user to run:

/hindsight-memory:create-agent <agent> from ~/.self-driving-agents/claude-code/<agent>

The installer configures the Hindsight Claude Code plugin with:

dynamicBankGranularity = ["agent", "project"]

That means the create-agent command initializes only the bank derived from the project directory where the user runs it. The seed files are retained into that current bank, and the knowledge pages / mental models are created in that current bank.

However, the generated subagent file is written to ~/.claude/agents/<agent>.md, so the subagent is globally available in Claude Code. If the user switches to another project, the same subagent can still be invoked, but the derived bank is now <agent>::<otherProject>, which has not had the seed content retained or the mental model pages created.

Impact

The agent appears installed and usable globally, but in a new project it starts with an uninitialized Hindsight bank. Its startup instructions call agent_knowledge_list_pages, but the current project bank may have no pages and no retained seed documents.

This is confusing because the subagent definition is global while the seeded memory is project-scoped.

Expected behavior

The user should either be clearly told that each project must initialize the agent's Hindsight bank once, or the subagent should detect that the current project bank has not been initialized and guide the user through initialization.

Possible direction

This probably needs an explicit product decision around whether Claude Code self-driving agents should use project-scoped seed initialization, agent-global seed knowledge, or some hybrid. At minimum, the install flow and generated subagent instructions should make the current scoping behavior clear.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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