Skip to content

feat(context): add a Handoff-backed continuation profile for prepare_context #1788

Open

Description

@AlexStocks

Feature description

Add a Handoff-backed continuation profile for prepare_context.

When a user starts a fresh session after a rollover, the host should not have to inject the full old transcript or a lossy summary. It should be able to ask PowerContext for a bounded continuation context that includes the latest relevant Handoff, evidence availability, and selected durable memory.

Codex prior art to review:

The portable idea is to separate fresh-session startup from transcript inheritance: give the new session the explicit work checkpoint plus bounded supporting context, not the old conversation.

Problem and proposed solution

Today, Handoff and PreparedContext are separate concepts. That separation is correct, but host integrations need a supported way to combine them for continuation:

  • Handoff says what work state should be continued.
  • PreparedContext says what bounded context should be injected into a turn.

Proposed behavior:

  • Add a continuation-oriented prepare_context profile or option.
  • When requested, include the selected/latest Handoff as untrusted historical work state.
  • Include Handoff evidence-check results or exact evidence references.
  • Include bounded Memory / Experience / Profile / Topic Memory only through existing assembly rules.
  • Preserve trust wrappers so historical Handoff content never overrides current user/developer/system instructions or live workspace state.
  • Keep Handoff as the authoritative work checkpoint; do not make Context Pack a replacement Handoff family.

Alternatives considered

  • Have hosts manually paste Handoff text into prompts. This works but loses provenance, budget accounting, and evidence checks.
  • Always include latest Handoff in every PreparedContext. That would waste bytes and may inject irrelevant work state.
  • Add a separate Notes or session-summary family. For continuation, Handoff already owns the work-state contract.

Additional context

Related PowerContext work:

Acceptance criteria:

  • A caller can explicitly request a Handoff-backed continuation context.
  • Output distinguishes current instructions from untrusted Handoff history.
  • Evidence omissions and unavailable references remain visible.
  • The feature does not automatically execute the Handoff next action.

Activity

  1. thunguo commented on Sep 30, 2026

    @thunguo
    Collaborator

    plz assign to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions