Skip to content

ai-chat-acp is decided as a core subtype but does not exist #4292

Done

Description

@mstomar125

Found while checking the decision record "Native ACP chats are a core subtype" against the code (2026-11-17). Decide: build it, or withdraw the record as a plan.

  • Decided: ai-chat-acp is a core subtype of the AI chat base, with fields session_status and session_id, and messages whose parent may be ai-chat-native or ai-chat-acp; the chat viewer gains a third subtype viewer.
  • The code: only ai-chat-native, ai-chat-pty and ai-chat-message exist (packages/core/src/models/core_schemas.rs:1114, 1207, and the parent rule at 2430-2431). No ai-chat-acp appears anywhere under packages/. The record itself ends with "Not decided here: whether this subtype is built, and when", so it is a proposal rather than a statement of what exists.

Needed

Either build the subtype, its message parent rule and viewer, or take the record out of the accepted decisions until the subtype is made.

Done when

ai-chat-acp exists as described, or the record no longer states it as decided.

Activity

  1. self-assigned this
    on Nov 18, 2026
  2. mstomar125 commented on Nov 18, 2026

    @mstomar125
    ContributorAuthor

    Ruling by mstomar125 (2026-11-18): accept the decision "Native ACP chats are a core subtype" and build it. The decision node in the NodeSpace workspace is now accepted.

    Scoping notes before code (nothing is built yet): the decision fixes the type (ai-chat-acp, a core subtype of the AI chat base with session_status and session_id; messages may have an ai-chat-native or ai-chat-acp parent; a third subtype viewer) but ends with "Not decided here: whether this subtype is built, and when" and says nothing about how an ACP session is launched, resumed or ended, which harness speaks it, or how it relates to the existing ai-chat-pty sessions. The session lifecycle lives in packages/agent (the agent owner's lane); the type, schema, wire shape, message parent rule, sheet and viewer are core. Plan: a spec for the session design first (user approves), then the core side, then the agent-lane part with the owner's sign-off.

  3. mstomar125 commented on Nov 18, 2026

    @mstomar125
    ContributorAuthor

    Spec approved by mstomar125 (2026-11-18) with its recommended defaults: the inert core side now (core #4300, docs #162; the one-line packages/agent arm waits for the agent owner's agreement); one harness first; one message per ACP part; part fields on the shared message; pending permission kept in memory; turn start by RPC; other stop reasons as system messages; the AI-chat labs flag gates ACP chats too. The session side stays gated on the agent-lane spike.

  4. mstomar125 commented on Nov 18, 2026

    @mstomar125
    ContributorAuthor

    Merged: the inert core side of ai-chat-acp (core #4300, with the node-types sheet in docs #162): the registry entry (core subtype of the AI chat base), the seeded schema (session_status, local-only session_id), the wire shape, the widened message parent rule, generated types and the frontend entries, plus the one match arm in the agent crate under the owner's agreement.

    Remains, per the approved spec: the session lifecycle (launch, resume, end), the message mapping from ACP updates, the permission path and the viewer. These are agent-lane tasks gated on the harness spike (does a harness plugin load under an ACP adapter, and what does ACP give that PTY sessions plus plugins do not). Core-side follow-ups that depend on the spike: message part fields and the viewer. This issue stays open for them.

  5. mstomar125 commented on Nov 19, 2026

    @mstomar125
    ContributorAuthor

    Spike done (findings: staged GO for Claude Code first, behind one gate).

    Settled: the ACP adapters spawn the real harness engines; a NodeSpace skill is discovered under the Claude adapter (verified in an isolated scratch setup); the protocol has session/resume (no history replay); an official Rust SDK exists. Corrections to the approved spec: Antigravity, OpenCode and Gemini CLI speak ACP natively; the Claude adapter package is @agentclientprotocol/claude-agent-acp; "allow always" makes the Claude adapter write durable rules into Claude Code's local settings.

    Not proven: whether the NodeSpace harness plugin's hooks run under an adapter (needs one logged-in turn). That turn is the gate for the session side.

    Decisions: the user runs the stage-0 turn; if the plugin does not load, the daemon supplies the context itself at session start; the permission card hides allow-always and reject-always; Claude Code is the first harness.

    Next: core-only message fields and viewer can start after stage 0. The session side (launch descriptors, ACP engine, resume, daemon RPCs) is agent-lane work and needs the agent owner. Plan and sizes are in the spike document (about 20-28 engineer-days for a working Claude Code chat).

  6. mstomar125 commented on Nov 19, 2026

    @mstomar125
    ContributorAuthor

    Stage-0 gate run (one logged-in Claude Code turn through the Claude ACP adapter 0.73.0, isolated scratch config, OAuth token): the turn completed normally (message chunks, usage updates, end_turn). The NodeSpace Claude Code plugin was present in the scratch config but did not fire: a stub nodespace recorded no calls and the reply carried no NodeSpace context. So the daemon-supplied route (system-prompt append plus nodespace mcp in the session's server list at session start), which was accepted as the fallback, is the primary route for ACP chats. Not run: a control with the plain claude CLI in the same scratch setup (would tell whether the adapter blocks the plugin or the plugin does not fire on a trivial first turn).

    Stage 0 is closed. Core-only work (message part fields, viewer with permission card, tool and plan rows, session bar) can start against fixtures; the session-side stages are agent-lane work and need the agent owner.

  7. mstomar125 commented on Nov 19, 2026

    @mstomar125
    ContributorAuthor

    Merged #4304 (with docs #164): five optional fields on the shared AI chat message (part kind, tool call id, title, kind and status), core-only; the viewer is the next part (in progress).

  8. mstomar125 commented on Nov 19, 2026

    @mstomar125
    ContributorAuthor

    Merged #4308: the viewer for ACP chats. One row per part (reply text, a collapsed thinking row, tool calls with kind, title and status in words, plans as markdown, system notices), a permission card that offers only once-only choices plus Cancel (allow-always and reject-always are never shown, and an agent-supplied option name is never displayed), a session bar with the state as text, and the AI chat Labs flag gating the viewer. The card takes focus when it appears and returns focus to the input after an answer.

    The viewer takes its live session from an injected source; nothing supplies one yet, so the app shows the stored messages read-only until the session side exists.

    Core-only work for this issue is done (#4300, #4304, #4308). What remains is agent-lane: launch descriptors and adapter provisioning, the ACP engine, the daemon RPCs, the update-to-message writer and resume, and supplying the live session source. Also open: the retype path from a native chat to an ACP chat. Plan, sizes and findings are in the spike document.

  9. mstomar125 commented on Nov 20, 2026

    @mstomar125
    ContributorAuthor

    Merged stage 1 of the session side (core #4319): the isolated launch of the coding agent as an untrusted process, the protocol handshake with no filesystem or terminal capabilities advertised, session start, a streamed turn into an in-memory event stream, permission requests surfaced as typed events (never auto-answered; only allow-once and reject-once are offered), cancellation, and bounds on every size, count and time. Every decoded string that reaches an event is redacted, then cut. Nothing calls it yet, nothing is written to the graph, and there is no RPC or UI.

    The review set binding requirements for the later stages: the writer must redact accumulated text before storing it (a credential split across two streamed chunks is invisible to the per-line pass); launch descriptors come from a pinned absolute program and fixed arguments only, never from node fields; the adapter's home and config directory are isolated and its token is supplied only through the secret store; never offer allow-always, never call set_mode, never act on a mode update; tolerate late updates after a turn ends; keep draining the event stream; end every session by closing or dropping the handle.

    Next: stage 2, the writer that turns the update stream into message parts, after the remote-tool confirmation card lands (that work is on the release path).

  10. mstomar125 commented on Nov 25, 2026

    @mstomar125
    ContributorAuthor

    Decision (owner, 2026-11-25): build it: the ai-chat-acp subtype, the message parent rule and the viewer. Added requirement folded in from #4330: when ACP stage 2 wires AcpLaunch.secrets, it must go through the same on-screen confirmation and content pin as remote tools (#4325), so credentials never reach an unapproved program.

  11. mstomar125 commented on Nov 25, 2026

    @mstomar125
    ContributorAuthor

    Closed as already built (checked against origin/main 9bb25de). The core side was merged earlier: #4300 (with docs #162) added the ai-chat-acp subtype with session_status and session_id, the message parent rule (ai-chat-native or ai-chat-acp) and the node-types sheet entry; #4304 the message part fields; #4308 the viewer (ai-chat-acp-node-viewer, acp-session-bar); #4319 stage 1 of the ACP engine. Tests: ai_chat_subtypes_test, ai_chat_message_test, mentioning_containers_test. Sync already treats any ai-chat-* as chat family (src/chat_policy.rs tests ai-chat-acp). The folded-in requirement from #4330 (stage 2 must route AcpLaunch.secrets through the on-screen confirmation and content pin) goes into the launch.rs comment in a separate comment-only PR.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions