← 插件

智能体进程

显示每个 Paseo 智能体启动的所有进程,并停止在智能体结束后仍在运行的进程

$ paseo plugin add nguyenvanduocit/agent-processes
报告问题
智能体进程 截图 1智能体进程 截图 2智能体进程 截图 3智能体进程 截图 4智能体进程 截图 5

该插件的概览尚未翻译为你的语言,因此以英文显示。

Shows every process your Paseo agents started, as one tree per agent, and stops the ones that outlive their agent.

Paseo sets PASEO_AGENT_ID on each provider process it launches (Claude Code, Codex and the rest), and every program that process starts inherits it: language servers, MCP servers, builds, tests, dev servers. The plugin reads the process table on the daemon machine every 2 seconds, whether or not a screen is open, and groups processes by that variable. macOS hides the environment of system programs such as sh, zsh and sleep, so such a process takes the agent of its nearest ancestor that shows one. Once a read has seen a process with its agent, the process keeps that agent after its parent exits, and so does everything in the process group of an agent's tool-call shell, which is how a program a shell backgrounded stays its agent's after the shell is gone. A process is known by its pid and start time together, so a newer process given a reused pid never inherits an agent and is never signalled in place of the one you picked. Zombie processes are left out.

The Agent processes screen, in the sidebar footer and the Command Center, lists each agent with its title, whether it is open or closed, and its processes with CPU, memory and running time, refreshed every 3 seconds. Closed agents that still hold processes come first. A process whose parent exited is marked. Each workspace's header has a Processes button that opens the same view in the Explorer, limited to that workspace's agents; in a narrow panel each process shows its figures on a second line.

A long command keeps its start and its end with the middle shortened; hover it to read it in full. Right-click a process, press Shift+F10 or the menu key on it, or long-press it on a phone, for its actions. Optimize with an agent starts a new agent in the workspace of the agent that started the process, on the same provider, model and thinking effort, and opens its tab. Its first message lists the process and everything below it with CPU, memory, running time and full command, and asks it to find why they use what they use and fix the cause, measuring before and after; it asks you before it stops another agent's process or changes a setting outside the workspace. Stop sends SIGTERM to the process and everything below it, and SIGKILL 10 seconds later to whatever still runs. Only processes the plugin traces to an agent can be optimized or stopped.

When an agent is closed or archived, a workspace is archived, or a turn ends, the plugin waits 15 seconds for Paseo's own cleanup and then stops every provider process whose agent is closed, archived or gone. It also sweeps every 60 seconds, because Paseo 0.15.0 can start Claude Code for an archived agent with no event at all: listing an archived agent's commands does it. It stops only a provider process: the first process of an agent that sits in the daemon's process group, which a provider keeps even when a daemon that has since restarted launched it. A dev server an agent started runs in its tool call's own group, so it keeps running until you stop it on the screen. A process whose agent state cannot be read is left running.

One gap remains: a shell that backgrounds a system program and exits less than 2 seconds later, before any read sees it, leaves that program with no trace of its agent, so it is not listed.

Runs on macOS and Linux, on Paseo 0.15.0 or later. It uses ps and process signals on the daemon machine and sends nothing over the network. Its log lists each process it stopped.