Skip to content

docs: a ping is the replay boundary, a cursor frame is not - #250

Merged
allenhutchison merged 1 commit into
mainfrom
claude/project-thread-4bz48o
Nov 13, 2026
Merged

allenhutchison merged 1 commit into
mainfrom
claude/project-thread-4bz48o

Conversation

@allenhutchison

Copy link
Copy Markdown
Contributor

Requested by Allen · project thread

Human overview

Writes down the agent event stream contract that the questions on #232 brought up. A : ping marks the end of replay, because the server only sends one when it has nothing past the client's position. A cursor frame only marks skipped events. This is the decision to keep the ping as the boundary. Docs only: the FeedFrame docstring and one bullet in the channel plan. Refs #239.

AI reviewer

Details for agents: what the diff does, invariants, verification, checklist

What the diff does. Two prose additions, with no change to behavior.

  • src/pepper_cli/api_client.py FeedFrame docstring: a : ping is the replay boundary (sent only while the server has nothing past the caller's position). A cursor frame is not a boundary and can arrive mid-replay or not at all. A start=head stream opens with its head cursor frame, after scope and before any event or ping.
  • planning/claude-code-channel.md §7.4 first-run bullet: keeps "the first heartbeat after replay" and adds why it is the boundary, plus the same note about cursor frames.

Why. #232 proposed using the cursor frame as the end-of-replay marker, and #246 reworded the plan to match. The server sends a cursor frame only when a page's tail was filtered out, so it is a skip marker. The ping is what claude_channel.py on main already uses. #246 is closed and #232 has been asked to keep only its first_run fix.

Known edge. A single upstream scan that takes longer than the heartbeat interval could produce a ping mid-replay. The client would then end replay early and owe a spurious resync. That is noisy but safe, and this PR does not document it.

Verification. uv run ruff format --check and uv run ruff check both clean. npx markdownlint-cli2@0.18.1 planning/claude-code-channel.md gives 0 errors. Tests and ty were not re-run because the only Python change is a docstring.

Checklist (repo-specific)

  • uv run ruff format --check and uv run ruff check clean (no new lint ignores)
  • uv run ty check src/pepper_cli/ clean: not run, docstring-only change
  • uv run pytest passes: not run, no behavior change
  • Server-contract changes: none; this documents the existing stream contract
  • No token or credential is logged, printed, or put in a fixture
  • README and the bundled SKILL.md updated if commands or output changed: not applicable, no command or output changed

Generated by Claude Code

States the agent event stream contract in FeedFrame and the channel
plan, from the contract questions on #232. Refs #239.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QNDehAAVazXavfSCUqc9om
@allenhutchison
allenhutchison marked this pull request as ready for review November 12, 2026 23:50
@allenhutchison allenhutchison self-assigned this Nov 12, 2026
@allenhutchison
allenhutchison added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit b4d1693 Nov 13, 2026
3 checks passed
@allenhutchison
allenhutchison deleted the claude/project-thread-4bz48o branch November 13, 2026 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants