rajatslakhina

Session Replica Kit — Development skill for Claude Code

Development community

Resumable, exactly-once event-stream client for long-running agent sessions on iOS: cursor-based resume, ordering across parallel tool calls, backpressure, a command outbox where delivered != acknowle.

How to install Session Replica Kit

This entry records only its repository, not the path inside it, so there is no exact command to give. Open rajatslakhina/session-replica-kit and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Session Replica Kit does

Resumable, exactly-once event-stream client for long-running agent sessions on iOS: cursor-based resume, ordering across parallel tool calls, backpressure, a command outbox where delivered != acknowledged, and an independent invariant checker.

Alternatives in Development

  • Connect — Fancy stream processing made operationally mundane 8608 114 1 8.6k ★
  • Purpose — Orient yourself in pi-vs-cc — a collection of Pi coding agent extensions and agent specs that progressively de 527 ★
  • Claude Code SDK TS — Configure models, enable tools, stream events, then fetch text, JSON, run details or token stats in one call v 206 ★

README

SessionReplica

**Your phone is not a remote control for a coding agent. It is a replica of one — and every hard problem follows from that word.**

A remote control sends commands and forgets them. A replica has to answer a much harder question: *given a stream that dropped, duplicated, reordered and died halfway through, what is true right now?* That is a distributed-systems problem wearing a mobile-app costume, and it is the reason a "simple" phone client for a long-running agent session keeps shipping bugs that look like UI bugs and aren't.

`SessionReplica` is that client, built properly: resumable cursor-based streaming with exactly-once ingestion, an ordering model that tolerates parallel tool calls arriving interleaved, backpressure so a 400-event burst does not become 400 UI updates, an outbound command log where *delivered* and *acknowledged* are different states, an explicit reconciliation rule for who owns what on reconnect, and a connection supervisor that degrades to status-only instead of hanging.

It ships with a scripted session server and a seeded chaos transport, so every claim above is exercised by tests that drop, duplicate, reorder, stall and disconnect the stream — and then assert the replica's transcript is byte-identical to the server's.


Why this matters

Between 3 and 12 September 2026, Claude Code's Remote Control feature — which live-streams a running agent's tool calls to phone and browser clients — shipped a fortnight of fixes in public ([changelog](https://releasebot.io/updates/anthropic/claude-code), [docs](https://code.claude.com/docs/en/remote-control)):

Shipped fix What it actually was
Sessions stalling for minutes when the connection degraded No distinction between dead and degraded; the client waited on a link that was delivering heartbeats but no content
A mid-session connect re-sending tool definitions, blowing the prompt cache Attach treated as "start over" instead of "resume from a cur