Problem
In long conversations, users cannot scroll back to the first message. The TUI only loads the most recent 100 messages, with no way to access earlier history.
Root Cause
The message fetch limit is hardcoded to 100 in sync.tsx:348:
sdk.client.session.messages({ sessionID, limit: 100 })
Proposed Solution
Make the limit configurable via tui.message_limit in opencode.json:
{
"tui": {
"message_limit": 500
}
}
- Default: 100 (preserves current behavior)
- Range: 1-10000
Implementation
- Add
message_limit to TUI config schema in config.ts
- Use config value in
sync.tsx with fallback to 100