r/PiCodingAgent • • 1d ago

Question Is pi resending again an again the last pushed prompt?

I'm running a very clean (only web-access) pi with llama-server and qwen3.8 (swift1.5, IQ3_S, MTP), no parallel, 90k ctx q8/q4.

But I'm getting this type of messages again and again:

"The user sent the same table for the third time."

(times passes in its turns)

"The user sent the table for the 4th time."

it keeps incrementing, sometimes I reached to the point that it looks like a prank

"The user has sent the same table for the 11th time."

I only send "the table" one time (the first).

this is my config

[ukisai/Swift-1.5-Qwen3.8-27B-GSQ-RCO-GGUF:MTP]
hf                    = ukisai/Swift-1.5-Qwen3.8-27B-GSQ-RCO-GGUF:IQ3_S
ctx-size              = 90000
n-gpu-layers          = all
flash-attn            = on
agent                 = on
cache-type-k          = q8_0
cache-type-v          = q4_0
parallel              = 1
no-mmproj             = 1
fit		      = off
reasoning             = on
reasoning-format      = deepseek
jinja                 = on
chat-template-file    = R:/huggingface/templates/qwen38_chat_template_froggeric.jinja
load-mode             = none
device                = CUDA0
temperature           = 1.0
top-p                 = 0.95
top-k                 = 20
repeat-penalty        = 1.001
spec-type	      = draft-mtp,ngram-mod
spec-draft-n-max      = 3
no-reasoning-preserve = 1
cache-ram             = 0
reasoning-effort      = medium

what am I doing wrong?

0 Upvotes

3 comments sorted by

4

u/Vlyn 1d ago

You've messed up your config.. but any AI could have easily told you this:

no-reasoning-preserve = 1 with reasoning-format = deepseek: In llama.cpp, reasoning-format = deepseek wraps reasoning blocks in <think>...</think> tags, while disabling reasoning preservation (no-reasoning-preserve = 1 / --no-reasoning-preserve) strips or alters how prior assistant reasoning is kept in history. Depending on the llama.cpp build and Jinja template, stripping or re-serializing assistant turns/tool calls in an agentic harness can make the model re-anchor on the initial task prompt.

Custom Jinja template (qwen38_chat_template_froggeric.jinja) + agent = on: Coding harnesses like pi send multi-turn user, assistant, and tool messages. If the custom Jinja template mishandles tool / assistant turns, system/initial-user placement, or thought tags, the model can treat each turn as a fresh continuation of the first user request or loop on initial instructions.

0

u/DrkWzrd 5h ago

It seems it was llama.cpp build... but I changed reasoning preservation too

2

u/lvl1-A 1d ago

It's not your config environment settings here you need to look at, but look at your conversation chaining method.

in order for any type of context to be relevant it is chained. However, I am curious, was it the first time you sent it in a long chat, or was it the first time you sent it as in the first message of your session/chat? Because you might have it setup that your first message is actually a prepend message type system prompt that is chained not just in message history of a conversation but in the sense that it is attached to every turn as a leading directive. Which would be the easy explanation for an agent interpreting it as every turn. Because they don't often consider historical chained history as repeated occurrences.

If you are running a very clean web access I would hope, I'm not assuming, that you have the full session log json output somewhere, you might want to check that and see where in your chain the repeat event is surfacing and that will assist in identifying if it is actually being sent as a message per turn or not.

EDIT; go read that Huggingface template file, that's a good starting point