Skip to content

[Bug] No spinner after custom command - silent blocking at start #93

@randomm

Description

@randomm

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

  1. User types /start and presses Enter
  2. Immediately: Spinner shows "Thinking"
  3. When first chunk arrives: Spinner stops, content streams

Actual

  1. User types /start and presses Enter
  2. 5-10 seconds of nothing — blank screen, no spinner
  3. 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

  1. Blocking API call before the streaming generator starts yielding
  2. Session/prompt construction doing synchronous work (file reads, context gathering)
  3. Command parsing/resolution blocking on something
  4. The spinner is started AFTER some blocking operation instead of BEFORE

Key Files to Investigate

  • packages/opencode/src/cli/lite/index.tshandleCustomCommand() function
  • packages/opencode/src/cli/lite/commands.tshandleCustomCommand()
  • packages/opencode/src/cli/lite/session.tscommand() generator
  • packages/opencode/src/command/ — Command execution path
  • packages/opencode/src/session/ — Session prompt construction

Acceptance Criteria

  • Spinner appears immediately (<100ms) after pressing Enter
  • No blocking operations before spinner starts
  • User has visual feedback that their input was received

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions