Skip to content

Add native-mode surface for Agent Code terminal/hybrid rendering #3

Description

@Juliusolsson05

Problem

Agent Code supports three agent pane surfaces for CLI-backed providers:

  • Agent: rendered React feed/composer from committed transcript + semantic stream + conditions.
  • Terminal: provider-native/raw surface.
  • Hybrid: terminal-first, temporarily rendered when Agent Code UI features need the feed/composer surface.

OpenCode currently integrates through HTTP/SSE and committed history, with no provider-native surface equivalent to Claude/Codex's PTY path. That means Agent Code has to pin OpenCode to rendered Agent mode; terminal/native mode would otherwise be an empty xterm.

Desired behavior

Add a parallel native-mode path in opencode-headless that Agent Code can consume as OpenCode's provider-native surface.

This should not be a fake PTY. It needs to expose enough native/screen/proxy/transcript interpretation for Agent Code's Terminal/Hybrid semantics to be meaningful for OpenCode, analogous to how Claude/Codex have provider-native terminal behavior plus structured channels.

Notes

  • The existing semantic/screen/committed split should remain the high-level contract.
  • Native mode should be explicit capability, not inferred from provider kind.
  • Agent Code side will gate OpenCode Terminal/Hybrid on this capability and keep OpenCode rendered-only until it exists.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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