fix(acp): /read endpoint returns messages from ACP event store (#3143)#3151
Merged
Conversation
When no JSONL file exists (ACP mode), the /read, /transcript, and /transcript/cursor endpoints now fall back to the ACP event store. - Added AcpEventStore injection into SessionTranscripts - readMessages() falls back to readFromAcpEvents() when no JSONL - getCachedEntries() falls back to ACP events (powers /transcript) - Converts ACP event types to ParsedEntry format: - message.delta β assistant/text - thinking.delta β assistant/thinking - tool.started β assistant/tool_use - tool.completed β assistant/tool_result or tool_error - approval.requested β system/permission_request - Accumulates consecutive deltas, flushes on type/messageId change - Wires event store in server.ts after ACP init Fixes #3143, fixes #3139
3 tasks
This was referenced May 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #3143, fixes #3139
When no JSONL transcript file exists (ACP mode), the
/read,/transcript, and/transcript/cursorendpoints returned empty messages. ACP sessions store transcript data in the ACP event store, not JSONL files.Changes
src/session-transcripts.ts: AddedAcpEventStoreinjection +readFromAcpEvents()method that converts ACP events toParsedEntryformatmessage.deltaβassistant/text(accumulates consecutive deltas)thinking.deltaβassistant/thinkingtool.startedβassistant/tool_usetool.completedβassistant/tool_resultortool_errorapproval.requestedβsystem/permission_requestreadMessages(),getCachedEntries()(powers/transcriptand/transcript/cursor)src/session.ts: AddedsetAcpEventStore()passthroughsrc/server.ts: Wires ACP event store after initializationVerification
Backward Compatibility