Ever asked a coding agent a question, watched it run a few tool calls… and then it just stops without ever answering you? That's a harness-loop failure. Step through the agent loop below and flip the "forgets to reply" bug on to see exactly where it breaks.
A CLI agent is a while-loop around an LLM API call. Each iteration: send conversation + tool results → model returns either tool calls or text → harness executes tools, appends results, loops again. The loop only ends when the model emits a plain text message with no tool calls.
The model must learn that text output = message to the human. If a model was trained mostly on autonomous long-horizon tasks, it may treat a question as a task: gather info via tools, conclude internally, then emit an empty or stop response — never routing the answer back as text. To the user it looks like silence.
Harness ends turn when: (a) model returns no tool calls, or (b) max iterations hit. If the model returns zero tool calls AND zero text, most harnesses still end the turn — silently. Robust harnesses detect this and inject a nudge: "You must respond to the user now."
Practical prompts that force a reply: "Answer in chat, don't just use tools", or end with "then summarize your findings to me." Explicitly naming the deliverable ("reply with a 3-line answer") anchors the model's final text emission.