Skip to content

feat(conversations): Add readConversationEvent tool - #2601

Merged
thomasjiangcy merged 1 commit into
mainfrom
feat/read-conversation-event
Nov 3, 2026
Merged

thomasjiangcy merged 1 commit into
mainfrom
feat/read-conversation-event

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Adds readConversationEvent, a read-only deferred tool in the conversations source. It reads the full text of one event by seq, in char pages. searchConversationEvents replaces payloads over 4 KB with payload_omitted, so before this there was no way to get a large tool result back after compaction. Compaction-time trimming of old tool results (separate PR) will point its placeholder at this tool, so this PR must merge first.

  • Input: seq, optional conversation_id (default current), offset (default 0), limit (default 20,000, max 50,000 chars).
  • Output: text, offset, total_chars, has_more, type, seq, history_version, created_at, plus tool_name / is_error for tool results.
  • The lookup has no history-version filter, so it finds events from replaced history versions.
  • Agent history items render as the text the model saw: text parts, [image: …], [tool call: name {args}]. Thinking blocks and the hidden details payload are not returned. Messages return their text. Other events return JSON, with replacement history reduced to a count as in searchConversationEvents.
  • Access checks (current tree, or public in the same Slack workspace) and replacement-history stripping moved to conversations/event-access.ts, and both tools use them. searchConversationEvents behavior does not change.

The new behavioral eval in continuity.eval.ts asks for an exact checksum that is only in a compacted bash result. I could not run it in my sandbox because the eval egress tunnel was not available, so it still needs a live run. Without the cleared-result placeholder, the agent has to find the seq through searchConversationEvents first. If it fails before the trimming PR lands, that is the gap.

Open question: offset/limit count UTF-16 code units, so a page boundary can split a surrogate pair.

via @thomasjiangcy.

--

View Session [Sentry]

Co-Authored-By: Thomas Jiang <20501235+thomasjiangcy@users.noreply.github.com>
@vercel

vercel Bot commented Nov 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Nov 3, 2026 11:39am UTC

Request Review

@github-actions github-actions Bot added the risk: high PR risk score: high label Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

6 screenshot changes — 6 changed · 0 added · 0 removed

Review screenshots in Frameshift

Automation Run Details · Desktop
Automation Run Details · Desktop
Changed
Automation Run Details Light · Desktop
Automation Run Details Light · Desktop
Changed
Conversation Attachment · Desktop
Conversation Attachment · Desktop
Changed
Conversation Attachment · Mobile
Conversation Attachment · Mobile
Changed
Conversation Attachment Modal · Desktop
Conversation Attachment Modal · Desktop
Changed
Settings Mcp · Desktop
Settings Mcp · Desktop
Changed

@thomasjiangcy
thomasjiangcy merged commit 89f35a0 into main Nov 3, 2026
52 checks passed
@thomasjiangcy
thomasjiangcy deleted the feat/read-conversation-event branch November 3, 2026 12:07

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 7777b133 Deployed Nov 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant