Skip to content

Chat with Sessions

aimux chat sends a message to an existing Claude Code session and streams the reply. The conversation continues in the session’s own file, so claude --resume <id> on the same machine picks up where aimux left off.

Terminal window
aimux chat <session-id> "What did we decide about the cache?"

Find session IDs with aimux sessions or the web dashboard’s Sessions view.

aimux starts an ACP adapter for Claude (claude-agent-acp) in the session’s working directory, loads the session, sends the message, and stops the adapter when the turn ends. The first run downloads the adapter through npx, which can take about half a minute; later runs start in about a second.

  • Sessions open in a terminal. If the session is running in a terminal on this machine, aimux does not send to it, because typing into a running session can approve a permission prompt nobody saw. Close it there, then run aimux chat.
  • Unknown sessions. The ID must match a session file under ~/.claude/projects.
  • Sessions another aimux process is continuing. One aimux process at a time drives a session (a lock in ~/.aimux/locks), so aimux chat and aimux remote serve never both write to it.
  • Sessions aimux cannot vouch for. If Claude’s session registry (~/.claude/sessions) is missing, or any of its entries cannot be read or decoded, aimux cannot tell whether a terminal holds the session, so it refuses rather than risk a second writer. A half-written entry clears on its own; try again shortly.

When the agent wants to use a tool that needs approval, aimux asks on the terminal (Allow git push? [y/N]). Anything but y or yes denies. Without a terminal, for example in a script, every request is denied.

Ctrl-C stops the agent’s turn. What it already did stays in the session.

FlagDefaultMeaning
--adapternpx -y @agentclientprotocol/claude-agent-acpACP adapter command
--jsonoffPrint each event (agent text, tool calls, permission requests) as a JSON line. Errors are still plain text on stderr

Codex sessions are not supported yet.