ggerganov's "inception" pattern: inject a thought to force agents to act when they reason too long

olcan · x · 2026-08-17

Georgi Gerganov (llama.cpp) shares an inception pattern useful in agentic workflows: when the model thinks for too long, you inject a thought to force it to take action.

Implementation via limiting max reasoning length:

--reasoning-budget 4096 \

--reasoning-budget-message "... I am thinking for too long -- let me gather more info about the task."

Once the reasoning budget is hit, this message interrupts the model's thinking and pushes it to gather information instead. Gerganov notes it's especially helpful for underspecified tasks that make models reason endlessly. Tune the values to your needs.

Original post →

More from coding & agent

coding & agent channel →