A Built-in Shell for Your AI Coding Agent
AI coding agents live in the terminal. You talk to the agent, it edits files, runs commands, and reports back. But every time you need to run something yourself, you switch to another terminal tab, find the right directory, and context-switch away from your conversation.
muxd now has a built-in interactive shell. Type /sh and you drop into a full shell session without leaving your agent. Run commands, check output, come back to the conversation. No tab switching, no lost context.
Why a Built-in Shell?
Most terminal AI tools assume you have a second terminal open for manual work. That works on a desktop with a tiling window manager, but it breaks down when you are:
- SSH'd into a remote machine with a single connection
- Working from a phone via Telegram
- Running muxd as a daemon and connecting from different terminals
- Deep in a conversation and just need to check one thing
The shell solves all of these. It runs inside muxd's TUI, shares the same working directory as your agent, and remembers your command history for the session.
Smart Command Routing on Windows
If you use Windows, you know the pain: some commands need cmd.exe, some need PowerShell, and others need Git Bash. The muxd shell handles this automatically.
- cmd.exe builtins like
dir,type,copy,del, andstartroute through cmd.exe - PowerShell cmdlets like
Get-ProcessandGet-ChildItemroute through pwsh or powershell - Everything else routes through Git Bash for full Unix command support
You just type the command. The shell figures out which interpreter to use.
Git-Aware Prompt
The shell header shows your current git branch with color coding. Green means clean, yellow means dirty (uncommitted changes). You always know the state of your repo at a glance.
The prompt itself changes color based on your last command's exit status. Green means success, red means something failed. Small details, but they save you from running echo $? after every command.
How It Works
The shell is intentionally simple. It is not trying to replace your terminal. It is a quick escape hatch for when you need to run something without breaking your flow.
/shenters the shellexitreturns to the agent conversationcdchanges directory and the change persists across commands- Up and Down arrows browse your command history
- Esc clears your current input, or exits if the line is empty
/helpshows available muxd shell commands
Your working directory carries over from wherever muxd is running. If you cd to a different folder, it stays there until you leave the shell.
A Typical Workflow
You are in a conversation with the agent and it just made some changes. You want to check that the build still passes before continuing:
/sh
go build ./...
go test ./... -count=1
exit
Four lines, no tab switching. The agent sees none of this. When you type exit, you are back in the conversation exactly where you left off.
Or you need to check something quickly:
/sh
git log --oneline -5
exit
The shell keeps your focus inside muxd. The fewer times you switch contexts, the faster you work.
Try It
Update to the latest muxd and type /sh. The shell is available now on the feature/shell branch and will be merged to main shortly.
Read the full commands documentation for all available slash commands, or get started with the installation guide.