fix(plugin): don't record false success when gt plugin run only prints instructions

The `gt plugin run` command was recording a "success" run even though it
only prints plugin instructions for an agent/user to execute - it doesn't
actually run the plugin.

This poisoned the cooldown gate: CountRunsSince counted these false
successes, preventing actual executions from running because the gate
appeared to have recent successful runs.

Remove the recording from `gt plugin run`. The actual plugin execution
(by whatever follows the printed instructions) should record the result.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
furiosa
2026-01-24 10:13:31 -08:00
committed by John Ogle
parent 551da0b159
commit 9809e0dfc4

View File

@@ -433,19 +433,10 @@ func runPluginRun(cmd *cobra.Command, args []string) error {
fmt.Printf("%s\n", style.Bold.Render("Instructions:"))
fmt.Println(p.Instructions)
// Record the run
recorder := plugin.NewRecorder(townRoot)
beadID, err := recorder.RecordRun(plugin.PluginRunRecord{
PluginName: p.Name,
RigName: p.RigName,
Result: plugin.ResultSuccess, // Manual runs are marked success
Body: "Manual run via gt plugin run",
})
if err != nil {
fmt.Fprintf(os.Stderr, "Warning: failed to record run: %v\n", err)
} else {
fmt.Printf("\n%s Recorded run: %s\n", style.Dim.Render("●"), beadID)
}
// NOTE: We intentionally do NOT record a run here. This command only prints
// instructions for an agent/user to execute - it doesn't actually run the plugin.
// Recording "success" here would poison the cooldown gate, preventing real executions.
// The actual execution (by whatever follows these instructions) should record the result.
return nil
}