Problem
After typing a custom command like /start, there's a period of dead silence with no visual feedback. The spinner ("Thinking") should appear immediately after pressing Enter, but something is blocking before the spinner starts.
Expected
- User types
/start and presses Enter
- Immediately: Spinner shows "Thinking"
- When first chunk arrives: Spinner stops, content streams
Actual
- User types
/start and presses Enter
- 5-10 seconds of nothing — blank screen, no spinner
- Eventually content starts streaming
Context
- This is NOT the bootstrap/environment init (that's covered by "Setting up environment" spinner)
- This is NOT model loading (that happens before "Ready")
- This appears to be something blocking in the custom command processing path itself
- Regular chat messages may also have this issue but custom commands seem worse
Likely Causes
- Blocking API call before the streaming generator starts yielding
- Session/prompt construction doing synchronous work (file reads, context gathering)
- Command parsing/resolution blocking on something
- The spinner is started AFTER some blocking operation instead of BEFORE
Key Files to Investigate
packages/opencode/src/cli/lite/index.ts — handleCustomCommand() function
packages/opencode/src/cli/lite/commands.ts — handleCustomCommand()
packages/opencode/src/cli/lite/session.ts — command() generator
packages/opencode/src/command/ — Command execution path
packages/opencode/src/session/ — Session prompt construction
Acceptance Criteria
Problem
After typing a custom command like
/start, there's a period of dead silence with no visual feedback. The spinner ("Thinking") should appear immediately after pressing Enter, but something is blocking before the spinner starts.Expected
/startand presses EnterActual
/startand presses EnterContext
Likely Causes
Key Files to Investigate
packages/opencode/src/cli/lite/index.ts—handleCustomCommand()functionpackages/opencode/src/cli/lite/commands.ts—handleCustomCommand()packages/opencode/src/cli/lite/session.ts—command()generatorpackages/opencode/src/command/— Command execution pathpackages/opencode/src/session/— Session prompt constructionAcceptance Criteria