omp packages

pi-repeat-tool-guard0.1.0

Pi extension that appends system reminders to repeated tool call results.

kingwl Published 4 months ago MIT ~165 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-repeat-tool-guard

Reduce repeated tool calls in Pi.

pi-repeat-tool-guard is a Pi package for people who see the model repeatedly calling the same tool with the same arguments. It keeps your normal Pi workflow unchanged, but gives the model a clear reminder when it appears to be stuck in that loop.

Use it when you want Pi to:

  • notice repeated read/search/shell-style calls,
  • reconsider the latest tool output before trying again,
  • choose a different approach instead of burning turns on the same call.

Install

Install it globally for your Pi user:

pi install npm:pi-repeat-tool-guard

Install it only for the current project:

pi install npm:pi-repeat-tool-guard -l

If you are installing from the GitHub repository instead of npm:

pi install git:git@github.com:Kingwl/pi-repeat-tool-guard

Use

After installation, start Pi normally:

pi

Pi loads installed packages automatically. You can confirm the package is active from Pi's startup header or by running:

pi list

Configuration

The default behavior works without configuration. By default, the package starts reminding the model after repeated identical calls at counts 3, 5, and 8.

You can adjust the repeat counts:

PI_REPEAT_TOOL_GUARD_THRESHOLDS=3,5,8 pi

Track only selected tools:

PI_REPEAT_TOOL_GUARD_INCLUDE=read,grep,glob pi

Ignore selected tools:

PI_REPEAT_TOOL_GUARD_EXCLUDE=bash,write,edit pi

* can be used as a wildcard in include/exclude values:

PI_REPEAT_TOOL_GUARD_INCLUDE='mcp__*,read,grep' pi

Managing The Package

Update installed Pi packages:

pi update --extensions

Disable, enable, or inspect installed extensions:

pi config

Remove the package:

pi remove npm:pi-repeat-tool-guard

Notes

This package does not reject tool calls and does not ask for extra user confirmation. The tool still runs normally; the model simply receives an extra reminder when it repeats itself.

It is designed as a lightweight Pi extension that you can install, keep enabled, and forget about until a repeated-tool loop shows up.

Reference

This package is inspired by Kimi Code's repeated tool-call protection: