Skip to content

Stop hook running in cycle after response (v2.3) #434

@orestesgarcia

Description

@orestesgarcia

First, I want to say thank you Daniel for this amazing contribution - I am a fan of your work!

Issue

After installing PAI released version 2.3, every time the agent runs and gives me a response, it goes into a cycle where the stop hook seems to be running repeatedly and printing weird lines to stdio.

Screenshot

In the attached screenshot, you can see this specifically ran for 38 seconds where the stop hook keeps cycling:

Stop hook cycle screenshot

The output shows repeated lines like:

* Zesting... (ctrl+c to interrupt · running stop hook · 37s · ↓ 448 tokens · thought for 2s)
n mode

This repeats multiple times before finally completing.

Environment

  • PAI Version: 2.3
  • Installation: Fresh install following documentation

Expected Behavior

The stop hook should run once and complete quickly after a response.

Actual Behavior

The stop hook appears to run in a cycle for extended periods (38+ seconds), printing repeated "Zesting..." messages with "n mode" fragments.

Questions

Any idea why this might be happening? Is there a configuration issue or known workaround?


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions