Longhouse
← All posts

Provider integrations

Longhouse Provider Integrations

Parsing and managed-control paths for Claude Code, Codex, OpenCode, Antigravity, and Cursor.

Longhouse provides one session archive and capability model for Claude Code, Codex, OpenCode, Antigravity, and Cursor. It does not replace provider CLIs, their terminal UIs, or their native session identities.

Each provider has a different archive format and control surface. Longhouse exposes a capability only when the provider and current session control path support it.

Operating model

Shadow
Sessions discovered from native files or databases. They are searchable and observable, but Longhouse does not control the provider process.
Helm
Sessions launched through Longhouse that retain the provider's normal interactive terminal UI. Longhouse owns a separate control path.
Console
Sessions launched from Longhouse UI. A provider invocation is scoped to a turn while the durable thread remains after the process exits.

Managed control uses the user-installed upstream CLI. It does not imply that Longhouse owns the provider binary.

Archive sources

ProviderNative sourceParsing details
Claude Code~/.claude/projects JSONLTool IDs, compaction boundaries, subagent metadata, and working-directory context.
Codex CLI~/.codex/sessions JSONLSession metadata provides canonical identity and fork lineage.
OpenCodeopencode.db SQLiteSession, message, and part rows are captured read-only, including WAL-driven updates.
Antigravitybrain/<id>/transcript.jsonlPlanner context associates tool results with calls.
Cursor Agentstore.db blob DAGOrdered source blobs are retained and rendered; unknown blobs remain typed render gaps.

The normalized timeline is not a replacement transcript. Longhouse retains provider-native source evidence and projects only records whose meaning is known. This preserves a path to re-render a session when a provider changes its format or exposes a previously unknown record type.

Source fidelity rules

JSONL is incremental, not uniform

Claude and Codex are both JSONL sources, but their identity rules differ. Claude subagent and workflow transcripts require filtering so control ledgers do not appear as empty sessions. Codex session metadata establishes the canonical session ID and fork parentage even when the filename is not sufficient.

SQLite needs live-safe reads

OpenCode and Cursor write while Longhouse is reading. Their adapters are read-only and WAL-aware. Filesystem events on WAL and shared-memory sidecars are mapped back to the canonical database rather than treated as independent sessions.

Raw data is retained separately

Cursor storage is a content-addressed graph. Longhouse stores exact observed metadata and blob bytes, then emits a versioned render projection for text, reasoning, tools, and results. Unknown graph fields remain durable raw records with typed render gaps.

Identity must be provider-backed

Longhouse does not bind a managed session to the newest local file. Provider session IDs, hook claims, database identity, and launch identity must agree. Time, working directory, and process recency are diagnostics, not binding proof.

Claude Code

longhouse claude runs the stock Claude terminal UI with a private local channel. The channel binds to the managed session and provides input injection. Interrupts are limited to the matching Claude process through process-identity checks.

The channel is a local MCP server used as a control path, not a replacement Claude runtime. Longhouse receives the channel capability, then sends a session-scoped injection request to the local bridge. A steer request carries explicit steer intent and is gated on a fresh active runtime phase; a normal idle injection is not represented as steer.

Managed Claude state records the provider session identity and the exact process identities for Claude and the local channel. Local health derives liveness from process scanning. A degraded bridge or closed foreground TUI is not permission to terminate Claude; later continuation uses the provider's persisted session identity.

  • Send input, interrupt, active-turn steer, and answer a pause.
  • Reattach or continue using the native session identity.
  • Remote launch uses the same channel under a detached terminal wrapper; there is no separate one-shot Console adapter.

Codex

longhouse codex resolves the stock codex binary from PATH, starts Codex app-server, places a local WebSocket relay in front of it, and attaches the stock TUI to that server.

The bridge has three different execution shapes. TUI-attached managed mode keeps the user's terminal connected to app-server. Detached-UI managed mode keeps app-server and the bridge alive without a local TUI, which is the remote-launch path. Console is separate prompt-and-exit execution and must not be conflated with detached-UI control.

