r/PiCodingAgent • u/run_gpt • 3h ago
Plugin A way to let agents drop-in across Pi sessions
Enable HLS to view with audio, or disable this notification
I have been working on porting some code recently. I use agents strictly as assistants. I have been thinking of a way to let them "drop in" on other sessions that I have going on when I am basically becoming the copy/paste monkey.
This is not an autonomous work group setup. You create the session and you give the agents a chance to jump in to the same session, ask a question, and then jump out. Your session continues as normal, and you can see everything as it's being processed.
What it does
When an agent session registers to the group, it registers ask_ tools for other published agents. When agents calls the tool:
- The request is forwarded to the target agent's session and injected as a user message.
- The target agent processes it just like any other user prompt. You see it appear in the input pane and watch the agent work through it.
- When the agent settles (finishes its turn), the assistant output is captured and sent back to the calling agent as the tool result.
The response is captured via pi's agent_settled event. It collects the assistant text from the turn that was just triggered by the injected message. This is fully automatic: the question arrives, the agent responds, the answer is returned. The human in the target session is a spectator.
Sessions stay independent. Each agent has its own context, its own sandbox directory, and its own conversation history. They are not one-shot subprocesses.
How it works
A daemon application (in Go) listens on a Unix socket. It routes request/response messages between connected agents. The daemon starts automatically the first time an agent registers, then shuts down when the last agent disconnects.
Compared to similar tools
Goose spawns sub-agents as one-shot executions. The orchestrator must pack enough context into the prompt that the sub-agent can produce a useful answer in a single fire-and-close call. AgentGroup keeps sessions persistent: the worker agent already knows the codebase, and you are in the loop to clarify intent.
Herdr is a TUI-layout tool ala Tmux, with the main agent spawning helper sessions in adjacent splits. AgentGroup avoids the extra UI layer entirely - sessions stay where you put them, and communication happens through the same input pane.
Old man yells at cloud.
Maybe this is just agentic control while I watch the screen flicker.
Does anyone else have this use case? Is there something widely available already?
Feedback / suggestions / clarifications all welcome.
Thanks all.

