Token导航 LogoToken导航

MCP Server · 开发工具

Auto Kill Terminal

自动终止AI代理在Codespaces中遗留的僵尸终端,提升开发效率。

未说明官方级别未说明来源级核验工具 0
开发工具ShellClaudeCursorVS Code

快速开始

公开资料没有提供安装命令,按仓库或官方文档接入。
作者 / 组织
nirholas
提供方
nirholas

工具数量

0

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

18

仓库热度

收录来源

1 个

MCP World

选型结论

Auto Kill Terminal 属于开发工具类 MCP Server,公开资料标注 0 个工具,通过传输方式未标注接入,适配 Claude、Cursor、VS Code,没有现成的安装命令;接入前先确认权限范围。

分类

开发工具

传输方式

未说明

认证方式

无需认证

部署方式

公开资料未说明

安装与配置

公开目录没有给出安装命令,需要按仓库 README安装;下面按同类条目的通用流程说明。

公开命令不是通用的启动方式,拼不出可靠配置示例;请在客户端 MCP 配置里按官方文档填写 command 和 args。

上手步骤

  1. 1

    先确认运行方式

    公开资料没有标注传输方式,先看仓库 README,确认是本地进程还是远程地址。

  2. 2

    获取服务

    公开目录没有给出安装命令,按仓库 README里的步骤安装或获取服务。

  3. 3

    写入客户端配置

    在客户端的 MCP 配置里填启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4

    验证是否可用

    连接成功后客户端会列出 0 个工具,随便调一个只读工具确认能返回结果。

接入前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

公开资料仍需确认:安装命令

详细介绍

   █████╗ ██╗   ██╗████████╗ ██████╗       ██╗  ██╗██╗██╗     ██╗     
  ██╔══██╗██║   ██║╚══██╔══╝██╔═══██╗      ██║ ██╔╝██║██║     ██║     
  ███████║██║   ██║   ██║   ██║   ██║█████╗█████╔╝ ██║██║     ██║     
  ██╔══██║██║   ██║   ██║   ██║   ██║╚════╝██╔═██╗ ██║██║     ██║     
  ██║  ██║╚██████╔╝   ██║   ╚██████╔╝      ██║  ██╗██║███████╗███████╗
  ╚═╝  ╚═╝ ╚═════╝    ╚═╝    ╚═════╝       ╚═╝  ╚═╝╚═╝╚══════╝╚══════╝
                    ████████╗███████╗██████╗ ███╗   ███╗██╗███╗   ██╗ █████╗ ██╗     
                    ╚══██╔══╝██╔════╝██╔══██╗████╗ ████║██║████╗  ██║██╔══██╗██║     
                       ██║   █████╗  ██████╔╝██╔████╔██║██║██╔██╗ ██║███████║██║     
                       ██║   ██╔══╝  ██╔══██╗██║╚██╔╝██║██║██║╚██╗██║██╔══██║██║     
                       ██║   ███████╗██║  ██║██║ ╚═╝ ██║██║██║ ╚████║██║  ██║███████╗
                       ╚═╝   ╚══════╝╚═╝  ╚═╝╚═╝     ╚═╝╚═╝╚═╝  ╚═══╝╚═╝  ╚═╝╚══════╝

💀 Stop AI agents from leaving zombie terminals in your Codespace

问题 · 修复 · 快速开始 · 设置 · 原理 · 常见问题解答

______________________________________________________________________

问题

AI编码代理(GitHub Copilot、Claude Code、Gemini、Cursor等)每次运行命令时都会生成终端会话。 他们几乎从不清理自己。

在GitHub Codespace中,这是灾难性的:

症状原因
🧟 幽灵终端前台终端被重用——过时的会话会持续存在,并默默地阻止新的会话
👻 无形的积累代码空间中的背景端子未显示在UI面板中
🔄 无限次重试特工们会重复同样的死会话,而不是杀死它并重新开始
🆔 丢失终端ID没有 isBackground: true,不返回终端ID——无法清理

结果: 您的代码空间充满了孤立的终端→ 命令超时→ 代理人感到困惑→ 你在重试时浪费了令牌。

修复

将终端管理规则添加到代理指令文件中。这些 五个要点 你需要的都是:

## Terminal Management

- **Always use background terminals** (`isBackground: true`) for every command so a terminal ID is returned
- **Always kill the terminal** after the command completes, whether it succeeds or fails — never leave terminals open
- Do not reuse foreground shell sessions — stale sessions block future terminal operations in Codespaces
- In GitHub Codespaces, agent-spawned terminals may be hidden — they still work. Do not assume a terminal is broken if you cannot see it
- If a terminal appears unresponsive, kill it and create a new one rather than retrying in the same terminal
就这样 将这5行复制到您使用的任何代理指令文件中。

快速开始

# Option 1: Clone and copy what you need
git clone https://github.com/nirholas/auto-kill-terminal.git
cp auto-kill-terminal/.github/copilot-instructions.md your-project/.github/

# Option 2: Just copy the 5 bullet points from "The Fix" into your existing instruction file

由代理设置

🤖 GitHub Copilot — copilot-instructions.md

## Terminal Management
- **Always use background terminals** (`isBackground: true`) for every command so a terminal ID is returned
- **Always kill the terminal** after the command completes, whether it succeeds or fails — never leave terminals open
- Do not reuse foreground shell sessions — stale sessions block future terminal operations in Codespaces
- In GitHub Codespaces, agent-spawned terminals may be hidden — they still work. Do not assume a terminal is broken if you cannot see it
- If a terminal appears unresponsive, kill it and create a new one rather than retrying in the same terminal

🧠 Claude Code — CLAUDE.md

### Terminal Management
- **Always use background terminals** (`isBackground: true`) for every command so a terminal ID is returned
- **Always kill the terminal** after the command completes, whether it succeeds or fails — never leave terminals open
- Do not reuse foreground shell sessions — stale sessions block future terminal operations in Codespaces
- In GitHub Codespaces, agent-spawned terminals may be hidden — they still work. Do not assume a terminal is broken if you cannot see it
- If a terminal appears unresponsive, kill it and create a new one rather than retrying in the same terminal

💎 Gemini — GEMINI.md

### Terminal Management
- **Always use background terminals** (`isBackground: true`) for every command so a terminal ID is returned
- **Always kill the terminal** after the command completes, whether it succeeds or fails — never leave terminals open
- Do not reuse foreground shell sessions — stale sessions block future terminal operations in Codespaces
- In GitHub Codespaces, agent-spawned terminals may be hidden — they still work. Do not assume a terminal is broken if you cannot see it
- If a terminal appears unresponsive, kill it and create a new one rather than retrying in the same terminal

🔮 Cursor / AGENTS.md — Multi-agent projects

### Terminal Management
- **Always use background terminals** (`isBackground: true`) for every command so a terminal ID is returned
- **Always kill the terminal** after the command completes, whether it succeeds or fails — never leave terminals open
- Do not reuse foreground shell sessions — stale sessions block future terminal operations in Codespaces
- In GitHub Codespaces, agent-spawned terminals may be hidden — they still work. Do not assume a terminal is broken if you cannot see it
- If a terminal appears unresponsive, kill it and create a new one rather than retrying in the same terminal

⚡ One-liners — For inline prompt space

短:

**Terminal rules:** Always use `isBackground: true` for every terminal command, then kill the terminal after.

两条线:

**Terminal management**: Always use background terminals (`isBackground: true`). Always kill terminals after use.

为什么是后台终端?

方法返回终端ID吗?可以被杀死吗?挡壳?
isBackground: false❌❌✅
isBackground: true✅✅ (kill_terminal)❌

后台终端返回代理可以传递的ID kill_terminal (或 await_terminal → kill_terminal).没有那个身份证,就没有办法清理。

  Agent                                Terminal
    |                                      |
    |-- run_in_terminal -----------------> | (isBackground: true)
    |    | (wait for completion)
    |    | x_x
    |                                      X
    |
    |-- (clean slate for next command)

支持的环境

环境状态
GitHub代码空间✅
VS代码(本地)✅
VS代码(远程SSH)✅
VS代码(WSL)✅
任何VS代码终端API消费者✅

Supported Agents

代理指令文件状态
GitHub副本copilot-instructions.md✅
克劳德代码CLAUDE.md✅
双子座GEMINI.md✅
光标AGENTS.md / .cursorrules✅
风帆冲浪AGENTS.md✅
助手.aider.conf.yml✅
任何使用VS Code终端的代理任何指令文件✅

常见问题解答

Do I need to install anything?

不是的。这只是复制粘贴文本,将其放入您的代理指令文件中。没有包,没有扩展,没有配置。

Does this work outside Codespaces?

对。终端管理规则适用于使用VS Code的终端API的任何地方。它们在代码空间中最为关键,因为鬼终端在那里是不可见的,但它们在任何地方都有帮助。

What if my agent doesn't support instruction files?

您可以直接在提示中包含规则。使用上面“一个衬垫”部分中的一个衬垫。

Will this break my agent's workflow?

否。带背景的终端 isBackground: true 其行为与前台终端相同,只是它们不会阻塞shell,并且会返回一个ID进行清理。代理的命令仍然正常执行。

贡献

欢迎投稿!如果您发现了其他代理或环境的终端管理技巧,请打开PR。

  1. 分叉回购
  2. 创建您的分支: git checkout -b feat/my-improvement
  3. 承诺: git commit -m "✨ feat: add support for X agent"
  4. 推: git push origin feat/my-improvement
  5. 打开拉取请求

许可证

MIT© nirholas

______________________________________________________________________

Stop wasting tokens on zombie terminals.

Made with 💀 for the AI agent community

⭐ Found this useful? Star the repo! ⭐

It helps others discover this project and keeps development active

工具与能力

工具数量

0

资源数量

0

提示词数量

0

能力标签

Shell本地部署终端管理AI工具开发效率Codespaces

支持客户端

ClaudeCursorVS Code

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

让助手直接读代码

把仓库、提交记录和 issue 交给模型检索,补全和重构时不用来回复制文件。

在对话里跑命令

触发构建、测试和脚本,执行结果直接回到上下文,省去切终端。

接进开发流程

把 PR、CI 状态和代码审查接进助手,减少在几个工具之间跳。

选择建议

值得选的地方

  • 只提供 0 个工具,职责集中,接入后不容易误操作。
  • 已经适配 Claude、Cursor、VS Code,换客户端不用重新研究配置。
  • 公开说明写得比较完整,接入前能看清能力边界。

先想清楚的地方

  • 公开资料没有可直接复制的安装命令,第一次接入要自己找入口。
  • 公开摘要偏短,具体能力和限制要回到仓库确认。
  • 第三方目录整理,版本更新和行为细节以官方仓库为准。

更适合

  • 需要在开发工具场景里让模型直接调用外部能力的人。
  • 已经在用 Claude 的用户,接入路径最短。
  • 愿意照着官方文档一步步配环境的人。

不太适合

  • 希望一条命令就装好、不想看文档的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
Auto Kill Terminal

MCP World · 本页

0未说明未标注1 个2026-05-17
Git 838e2ec1

MCP World

12stdio有2 个2026-05-17
Markitdown MCP 2c653a5f

MCP World

1stdio有1 个2026-05-17
Context7 MCP C671e75a

MCP World

0stdio有1 个2026-05-17
Context7 831acf40

MCP World

0stdio有1 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

Auto Kill Terminal 怎么安装?

公开目录没有给出可以直接复制的安装命令,需要按仓库 README里的步骤安装;装好后写进客户端的 MCP 配置再重启。

Auto Kill Terminal 怎么在 Claude Desktop、Cursor 里配置?

它是传输方式未标注,客户端配置里要写启动命令和参数,运行环境是 未标注;保存后完全退出客户端再打开,配置才会生效。

Auto Kill Terminal 收费吗?

本站只整理公开资料,不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Auto Kill Terminal 需要 API Key 吗?

公开资料标注为无需认证,装好就能连;如果实际调用时报鉴权错误,按官方文档补上凭据。

Auto Kill Terminal 支持哪些客户端?

公开资料标注支持 Claude、Cursor、VS Code;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

来源信息

继续浏览同类 MCP