Bridge state contains the Longhouse session ID, process identities, relay URL, and launch mode. A nonzero exit from the remote TUI attach client is treated as a foreground-link failure. It does not end the bridge or app-server. Only clean user exit or explicit terminate/stop actions can end managed execution.

  • Send input, interrupt, active-turn steer, answer a pause, and reattach or continue.
  • A detached TUI does not imply that the managed session has ended. The bridge remains until an explicit stop path terminates it.
  • Console uses a separate one-shot execution adapter.

OpenCode

longhouse opencode runs stock opencode serve on loopback and attaches the normal OpenCode UI. Bridge state retains the local server address, provider session identity, process identity, and credentials needed to reconnect.

The bridge state is private to the session and uses a local server password. A launch retry first checks for a healthy state file and reuses the existing server. It does not create another opencode serve process for the same Longhouse session.

Liveness has separate checks for the recorded process identity, authenticated local server health, and the presence of a foreground attach TUI. An attach-client failure leaves a healthy server available for reattach. An alive process with a failed health probe is reported as degraded rather than being relabeled as an unmanaged Shadow session.

  • Input maps to OpenCode's prompt API. Interrupt maps to its abort API.
  • Managed server launch is idempotent per Longhouse session, preventing duplicate servers after retries.
  • Supports send, interrupt, terminate, reattach, and turn-scoped Console execution.
  • Supports pause-answer but does not advertise active-turn steer.

Antigravity

longhouse antigravity launches the user-installed Antigravity CLI under a hook-inbox control path. The launcher requires the Longhouse hook to be installed and refuses rather than starting an unmanaged session wearing a managed session id. Bare Antigravity sessions remain Shadow and are still archived and searched.

  • Supports Helm launch, send, and turn-scoped Console execution.
  • Send availability is gated per session on observed hook readiness.
  • Does not advertise interrupt, terminate, reattach, active-turn steer, pause-answer, or resume.

Cursor

longhouse cursor launches a managed native PTY session. Bare Cursor Agent sessions remain Shadow and can still be archived and searched.

  • Supports Helm and Console launch, send, interrupt, terminate, and reattach.
  • Does not advertise active-turn steer or pause-answer.

Control and recovery boundaries

Longhouse treats archive state, control ownership, process liveness, and session phase as separate dimensions. A session can remain searchable after a provider exits. A managed session can be degraded when its control transport is unhealthy. Neither state changes execution ownership or authorizes Longhouse to kill the provider process.

Process identity

Interrupt, terminate, and recovery paths verify recorded PID identity and process start time. A reused PID is not treated as the original provider process.

Durable turn claims

Console adapters claim a turn before spawning a provider. A retry returns the existing claim instead of executing the prompt twice.

Explicit degradation

Lost bridge state, a missing TUI, or a failed health probe reduces current capability. It does not silently switch to a different provider mode.

Provider proof

Capability flags are not inferred from source availability. Longhouse requires a provider-native mechanism and targeted operation evidence before advertising an action.

Capability matrix

ProviderManaged inputInterruptSteerReattach / continueConsole
Claude CodeYesYesYesYesNo separate adapter
Codex CLIYesYesYesYesOne-shot
OpenCodeYesYesNoReattach onlyTurn-scoped
AntigravitySafe hook boundary onlyNoNoNoNo
Cursor AgentYes, when idleYesNoHelm reattachTurn-scoped

Archive visibility, runtime state, process liveness, managed ownership, and control availability are separate facts. A provider name alone does not determine whether a session can be controlled.

Design constraints

  • Provider CLIs remain user-owned.
  • Native archive formats remain the durable source of evidence.
  • Managed control uses an explicit provider-native channel, bridge, API, hook, or terminal contract.
  • A missing control path degrades capability; it does not terminate provider execution.
  • Unsupported operations remain unavailable instead of being approximated with terminal automation or inferred state.