# API-based chat (HTTP `chat_routes.py` + `ChatPanel.tsx` + `slash_dispatch.ts`)

**Captured:** 2026-05-07
**Driver:** Phase 7 — CP-A foundations rejection memory (Law 14)

## Decision
REJECTED

## Why rejected

Console v2's chat surface is the embedded ttyd terminal (`ChatColumn.tsx` + `TerminalIframe.tsx` over `claude --resume`). ADR-0014 locks this; ADRs 0006–0008 lock the underlying ttyd embed, chat-sessions.json model, and MCP-FastAPI IPC bridge.

An HTTP-based chat path was prototyped in embedded-claude-terminal Phase 8: `chat_routes.py` (FastAPI router), `ChatPanel.tsx` (React component), and `slash_dispatch.ts` (frontend dispatch shim). The router was never registered in `main.py`, so the frontend dispatched into a 404 the whole time — wired-then-orphaned. Two chat surfaces in the same codebase produced bus-event divergence (HTTP path emitted on its own bus surface; ttyd emitted through the IPC bridge), and the duplicate kept showing up in audits as friction.

A textarea-plus-SSE wrapper is strictly inferior to a real `claude` CLI session embedded via ttyd: ttyd gives JT history, full tool access, and shared context with everything else `claude` already does. CP-C Phase 17 deletes the dead path. Revisit only if ttyd proves uninstallable on a target machine.

## Cited by
- ADR-0014: Console v2 chat surface is the embedded ttyd terminal only
- ADR-0006, ADR-0007, ADR-0008 (ttyd substrate)
- BUILD_SPEC §3, §7 (Phase 7 — CP-A rejection memory)

## Status
- [x] Substantive rejection (Law 14 — anti-pattern memory)
