Skip to content

Correct the documented first-run replay boundary in the Claude Code channel plan #239

Open

Description

@bniladridas

Summary

Correct the first-run replay-boundary description in planning/claude-code-channel.md.

The sentence at line 335 currently says the stream has caught up at “the first heartbeat after replay”. The client lifecycle now treats a heartbeat as liveness only, not as evidence that replay has ended. The planning document should describe the actual boundary so future work does not rely on the old trigger.

Background

PR #232 updates the Claude channel client's first-run lifecycle. For a first run starting at the beginning, replay remains active across pings and disconnects. The client ends replay when it receives the cursor frame, or when it handles a history_expired frame by reporting the gap and advancing to the supplied floor.

The client-side handling is covered by tests. Whether the server emits history_expired on every out-of-retention reconnect has not been independently verified, so this issue should not state that server behavior as established fact.

Scope

  • Update the sentence in planning/claude-code-channel.md that identifies the first heartbeat after replay as the catch-up boundary.
  • State that a heartbeat is not the replay boundary.
  • Describe the cursor frame as the normal explicit replay boundary.
  • Describe history_expired as the gap-reporting path that also ends replay.

Non-goals

  • No source-code or runtime behavior changes.
  • No changes to the server API or mirrored dataclasses.
  • No broader redesign of reconnect, heartbeat, or replay handling.
  • Do not claim that out-of-retention reconnects are guaranteed to produce history_expired without server-side evidence.

Acceptance criteria

  • The planning document no longer describes the first heartbeat as the replay boundary.
  • Its description agrees with the client lifecycle implemented in PR fix(agents): clear the first-run flag when the catch-up completes (#122) #232.
  • The wording preserves the distinction between verified client handling and the unverified server emission assumption.
  • Documentation formatting and relevant documentation checks pass.
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