Skip to content

Native chat for third-party agents: pi (pi-coding-agent) adapter / public session-host contract #21558

Closed

Description

@havertonpropertygroup

What

Request native chat (structured session) support for third-party coding agents — concretely pi — or, more generally, a documented adapter contract for the session host that native chat already uses for Claude and Codex.

Why

  • Native chat has become the best surface in Orca for agent work: structured turns, tool rows, diff cards, session history, rewind, slash commands, mobile. Today it is closed to two first-party agent kinds (Claude via the Claude Agent SDK, Codex).
  • The session-host abstraction is already agent-agnostic in shape — Claude and Codex render through the same UI, there is one / picker for every agent, and orchestration can drive "native-born structured chat sessions". A documented adapter contract would let the ecosystem plug agents in instead of forking the TUI path.
  • pi is a strong first candidate because it ships an embedding SDK built for exactly this:
    • @earendil-works/pi-coding-agent → createAgentSession() with subscribable event streams (message_update / assistantMessageEvent.type: "text_delta"), programmatic session.prompt(), file-backed or in-memory session managers.
    • First-class resources: extensions, skills, prompt templates, themes, context files; multi-provider model registry via ModelRuntime.create().
    • Durable JSONL session transcripts that map naturally onto Agent Session History / resume.
    • Fully headless when driven via the SDK — no PTY/TUI required, matching the structured-session delivery path Orca already implements for Claude/Codex.

Ask

  1. Document the session-host / structured-agent contract (launcher, turn events, tool progress, question/ask flow, session persistence) so third-party agents can target it.
  2. Ideally, ship a pi adapter natively. Happy to help test on headless Linux (server runtime) plus Windows and macOS clients.

Environment

  • Orca server: headless Linux, v1.4.203
  • Desktop clients: v1.4.205 (macOS, Windows)

Activity

  1. havertonpropertygroup commented on Sep 19, 2026

    @havertonpropertygroup
    Author

    Following up on our own issue: we'd like to attempt this PR — adding pi to native chat's transcript-backed agents, alongside omp.

    We've mapped the surface: native-chat-agent-support.ts (union + list + resolver), session-file-resolver.ts (pi's sessions root is ~/.pi/agent/sessions/<mangled-workspace>/), transcript-reader.ts/tail reader record mapping, and nativeChatRequiresLocalTranscript. We run pi heavily on headless Linux + desktop clients, so we can derive real-transcript fixtures and test e2e.

    Two questions before we sink the time:

    1. Is there in-flight work on pi native-chat support we'd collide with (omp landed recently — is pi queued behind it)?
    2. Any design constraints we should honor for transcript-backed agents (e.g. how the composer send path is expected to work for them), or pointers to the right reviewer?

    Happy to start with a small "resolver + reader + fixtures" PR if that's easier to review incrementally.

  2. added theissue type on Sep 19, 2026
  3. nwparker commented on Sep 25, 2026

    @nwparker
    Contributor

    oh I see there's a PR I will have @brennanb2025 help out here

  4. OrcaWin commented on Oct 9, 2026

    @OrcaWin
    Collaborator

    Pi now has structured native chat through its RPC mode as of #25851, thanks for pushing on this! If anything is missing or broken with it on a current build, feel free to reopen or file a follow-up.

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions