Skip to content

Specify portable agent-session hooks for durable contexts #3780

Description

@slusset

Motivation

Buzz's sticky-attention chain says accountable agents leave durable attention residue while working, but it does not specify how an agent harness discovers a bounded context, records lifecycle events, distinguishes abandoned sessions from concurrent ones, or checkpoints context-owned artifacts. Without that behavior, each harness integration can become a hardcoded, transcript-capturing adapter whose identity, recovery guarantees, and publication boundary are unclear.

Proposed solution

Extend the existing sovereign-builder / sticky-attention IDD chain with a portable agent-session lifecycle capability:

  • a context-owned, explicit opt-in that remains authoritative for context identity, hook enablement, disclosure policy, and checkpoint policy;
  • a generic host adapter that discovers either the context root or a linked repository and fails closed on ambiguous ownership;
  • session identity namespaced by context, adapter, and harness-local session ID;
  • policy-gated, metadata-only session-start and session-end residue that excludes prompts, responses, transcripts, credentials, error bodies, and final messages;
  • best-effort session-end capture with evidence-gated reconciliation: a later start alone cannot interrupt a concurrent session, while a provably delayed completion can correct effective state without erasing history;
  • explicit read-only status and local checkpoint operations with symlink-safe inventory, configured filename/content secret rejection, sanitized repository metadata, removal tombstones, and manifest-last replacement;
  • a strict boundary between local durability and publication: lifecycle hooks, reconciliation, status, and checkpoints never imply replication or sync;
  • adapter independence, with GitHub Copilot CLI as the first candidate harness rather than a context-specific implementation.

The proposed PR should update the persona, journey, stories, bounded-context model and session lifecycle, executable behavior, harness contract, capability scope, glossary, and spec index so the chain remains traceable from intent through behavior.

Alternatives considered

  • Rely only on agent instructions and manual checkpoint commands. This cannot guarantee start/end capture and leaves interruption recovery undefined.
  • Hardcode a Copilot extension to one context ID or filesystem path. This works for one installation but breaks portability and makes adapter code authoritative over context policy.
  • Capture transcripts at session end. This expands the disclosure boundary unnecessarily; policy-gated lifecycle metadata plus explicit context artifacts preserve continuity without copying conversation content.

Additional context

Related to #3592, which requests GitHub Copilot CLI as a coding harness. This issue is narrower in integration surface but deeper in lifecycle semantics: it specifies durable-context behavior that any supported harness should satisfy. A local Copilot extension prototype informed the proposed discovery, hook, reconciliation, and checkpoint boundaries; repository evidence remains intentionally pending. No closer open issue was found.

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