-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed as not planned
Closed as not planned
Copy link
Labels
coreAnything pertaining to core functionality of the application (opencode server stuff)Anything pertaining to core functionality of the application (opencode server stuff)needs:complianceThis means the issue will auto-close after 2 hours.This means the issue will auto-close after 2 hours.
Description
Summary
Add a dedicated session message count API endpoint and backing session function so clients can retrieve message counts without streaming/deserializing full message history.
Problem
Counting messages currently requires loading all messages, which adds unnecessary overhead and latency when only the count is needed.
Proposed solution
- Add a
Session.messageCount()helper usingSELECT COUNT(*) - Expose
GET /session/:sessionID/message/count - Return a lightweight count payload with existing auth/validation/error patterns
Context
This issue is to track and link the existing implementation proposed in PR #13795.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
coreAnything pertaining to core functionality of the application (opencode server stuff)Anything pertaining to core functionality of the application (opencode server stuff)needs:complianceThis means the issue will auto-close after 2 hours.This means the issue will auto-close after 2 hours.