Skip to content

Memory consolidation subprocess should run with --no-tools to prevent transcript prompt injection side effects #18

@gebeer

Description

@gebeer

Memory consolidation subprocess should run with --no-tools to prevent transcript prompt injection side effects

A pi-memory consolidation session treated an embedded prior conversation transcript as live instructions and executed a project E2E script. The script generated PDFs and sent emails unintentionally.

Impact

  • A project E2E script was executed twice, generating PDFs and sending test emails to configured recipients/BCCs.

Active pi-memory settings

"memory": {
  "consolidationModel": "opencode-go/deepseek-v4-flash",
  "lessonInjection": "selective"
}

Why this appears to be a pi-memory bug

Memory consolidation is a pure extraction/consolidation task. The assistant should have extracted reusable facts only.

Instead, the assistant interpreted a line from the embedded transcript:

User: ok. run the test script again

as an active instruction and used shell access to run the E2E script.

The consolidation subprocess is launched with --no-extensions, but built-in tools such as bash remain available. Since the conversation is already injected into the prompt and the JSON response is parsed/applied programmatically by pi-memory, the consolidation subprocess does not need any tools.

Suggested Fix

Add --no-tools to the nested pi invocation used for consolidation.

Repro artifact

JSONL transcript can be supplied if needed

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