Skip to content

Opencode #827

Description

@Nazim23i

What happened?

OpenCode TUI loses input area and sidebar after switching away and back to a worktree

Environment

  • Supacode (latest, macOS 26 Tahoe 26.6.2)
  • MacBook Air M3, 16 GB
  • OpenCode 1.18.21, model Kimi K3 via Moonshot AI
  • Claude Code and Codex also installed, hooks enabled for all

Summary

When running OpenCode inside a Supacode terminal pane, the TUI progressively
loses its layout: the input area disappears, the right-hand context sidebar
disappears, and a narrow ghost column of orphaned characters appears at the
left edge of the pane (fragments like "ar", "/do", "rl" plus empty blocks).

The OpenCode process itself keeps working normally — it responds to input,
completes tasks, and reports correct token counts. Only the rendering breaks.

Frequency

Reproduces on every OpenCode pane, across all worktrees, within a few
minutes of use. Confirmed on at least 4 separate worktrees.

Key detail: agent-specific

Claude Code running in the exact same panes, worktrees, and machine has
NEVER exhibited this. Only OpenCode. This isolates the issue to the
Supacode + OpenCode rendering combination rather than Supacode's terminal
layer in general.

Workarounds (temporary)

  • Resizing the window forces a full redraw and fixes it
  • Archiving and unarchiving the worktree fixes it for ~10 minutes
  • Both are temporary; the glitch returns

Suspected cause

Possibly a resize/SIGWINCH event not propagated to the OpenCode process when
a pane is hidden and restored, leaving OpenCode's internal layout state out
of sync with the actual pane dimensions.

Attachments

[joindre tes 3 captures : état sain, état cassé, et la colonne fantôme]

Image Image Image

Steps to reproduce

Reproduction

  1. Open a worktree in Supacode
  2. Launch opencode in a pane
  3. Work normally for ~10 minutes (several prompts, long agent responses)
  4. Switch to a different worktree in the sidebar
  5. Switch back to the original worktree
  6. The OpenCode TUI is now malformed

Supacode version and build

last version

macOS version

macOs 26.6.2

System locale

en_US (i guess)

Mac hardware

Mac book Air M3

Relevant logs or screenshots

Are you planning to fix this yourself?

  • I intend to open a pull request once this is confirmed and marked ready.

Before submitting

  • I searched existing issues and this is not a duplicate.
  • I am on the latest available version of Supacode.
  • I understand pull requests are closed until the issue is marked ready.
  • I agree to follow this project's Code of Conduct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions