Skip to content

feat(protocol): native wake receipts — durable acceptance vs turn-entry proof #232

Open

Description

@KooshaPari

What

Tracking issue for the native wake receipts protocol. A wake receipt is a durable
acknowledgement that an explicit native wake was accepted for a session, distinct from
the weaker "the RPC returned" signal.

Why

notify_session today reports success as soon as the call returns, which is not proof
that the target session durably accepted the work. A caller cannot distinguish
"queued", "delivered", and "the agent actually entered a turn". The receipt closes that
gap by making acceptance an explicit, persisted state.

States

  • queued — durable acceptance; the receipt has been recorded.
  • awakened — requires turn-entry proof, not just enqueue.

A synthetic continuation (reload recovery) resumes a previous turn and must not
start a new model-usage turn, so that path passes continues_turn = true.

Surface

  • ServerEvent::WakeReceipt { id, receipt_id, session_id, status } over the wire protocol.
  • GetWakeReceipt { id, receipt_id } command.
  • crates/jcode-app-core/src/server/wake_receipts.rs — submit, mark_awakened,
    target_is_allowed.
  • A wake target must already exist in this profile; a receipt never creates a session
    implicitly from untrusted bridge input.

Provenance

Originally #107, which was stacked on codex/native-wake-base-1c7426e. That base is
2810 ahead / 403 behind master and will never land. The change has been lifted onto
master directly so it can be reviewed and merged; #107 should be closed as superseded.

Acceptance

  • WakeReceipt is emitted only after durable acceptance
  • awakened is never reported without turn-entry proof
  • target_is_allowed rejects unknown sessions rather than creating one
  • cargo check --all-targets clean for jcode-protocol, jcode-app-core, jcode-base

Activity

  1. added
    kilo-triaged
    on Nov 3, 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

    kilo-triaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions