Skip to content

[Fix] oclite TUI exits immediately - missing await on startInkTUI() #138

@randomm

Description

@randomm

Problem

oclite TUI never renders - process exits before Ink can paint.

Root Cause

entry.ts line 28: startInkTUI() returns a Promise (waitUntilExit()) but it's not being awaited.

Current (broken):

fn: async () => {
  startInkTUI()  // Returns promise, not awaited!
},

Fixed:

fn: async () => {
  await startInkTUI()  // Must await!
},

Execution Flow

  1. ✅ Bootstrap completes
  2. startInkTUI() called, render(<App />) executes
  3. waitUntilExit() promise returned but NOT awaited
  4. fn() returns immediately
  5. Instance.provide() completes
  6. ❌ Event loop empty → process exits before first frame renders

Fix

Add await before startInkTUI() in entry.ts line 28.

Files

  • packages/opencode/src/cli/ink/entry.ts line 28

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions