feat(blog): add article on agent-shell session selection in Emacs
- Add new blog post about configuring agent-shell to prompt for session selection - Article includes prerequisites with Emacs and Copilot CLI versions - Covers configuration method using agent-shell-session-strategy setting - Provides practical use case for managing multiple projects efficiently - Originally written in Japanese, reviewed for clarity, and translated to English Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
a8d02ed524
commit
4e8962a8b4
1 changed files with 59 additions and 0 deletions
59
src/blog/2026-03-01-agent-shell-session-selection.md
Normal file
59
src/blog/2026-03-01-agent-shell-session-selection.md
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
---
|
||||||
|
title: 'How to Select Sessions When Starting the agent-shell ACP Client Running on Emacs'
|
||||||
|
pubDate: 2026-03-01
|
||||||
|
author: 'Nakahara Daisuke'
|
||||||
|
tags: ["Emacs"]
|
||||||
|
---
|
||||||
|
|
||||||
|
I recently returned to Emacs, motivated by CLI-type AI tools like [GitHub Copilot CLI](https://github.com/github/copilot-cli).
|
||||||
|
|
||||||
|
Copilot CLI supports ACP (Agentic Communication Protocol), which enables communication between AI agents and editors ([GitHub official documentation](https://docs.github.com/en/copilot/reference/acp-server)).
|
||||||
|
And [agent-shell](https://github.com/xenodium/agent-shell) is an ACP client that runs on Emacs.
|
||||||
|
|
||||||
|
agent-shell can be started with `M-x agent-shell`.
|
||||||
|
By default, starting agent-shell creates a new session. However, with the following configuration change, you can choose to create a new session or select from past sessions when starting. I'll introduce this configuration.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ emacs --version
|
||||||
|
GNU Emacs 30.2
|
||||||
|
Development version 636f166cfc86 on HEAD branch; build date 2025-12-14.
|
||||||
|
Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
|
||||||
|
You may redistribute copies of GNU Emacs
|
||||||
|
under the terms of the GNU General Public License.
|
||||||
|
For more information about these matters, see the file named COPYING.
|
||||||
|
```
|
||||||
|
|
||||||
|
This article assumes the use of Copilot CLI.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ copilot --version
|
||||||
|
GitHub Copilot CLI 0.0.420.
|
||||||
|
Run 'copilot update' to check for updates.
|
||||||
|
```
|
||||||
|
|
||||||
|
After starting Emacs, the result of running `M-x agent-shell-version` is as follows:
|
||||||
|
|
||||||
|
```
|
||||||
|
agent-shell v0.43.1
|
||||||
|
```
|
||||||
|
|
||||||
|
## Method
|
||||||
|
|
||||||
|
Set the value of `agent-shell-session-strategy` to `prompt`.
|
||||||
|
Here is an example configuration in `init.el`:
|
||||||
|
|
||||||
|
```elisp
|
||||||
|
(use-package agent-shell
|
||||||
|
:custom
|
||||||
|
(agent-shell-session-strategy 'prompt)
|
||||||
|
:ensure t)
|
||||||
|
```
|
||||||
|
|
||||||
|
With this configuration, you can create a new session or select from history in the minibuffer. Selecting a new session behaves the same as the default behavior, but selecting a past session allows you to resume work in that session's context. This enables you to efficiently manage multiple different projects and tasks.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> **Note**: The review and translation were assisted by an AI generative model. The author is responsible for the final content.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue