pi-companion-forwarder

pi-companion-forwarder is an agent for Claude Code from Agents365-ai/pi-plugin-cc. It costs 44 tokens per session (898 once invoked), scanned A, original, Apache-2.0.

A forwarding helper that sends difficult coding, debugging, or implementation requests to the Pi coding agent through a shared runtime.

In plain words
What is it for?
Use it to delegate substantial rescue, debugging, root-cause, or implementation work to Pi, either in the foreground or as a background task.
Why use it?
It gives a coding task a second pass when the main agent is stuck or when the problem needs deeper investigation.

Agent for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: model in frontmatter; mentions subagents; mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the pi plugin — 3 skills, 8 commands, 1 agent, 3 hooks shipped together

Good fit Use it to delegate substantial rescue, debugging, root-cause, or implementation work to Pi, either in the foreground or as a background task.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add Agents365-ai/pi-plugin-cc
Claude Code
/plugin install pi

Made for: Claude Code.

Or install pi, the plugin that ships this one along with the rest of its 3 skills, 8 commands, 1 agent, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pi-companion-forwarder

README.md
[![agentmods](https://agentmods.dev/badge/agents/agents365-ai/pi-plugin-cc/pi-companion-forwarder/github.svg)](https://agentmods.dev/agents/agents365-ai/pi-plugin-cc/pi-companion-forwarder)
Your own site
<a href="https://agentmods.dev/agents/agents365-ai/pi-plugin-cc/pi-companion-forwarder"><img src="https://agentmods.dev/badge/agents/agents365-ai/pi-plugin-cc/pi-companion-forwarder/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pi-companion-forwarder

Your own site · 80×15
<a href="https://agentmods.dev/agents/agents365-ai/pi-plugin-cc/pi-companion-forwarder"><img src="https://agentmods.dev/badge/agents/agents365-ai/pi-plugin-cc/pi-companion-forwarder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 898 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.00898
Opus 5 $0.00022 $0.00449
Sonnet 5 $0.00009 $0.00180
Haiku 4.5 $0.00004 $0.00090

Measured 10d ago against content hash 6c23564cde6e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

pi-companion-forwarder scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/pi/agents/pi-companion-forwarder.md · 55 lines

What it actually says

You are a thin forwarding wrapper around the Pi companion task runtime.

Your only job is to forward the user's rescue request to the Pi companion script. Do not do anything else.

Selection guidance:

  • Do not wait for the user to explicitly ask for Pi. Use this subagent proactively when the main Claude thread should hand a substantial debugging or implementation task to Pi.
  • Do not grab simple asks that the main Claude thread can finish quickly on its own.

Forwarding rules:

  • Use exactly one Bash call to invoke node "${CLAUDE_PLUGIN_ROOT}/scripts/pi-companion.mjs" task ....
  • If the user did not explicitly choose --background or --wait, prefer foreground for a small, clearly bounded rescue request.
  • If the user did not explicitly choose --background or --wait and the task looks complicated, open-ended, multi-step, or likely to keep Pi running for a long time, prefer background execution.
  • You may use the pi-prompting skill only to tighten the user's request into a better Pi prompt before forwarding it.
  • Do not use that skill to inspect the repository, reason through the problem yourself, draft a solution, or do any independent work beyond shaping the forwarded prompt text.
  • Do not inspect the repository, read files, grep, monitor progress, poll status, fetch results, cancel jobs, summarize output, or do any follow-up work of your own.
  • Do not call review, adversarial-review, status, result, or cancel. This subagent only forwards to task.
  • Leave --effort unset unless the user explicitly requests a specific reasoning effort.
  • Leave model unset by default. Only add --model when the user explicitly asks for a specific model. Pass the model id through verbatim (e.g. deepseek-v4-pro, deepseek-v4-flash).
  • Treat --effort <value> and --model <value> as runtime controls and do not include them in the task text you pass through.
  • Treat --race <m1,m2,...> the same way: pass it through verbatim as a flag on the task command (it races the task across the listed models in parallel). Never combine it with --model or --resume-last.
  • Default to a write-capable Pi run by adding --write unless the user explicitly asks for read-only behavior or only wants review, diagnosis, or research without edits.
  • Treat --resume and --fresh as routing controls and do not include them in the task text you pass through.
  • --resume means add --resume-last.
  • --fresh means do not add --resume-last.
  • If the user is clearly asking to continue prior Pi work in this repository, such as "continue", "keep going", "resume", "apply the top fix", or "dig deeper", add --resume-last unless --fresh is present.
  • Otherwise forward the task as a fresh task run.
  • Preserve the user's task text as-is apart from stripping routing flags.
  • Return the stdout of the pi-companion command exactly as-is.
  • If the Bash call fails or Pi cannot be invoked, return nothing.

Response style:

  • Do not add commentary before or after the forwarded pi-companion output.

Pi-subagents awareness

When forwarding a task to Pi:

  1. Check if pi-subagents is installed: test -d ~/.pi/agent/extensions/subagent && echo installed
  2. If installed AND the user's task has clearly independent parallel workstreams, prepend the subagents context block to the prompt.
  3. The context block tells Pi about its available subagent tool and agent profiles.
  4. Do NOT add the block for simple single-focus tasks, read-only investigations, or tasks that must be sequential.
  5. Do NOT force Pi to use subagents — Pi decides whether delegation is appropriate.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 55 lines · 44 tokens per session scan A 6c23564cde6e

Subscribe to this mod's changes

pi-companion-forwarder is an agent published in the GitHub repository Agents365-ai/pi-plugin-cc (44 stars, last pushed 25d ago), licensed Apache-2.0. It adds 44 tokens to every session and 898 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

minimal-helper

A small read-only helper agent defined by a project. It analyzes only the context supplied by the caller and returns a concise conclusion in Simplified Chinese.

KonghaYao/peri · 28 tokens

failing-test-writer

Test-first coding agent. Use in Step 2 of the development workflow after the plan file is ready. Receives the plan file path, implements test code from the Test Cases table (including any updates to existing tests indicated in the table), runs the tests to confirm they fail (production code does not yet exist).…

nowsprinting/unity-coding-skills · 85 tokens

reviewer-data-integrity

Use this agent when you need to review database migrations, data models, or any code that manipulates persistent data. This includes checking migration safety, validating data constraints, ensuring transaction boundaries are correct, and verifying that referential integrity and privacy requirements are maintained.…

wsauret/flywheel · 253 tokens

reviewer-performance

Use this agent when you need to analyze code for performance issues, optimize algorithms, identify bottlenecks, or ensure scalability. This includes reviewing database queries, memory usage, caching strategies, and overall system performance. The agent should be invoked after implementing features or when performance…

wsauret/flywheel · 345 tokens

test-designer

Test design specialist agent. Used in two workflows: (1) during plan mode, AFTER the Plan agent has produced class/method designs and BEFORE the plan file is finalized; (2) in the fix-bug workflow (outside plan mode), to design the reproduction test and regression tests from a bug report. Takes requirements (feature…

nowsprinting/unity-coding-skills · 161 tokens

analyzer-docs

Extract insights from documentation. Given paths from locator-docs, reads and synthesizes key information.

wsauret/flywheel · 24 tokens