Codemux

Agent Chat (Beta)

A native chat pane for Claude, Codex, and OpenCode — streaming, attachments, mode pills, and a unified model picker.

Agent Chat (Beta)

Agent Chat is an in-app conversational surface for AI coding agents. Instead of running claude in a terminal and watching ANSI scroll by, you get a real chat pane: streaming messages, tool approvals you can click, image attachments, slash commands, and one model picker that spans Claude, Codex, and OpenCode.

It is opt-in Beta. The legacy terminal-only experience is preserved when the toggle is off.

Enabling Beta Features

Open Settings (Ctrl+,) → Beta Features → flip "Enable Agent Chat".

Toggling Beta Features quits and restarts Codemux to keep your data intact across the legacy/Beta UI swap. The two underlying feature flags (enable_agent_chat and enable_lazy_workspace_creation) flip together — there is one user-facing switch.

When Beta is off:

  • The sidebar + button creates a traditional workspace with a terminal pane.
  • The empty-state splash shows "Open Terminal / New Project."
  • Chat panes are hidden; the provider registry is not initialised.

When Beta is on:

  • The sidebar + button opens a chat draft surface (no workspace is created until you send your first message — see Lazy Workspace Creation).
  • The empty-state Home shows a centered chat composer.
  • The + tab dropdown gains an Agent Chat option.

Providers

Three providers ship behind one picker:

ProviderBacked byWhat it adds
ClaudeClaude Agent SDK via a Bun-compiled sidecarFull Claude Code feature set — plan mode, AskUserQuestion, tool approvals, permission modes
Codexcodex app-server JSON-RPC binaryOpenAI's Codex CLI with sandbox-policy permission modes and per-turn effort control
OpenCodeRust-direct HTTP against a managed opencode serve childFederates 100+ upstream providers (OpenAI / Anthropic / OpenRouter / Google / …) behind one rail entry

Each provider authenticates through its own CLI (claude auth status, codex auth status, opencode auth login). Codemux never reads or writes upstream API keys.

The Composer

The chat composer lives at the bottom of the pane:

  • Textarea — your prompt. Multi-line with auto-resize.
  • + popup — file, folder, GitHub issue, GitHub PR, and image attachments. Drag-drop and clipboard paste both work; the + icon is the explicit picker. See Attachments.
  • @ mentions — start typing @ to attach a file or folder by fuzzy-search instead of clicking through the picker.
  • Slash commands — start with / to open the slash command popup. Cross-provider parsing means /clear, /plan, etc. behave consistently across drivers.
  • Mode pill — Ask / Allow always / Plan / Debug. Click to cycle, or press Shift+Tab. Switching modes mid-session restarts the underlying provider with the new permission mode.
  • Model picker — opens the unified provider rail + model list (see below).
  • Send button — paired with Cmd/Ctrl+Enter. Optimistically guarded to prevent double-send.

The Model Picker

One popover, two columns:

  • Provider rail (left, 48px) — icon-only buttons, one per driver. Active provider has a 2px indicator bar.
  • Searchable model list (right) — cmdk-driven flat list. Typing in the search input collapses provider grouping and returns cross-provider results.

Features:

  • Favorites — click the star on any model row to pin it. Favorites bubble to the top of the visible list (rail view AND search results) and persist across sessions.
  • OpenCode federation — a single rail entry whose model list shows entries like OpenCode · OpenAI / OpenCode · Anthropic for each upstream provider you've authenticated. Disconnected upstreams are filtered out so the list stays usable.
  • FREE badge on free-tier OpenCode Zen models, with a sort boost.
  • Empty states — separate copy for "OpenCode not installed", "OpenCode installed but no connected upstreams", and "no match for your query."

Mid-conversation provider/model swaps are supported: pick a new model, the session restarts with the new selection, the transcript is preserved.

Streaming, Tool Approvals, and Mode Pills

A live conversation in Agent Chat surfaces several block types beyond plain text:

  • Tool call cards — every tool the agent invokes shows up as a card with the tool name, status, and a body rendered per-tool (file paths for read/write/edit, search terms for grep, command for bash, etc.).
  • Permission request blocks — when the agent wants to run a tool that needs approval, a block appears with Allow / Deny / Allow always buttons. "Allow always" persists a rule (see Settings → Permissions).
  • Plan proposals — Claude's ExitPlanMode tool surfaces as a plan card with Accept / Reject buttons.
  • AskUserQuestion panel — Claude's structured-question tool gets its own answer form so you don't free-text answers into the composer.
  • Thinking indicator — animated pill while the agent is reasoning.
  • Debug-mode banner — when you flip to Debug mode, a banner appears with a session-cleanup exit dialog so you don't leave debug artifacts behind.

Sessions and History

Each chat pane is bound to one session. The pane header has a session selector that lists your recent sessions for the active provider. Transcripts persist locally and replay on session resume.

  • New session — opens a fresh transcript.
  • Resume — picks up where you left off (Claude uses --resume with the captured session ID; Codex uses thread/resume with thread/start fallback).
  • Stop — interrupts the current turn. Click again to restart the session so the next turn works.

Lazy Workspace Creation

When Enable Agent Chat is on, the sidebar + and the empty-state Home both open a chat draft instead of eagerly creating a workspace. The draft is a real composer — pick a provider, pick a model, attach files, type your prompt — but no git worktree exists yet.

The draft is promoted to a real workspace on first message send. The promotion creates the worktree, materialises the pane, and pipes your prompt straight into the new session.

Why: starting a workspace per "I want to ask Claude something" gets old fast. Lazy creation lets the chat pane double as a scratch space, and only commits when you actually want to do work.

Skills

Agent Chat exposes a cross-provider skills system. Skills are markdown files under ~/.claude/skills/, ~/.codex/skills/, ~/.opencode/skills/, or ~/.codemux/skills/ that get auto-injected as context when their compatibility filters match. Codemux watches these directories, handles conflicts, and surfaces enable/disable per skill in Settings → Skills.

Skills also sync end-to-end encrypted across every device you sign into Codemux on. See Skills Sync.

MCP Servers

User-installed MCP servers are hosted by Codemux itself when Agent Chat is on. Codemux discovers configs across Codemux / Claude / Cursor paths, spawns each server once (deduped if the same config appears in multiple places), and exposes the resulting tools to the agent via an in-process facade.

See MCP Servers for the full picture.

Keyboard Shortcuts (in the chat pane)

ShortcutAction
Ctrl/Cmd+EnterSend the current message
Shift+EnterNewline in the composer
Shift+TabCycle the mode pill (Ask → Allow always → Plan → Debug)
@Open the mention popup for files/folders
/Open the slash command popup
EscDismiss any open composer popup

Known Limitations

  • Beta-gated. Off by default. Opt in via Settings → Beta Features.
  • One instance per provider. A user with multiple Codex accounts or multiple OpenCode connections sees them collapsed under one rail entry. Multi-instance lifting is planned.
  • No keyboard shortcuts on the picker for jumping to a specific provider. Ctrl+1..9 collides with workspace switching; a non-colliding namespace is being figured out.
  • OpenCode credential management lives in OpenCode itself. Run opencode auth login to add upstream providers; Codemux only reads connection state.
  • No favorites sync across devices. Favorites live in localStorage only — they don't roam with your account.
  • Skills Sync — end-to-end encrypted cross-device skill sync
  • MCP Servers — host user-installed MCP servers in chat sessions
  • Attachments — files, folders, issues, PRs, images in the composer
  • Settings — Beta Features, Permissions, Skills, MCP, Sync sections
  • OpenFlow — the older multi-agent orchestration surface (separate from Agent Chat)