8000 Link restored sessions to their source so `towit forget` can cascade · Issue #112 · chrisbloom7/to-wit · GitHub
[go: up one dir, main page]

Skip to content

Link restored sessions to their source so towit forget can cascade #112

Backlog

Description

@chrisbloom7

towit restore (#111) starts a new Claude session seeded from an archived one. The new session is archived by the hooks like any other, so anything its agent repeats from the source (a quote, a summary, a token the redaction rules missed) is copied into a second conversation. towit forget <source> removes the source and tombstones its id, but it knows nothing about that copy, so the copy stays.

This is documented in SECURITY.md and the README, not fixed. Restore cannot stop an agent from repeating what it read, and cannot tell afterwards which of its words came from the archive.

Idea

  1. towit restore generates a UUID and starts claude with --session-id <uuid> (the flag exists in current Claude Code), then records "derived from <source id>" in the catalog. This needs a schema migration (a column or a small table).
  2. towit forget <source> lists the sessions derived from it and offers to forget them too (or, at minimum, names them), in the same confirmation that already prints the affected repo keys.
  3. Optional: towit show could mention a session's source in its header.

Limits

  • It only links sessions made through towit restore. Pasting archived text into an ordinary session leaves no link.
  • The new session's id is chosen by restore, so it must not collide with an existing id and must pass the session-id validation.
  • Forgetting a derived session must not cascade back to its source.

Open questions

  • Is the risk worth a migration, given that it only covers one path?
  • Should the cascade ask, or be the default with an opt-out flag?
  • Should --session-id be passed at all if the installed Claude Code does not support it? (towit doctor could check.)

Out of scope here: any attempt to detect copied text by content.

Activity

  1. added
    enhancement
    on Nov 30, 2026
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0