Skip to content

Compact Instructions for lineage forking #27

Description

@alokwhitewolf

Lineage forking inherits the parent's session, so the worker protocol lands in the child through the cached transcript. On long ancestor chains Claude Code auto-compacts the older portion -- the protocol can get summarized away. LINEAGE_EXECUTE_USER_PROMPT_TEMPLATE already tells the child to re-read if needed, but it's a hint, not a guarantee.

Inject a Compact Instructions block (CLAUDE.md fragment or via --append-system-prompt-file) that marks the load-bearing context as preserve-on-summary:

# Compact Instructions

Preserve when summarizing:
- current exp_id, hypothesis, parent_commit
- worker protocol; `evo run` is terminal
- pointer-trace references and gate semantics

May be discarded:
- older file reads (recoverable via `evo get` / Read)
- older benchmark output detail
- failed tool calls from prior attempts

Revisit when chains regularly hit a depth where compaction trims the protocol in practice.

https://code.claude.com/docs/en/how-claude-code-works#when-context-fills-up

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