Skip to content

Oversized transcript invocation blocks Desktop session and Host recovery #5750

Description

@myxtype

What happened

A valid long-running Desktop task can produce more RuntimeEvents in one invocation than the transcript reader's 8,192-event limit. A transcript tail open then returns persistence_failed / “Session transcript is unavailable”. When Desktop replaces the local Runtime Host, restoring the observed session fails on the same transcript, leaving the Host in a reconnect loop and making other Host-backed actions unavailable.

This is the functional recovery problem behind the diagnosability gap in #5572. The merged diagnostic PRs #5573, #5600, and #5601 record the cause but do not make an oversized invocation readable or prevent the reconnect loop.

How to reproduce

  1. Produce a single Turn invocation with more than 8,192 RuntimeEvents through a long run with many model-thinking and tool events. The records can be valid; malformed JSON is not required.
  2. Open its transcript tail, or reconnect Desktop while that session is observed.
  3. RuntimeTranscriptQuery.events() refuses event 8,193 with RuntimeTranscriptOversizedTurnError. The bootstrap path maps the error to persistence_failed; observation restoration then fails.

In a read-only diagnostic reproduction, one invocation with approximately 9.2k events fails at the 8,192-event limit. Another session with a similar total event count split across several shorter invocations reads successfully. SQLite integrity_check returns ok. No customer data or raw diagnostic files are attached.

Expected behavior

A single oversized but valid invocation should not make the session transcript or the entire Desktop Host unavailable. Preserve access to the rest of the session and report any bounded omission explicitly. Host recovery should isolate this session/read failure rather than repeatedly failing to become ready. Please add regression coverage for an invocation exceeding the source-event limit, including reconnect/observation restoration and a multi-invocation control case.

The issue discussion in #5572 suggests a Turn-aligned placeholder for an oversized invocation or write-side prevention before the limit is reached. Simply increasing the constant would postpone the failure for longer runs.

Environment

  • Code-level reproduction with the transcript storage query used by current main; no packaged Apache Maka release or OS-specific behavior was tested.
  • The 8,192-event guard is present in current main: packages/runtime-host/src/server/session-transcript-reader.ts derives TRANSCRIPT_SOURCE_MAX_EVENTS from TRANSCRIPT_TURN_MAX_MESSAGES * 2, and packages/storage/src/runtime-transcript-query.ts enforces it per invocation.
  • This report contains only aggregate technical facts; customer paths, session IDs, prompts, Skill files, credentials, screenshots, and database contents are intentionally omitted.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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