Skip to content

[feature] Online: resume shared DMs from a replay cursor #235

Open

Description

@AetherAI3

Gap

The terminal polls /agent/managed/{id}/messages?limit=100 and remembers only IDs seen in this process. After more than 100 messages arrive during a disconnect or while the CLI is closed, older unseen messages cannot be recovered through that endpoint. Cloud already has a conversation event replay cursor, but the terminal adapter and client do not use it.

Evidence: terminal fixed-window request, poll and in-memory seen map, Cloud replay cursor, terminal adapter's messages-only route.

Outcome

  • Expose the existing owner/agent-bound replay cursor to the CLI through a verified terminal adapter or an explicitly supported direct route. Page until caught up with bounded batches; persist the last acknowledged cursor per account and conversation.
  • Bootstrap a new terminal with recent history and an explicit older-history action. Resume after disconnect or restart without missing or duplicating messages, edits, or admission changes.
  • Detect invalid, reset, or out-of-range cursors and show a gap/recovery state. Do not silently declare synced after a partial window.
  • Bound network work and memory; a busy DM must not freeze the composer or produce an unbounded replay loop.

Acceptance

Inject over 500 ordered events while the terminal is offline, then reconnect and verify every event is rendered once in order. Test restart, concurrent web activity, edited message, admission update, cursor reset, wrong owner/agent, and account switch. The CLI must never display another account's cached transcript.

Scope / dependency

Read/replay reliability for the shared Online DM. Use Cloud's canonical conversation and cursor; do not create a terminal-specific inbox. This is a prerequisite for resolving uncertain sends by read-back.

Activity

  1. added
    feature
    on Sep 30, 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

    feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions