Emacs Agent Shell

A native Emacs buffer that drives Claude, Codex, Gemini and other coding agents over the Agent Client Protocol.

Stars
★ 1.9k
Last updated
1mo ago
FARS reviewed
Sep 16, 2026
License
GPL-3.0
Primary language
Emacs Lisp

At a glance

Works with
Universal · cross-platformCodex · Claude Code · Claude.ai · OpenAI API · Claude API
You'll need
Emacs with MELPA package accessNode.js/npm for adapter packages such as @agentclientprotocol/claude-agent-acpThe underlying agent CLI or ACP adapter (e.g. claude-agent-acp, codex-acp, goose, grok) on PATHShell / CLINetwork accessLocal filesystemMCP Server
Typical use
Developers who already live in Emacs and do not want to leave it for every AI coding tool.
Main limitation
Configuration is Emacs Lisp: authentication, agent list, command prefixes and path resolution are all elisp, and an Emacs setup is a prerequisite.
Maintenance
Commits in the last 6 monthslast commit 2026-10-09+2.4 ★/day over 7 days

What does this agent do, and when should you use it?

agent-shell is a GPL-3.0 Emacs package by Álvaro Ramírez, distributed on MELPA, that gives ACP-speaking LLM agents a native Emacs buffer. Protocol transport comes from acp.el, the buffer is built on comint via shell-maker, and each agent is launched as a subprocess (claude-agent-acp, codex-acp, goose, grok agent stdio, agent acp, qoder --acp, junie --acp true, and more). The repository ships predefined configurations for roughly nineteen agents — Claude Agent, Codex, Gemini CLI, Goose, Grok Build, Cursor, Kimi Code CLI, CodeBuddy, Kiro, Qoder, Qwen Code, Auggie, Mistral Vibe, Factory Droid, Pi, Oh My Pi, OpenCode, Antigravity and Junie — and agent-shell-preferred-agent-config picks a default. Beyond chat, it handles permission prompts, diff buffers for pending edits, model/session-mode/thought-level switching, a separate viewport buffer for composing, prompt queueing and steering of a running turn, one-place MCP server configuration, and per-project data under .agent-shell/. Everything runs locally inside the user's Emacs; model access and credentials come from the agent CLIs or API keys you install and pay for yourself.

agent-shell opens a comint buffer and, through acp.el, spawns an agent process over stdio and speaks ACP (Agent Client Protocol) with it; the launched command is configurable per agent (claude-agent-acp, codex-acp, goose, grok agent stdio, agent acp, junie --acp true). Streaming replies land in the buffer, while tool calls, permission requests and file edits render as interactive elements navigated with TAB/Shift-TAB; pending changes open in an *agent-shell-diff* buffer for y/n/p/q approval. Session options advertised by the agent are switchable in place — C-c C-v for model, C-c C-m for session mode, C-c C-t for thought level (reasoning effort), C-<tab> to cycle modes — with current values shown in the header. Prompts can be written in a separate viewport buffer, queued while the agent is busy, or steered into the running turn through the _session/steering ACP extension on agents that advertise it (the README says the Claude and Codex packages implement it). agent-shell-mcp-servers registers MCP servers once for every agent, agent-shell-command-prefix can wrap commands in devcontainer/docker exec, transcripts and screenshots are written per project into a .agent-shell/ directory added to .gitignore on first creation, and agent-shell-subscribe-to exposes shell events for hooks.

  1. Developers who already live in Emacs and do not want to leave it for every AI coding tool.
  2. Engineers subscribing to both Claude and Codex who want to compare agent output under one keymap.
  3. Teams that must keep agent execution inside a devcontainer or Docker container via agent-shell-command-prefix.
  4. Users who want to define MCP servers once and reuse them across every agent they run.
  5. People running long turns who need to keep typing, queue follow-ups, or redirect the agent mid-turn.
  6. Maintainers who want agent transcripts and screenshots archived per project without dirtying git status.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • npm install -g @agentclientprotocol/claude-agent-acp
  • npm install -g @agentclientprotocol/codex-acp
Install notes cover
macOS

How do you install or deploy this agent?

Install the Emacs package first. agent-shell and its dependencies acp.el and shell-maker are on MELPA:

(use-package agent-shell
    :ensure t
    :ensure-system-package
    ;; Add agent installation configs here
    ((claude . "brew install claude-code")
     (claude-agent-acp . "npm install -g @agentclientprotocol/claude-agent-acp")))

Then install at least one agent adapter, for example Claude and Codex:

npm install -g @agentclientprotocol/claude-agent-acp
npm install -g @agentclientprotocol/codex-acp

Confirm the binary is on PATH with which claude-agent-acp. Doom Emacs users declare the packages and run doom sync:

(package! shell-maker)
(package! acp)
(package! agent-shell)

Authentication still has to be configured, e.g. an Anthropic API key:

(setq agent-shell-anthropic-authentication
      (agent-shell-anthropic-make-authentication
       :api-key (lambda () (auth-source-pass-get 'secret "anthropic-api-key"))))

Clipboard image pasting and screenshots need external tools per platform (pngpaste on macOS, wl-paste on Wayland, xclip on X11, import from ImageMagick for captures).

How do you use this agent?

The entry point is M-x agent-shell, which lists known agents and reuses an existing shell; C-u M-x agent-shell forces a new session. You can also start a specific agent directly, e.g. M-x agent-shell-anthropic-start-claude-code, M-x agent-shell-openai-start-codex, M-x agent-shell-google-start-gemini, M-x agent-shell-goose-start-agent, M-x agent-shell-cursor-start-agent.

(setq agent-shell-preferred-agent-config (agent-shell-anthropic-make-claude-code-config))

Key bindings: RET submits, M-J inserts a newline, C-c C-c interrupts the current operation, TAB/Shift-TAB move between interactive elements, C-c C-o opens the viewport (from an earlier interaction it opens at that interaction). Session controls are C-c C-v (model), C-c C-m (session mode), C-c C-t (thought level) and C-<tab> (cycle mode).

Typing while the agent is busy queues by default; M-RET and C-u RET take the steering path. To store per-project data elsewhere:

(setopt agent-shell-dot-subdir-function #'my/agent-shell-dot-subdir)

To run agents inside containers, set a command prefix:

(setq agent-shell-command-prefix '("devcontainer" "exec" "--workspace-folder" "."))

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

External MCP tool bridge

Inherits capabilities of connected MCP servers; audit third-party servers before enabling.

FARS trust-control audit

Not found in source — apply before daily use
  • rollback or recovery path — Back up first, or work on a git branch or snapshot, so its changes can be undone.

What are this agent's strengths and limitations?

Pros
  • One buffer reaches roughly nineteen ACP agents, so switching between Claude, Codex, Gemini, Goose and others is a config change rather than an editor change.
  • It leans on native Emacs machinery: comint/shell-maker buffers, a diff buffer for edit approval, TAB navigation of interactive elements, hooks and agent-shell-subscribe-to events.
  • agent-shell-mcp-servers configures MCP servers once and applies them to every agent, avoiding per-tool duplication.
  • Transcripts and screenshots go into a per-project .agent-shell/ directory that is added to .gitignore on first creation, keeping session artifacts traceable without polluting the repo.
  • The viewport buffer plus prompt queueing and steering keep long turns workable without waiting for the agent to finish.
  • agent-shell-command-prefix and agent-shell-devcontainer-resolve-path let you run agents inside devcontainers or Docker.
Limitations
  • Configuration is Emacs Lisp: authentication, agent list, command prefixes and path resolution are all elisp, and an Emacs setup is a prerequisite.
  • Every agent needs its own CLI or adapter installed and authenticated (global npm installs, grok login, qoder login, …), so the package alone is not enough.
  • The software is free but every capability depends on your own paid LLM subscription or API key, so cost scales with token usage.
  • Container support is labelled experimental in the README, and the author warns the path resolver may be circumventable by a malicious agent.
  • Steering is an ACP extension rather than part of the spec, implemented only by the Claude and Codex packages per the README; other agents just queue.
  • The experience is entirely bound to Emacs — no standalone GUI or web UI — which makes sessions hard to share with colleagues who do not use Emacs.

How does this agent compare with similar options?

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
Emacs Agent Shell This agent 51 · Major gaps — ★ 1.9k 1mo ago Emacs Lisp Codex · Claude Code · Claude.ai · OpenAI API · Claude API
showagent 72 · Some gaps CLIFree ★ 74 today Go Codex · Claude Code
Agent Manager 75 · Good CLIFree ★ 714 today Go Codex · Claude Code
Agent Deck 74 · Some gaps CLIFree + model costs ★ 1.3k today Go Codex · Claude Code

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
51/ 100 5-point scale 2.6 / 5
Trust 10/29
Reliability 8/14
Adaptability 12/18
Convention 11/18
Effectiveness 7/13
Verifiability 3/8
Why each dimension lost points
Trust10 / 29 · 1.7/5

The README shows agent-shell launches external agent processes via ACP and explicitly offers :inherit-env and :load-env options in agent-shell-make-environment-variables, defaulting to a minimal environment, which shows some least-privilege awareness (least_privilege=1); however, it also documents optional flags like --always-approve and does not state default permission boundaries, so only 1. For user confirmation, the README mentions third-party extensions such as agent-shell-permission-transient for responding to permission requests, indicating a permission-request mechanism exists, but the repository itself does not show confirmation flow details (user_confirmation=1). Data flow transparency: docs say credentials may come from auth-source-pass or .env files, but do not systematically describe which third-party services data flows to (data_flow_transparency=1). Sensitive data handling: examples show API keys as string literals, though functional retrieval is also offered; no emphasis on avoiding plaintext (sensitive_data_handling=1). Dependency security: depends on acp.el, shell-maker, and many external CLIs installed via npm/curl pipes, with no version pinning or verification described (dependency_security=1). External effects: launches external processes and may modify the filesystem, but no sandbox or scope description (external_effects=1). Rollback: no rollback or undo mechanism described (rollback=0). Source attribution: README clearly credits author Álvaro Ramírez, dependencies acp.el and shell-maker, and thanks Lobe Icons, so attribution is clear (source_attribution=2).

Reliability8 / 14 · 2.9/5

Self-consistency: README install instructions align with test.yml cloning acp.el and shell-maker, and dependency relationships are described consistently (self_consistency=2). Dependency availability: dependencies are published on MELPA or public repos with clear install paths (dependency_availability=2). Failure messages: docs do not describe error handling or failure messaging, only mentioning ollama pull timeouts requiring proxy config, lacking systematic failure-message coverage (failure_messages=1).

Adaptability12 / 18 · 3.3/5

Audience and scenarios: README targets Emacs users and lists many supported ACP agents plus related extension projects, covering scenarios well (audience_and_scenarios=3). Capability boundaries: it states reliance on external agent CLIs and the ACP protocol, but does not clearly define what agent-shell itself does not do (capability_boundaries=2). Trigger precision: no description of command trigger conditions or precise invocation rules (trigger_precision=1). Environment fit: provides a macOS/Linux/Windows clipboard and screenshot tool table, giving fairly concrete environment fit (environment_fit=2).

Convention11 / 18 · 3.1/5

Information architecture: README is clearly structured with Setup, Configuration, News, Related projects sections (information_architecture=2). Install notes: gives concrete install commands for over a dozen agents plus Doom Emacs config (install_notes=3). Naming stability: variable naming like agent-shell-*-authentication is fairly consistent, but no naming stability policy is declared (naming_stability=2). Examples and FAQ: many configuration examples and video links, but no formal FAQ (examples_and_faq=2). Known limitations: only scattered mentions of Cursor CLI version requirements and ollama proxy issues, no systematic limitations section (known_limitations=1). License: repository contains the full GPL-3.0 text (license=3). Versioning and changelog: README lists blog update links but there is no CHANGELOG file or version number statement (versioning_changelog=1). Maintenance responsibility: only a sponsorship link hints at the maintainer, with no explicit maintenance commitment or governance (maintenance_responsibility=1).

Effectiveness7 / 13 · 2.7/5

Output usability: as a native Emacs shell interaction interface, output appears in an Emacs buffer, reasonably usable, but output format details are not shown (output_usability=2). Marginal value: provides a unified ACP interaction entry point for Emacs users, offering integration value over using each CLI directly (marginal_value=2). Cost-benefit: requires installing multiple external CLIs and dependencies, and the project itself solicits sponsorship, with insufficient cost explanation (cost_benefit=1).

Verifiability3 / 8 · 1.9/5

Claim traceability: functional claims in the README mostly link to blog posts and videos, but there is no corresponding verification material in the repository (claim_traceability=1). Cross-source corroboration: only README and CI config are present, lacking independent documentation or test-result corroboration (cross_source_corroboration=1). Fact-inference separation: the docs do not clearly distinguish verified facts from planned features (fact_inference_separation=1).

Risks and how to mitigate them
  • Not found in source: rollback or recovery pathBack up first, or work on a git branch or snapshot, so its changes can be undone.
  • README examples show API keys as string literals; prefer functional retrieval such as auth-source-pass to avoid plaintext credentials in config files.
  • Docs mention optional flags like --always-approve that may bypass permission confirmation; verify their scope before enabling.
  • Dependencies are installed via npm/curl pipes with no version pinning; supply-chain risk must be assessed independently.
  • No rollback or undo mechanism is described; filesystem changes by external agents may be hard to recover.
  • Publisher identity is not verified by the FollowAgents enterprise registry; maintenance responsibility and update path are unclear.
Evidence confidence: Low Reviewed Sep 16, 2026 Reviewed revision 5f07c37e5538
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/agent-shell.svg)](https://followagents.com/en/agents/agent-shell)
<a href="https://followagents.com/en/agents/agent-shell"><img src="https://followagents.com/badge/agent-shell.svg" alt="FARS review"></a>
Was this page helpful?
View on GitHub ↗ Install ↓

Host ecosystems

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts