Context EngineeringdebuggingIntermediate

The assistant gets worse the longer the conversation runs

Symptoms

  • Early in a session the agent is sharp; after 30+ turns it forgets instructions given at the start and repeats itself.
  • Latency and cost per turn climb steadily as the conversation goes on.
  • Occasionally a late turn silently drops the system instructions entirely.
turn 3   prompt_tokens=2,140   latency=1.2s
turn 18  prompt_tokens=41,880  latency=6.9s
turn 34  prompt_tokens=118,200 latency=14.1s  (near model limit)
context composition at turn 34: system=1%, raw tool results=74%, chat history=22%, task=3%

Investigate

Inspect areas in any order (0/5 inspected). When you think you know the root cause, commit to it.

Tool results
History growth
Retrieved context size
Memory injection
Token budget