repositories / pi-ext

pi-ext

bugabingas pi extensions

owned by bugabinga

extensions/forget/README.md

Raw

forget

Experimental active-context forgetting for Pi.

Install / load

Loaded through the root pi-ext package. See root README.

Commands / tools / settings

Commands: none.

Tools:

Settings: none.

Hooks/events:

Behavior

forget appends a Pi compaction entry. Active LLM context becomes:

  1. a short tombstone summary saying prior context was intentionally forgotten;
  2. branch messages from the chosen user boundary onward;
  3. future messages.

Targets:

If target is omitted, current_user is used.

History is not physically deleted from the JSONL session file. It is removed from the active context path by Pi compaction semantics and can be recovered through tree/session history.

Forget is a context-budget tool, not a secrecy/redaction tool. If sensitive text appears in the current request, assistant reasoning, tool results, or later messages, Forget cannot remove that newer span without also dropping the newer branch.

Middle deletion is intentionally unsupported. Pi sessions are append-only, so Forget only performs prefix cuts.

The injected reminder is turn-local system prompt text, not a stored reminder message. It costs a short line each turn but does not accumulate inside the session transcript.

Markdown source
File outline
# forget

Experimental active-context forgetting for Pi.

## Install / load

Loaded through the root `pi-ext` package.
See [root README](../../README.md).

## Commands / tools / settings

Commands:
none.

Tools:

- `forget`:
  drops older active context before `current_user` or `previous_user`.

Settings:
none.

Hooks/events:

- `before_agent_start`:
  injects one short reminder so the agent considers Forget in long mixed-task
  sessions.

## Behavior

`forget` appends a Pi compaction entry. Active LLM context becomes:

1. a short tombstone summary saying prior context was intentionally forgotten;
2. branch messages from the chosen user boundary onward;
3. future messages.

Targets:

- `current_user`:
  keep the latest user request onward. Use for independent new tasks.
- `previous_user`:
  keep the immediately previous user request onward. Use when the latest request
  depends on immediate setup but older context is stale.

If `target` is omitted, `current_user` is used.

History is not physically deleted from the JSONL session file.
It is removed from the active context path by Pi compaction semantics and can be
recovered through tree/session history.

Forget is a context-budget tool, not a secrecy/redaction tool.
If sensitive text appears in the current request, assistant reasoning, tool
results, or later messages, Forget cannot remove that newer span without also
dropping the newer branch.

Middle deletion is intentionally unsupported.
Pi sessions are append-only, so Forget only performs prefix cuts.

The injected reminder is turn-local system prompt text, not a stored reminder
message.
It costs a short line each turn but does not accumulate inside the session
transcript.