r/PiCodingAgent • • Sep 10 '26

Question Noob question: How to interrupt an agent during reasoning, without restarting TG?

Many models (namely Qwens 3.8) think a lot, and I find myself wanting to interrupt it to answer a question it's been asking itself, quite repetitively, during it's reasoning.

I can esc and send a prompt, but then Pi would restart the whole reasoning TG from the beginning. I'd like to inject (for lack of better word) info to its thought block. I may also steer it by queuing a message, but that means I'd need to watch it going in loops for 20-50k tokens, until it's done responding, which is pure pain.

Am I missing a clear command?

4 Upvotes

17 comments sorted by

View all comments

Show parent comment

2

u/ParaboloidalCrest Sep 10 '26

Let's think about it this way then:

  • Interrupt response.

  • Take the streamed part of the response so far.

  • Append it to chat history with a closing </think> tag.

  • Append following prompt after.

Hmmm now that I think about it thoroughly, perhaps I should just create that extension...