Pular para o conteúdo principal

Troubleshooting

Find the message you see below.

The agent cannot start​

cannot start claude-agent-acp: not found on PATH: see When an agent cannot start.

The agent stopped​

parolsh: <reason>
parolsh: the agent stopped. Run #new to start it again.

The agent's process ended: it crashed, was killed, or closed the connection. The line before it is the reason, as Parolsh got it. The conversation is lost: #new starts the agent again with a new one, in the current directory.

A turn failed​

parolsh: <the agent's message>: { ...details... }

The agent answered your message with an error instead of an answer. The agent is still running and the conversation continues: send another message. The JSON after the message is the agent's own detail, useful to find the cause in its documentation. The prompt shows status 1 for that turn.

Tool-call loop protection (Qwen Code)​

parolsh: Tool-call loop protection stopped this turn. The session is still available; send a more specific instruction to continue.: {
"code": "LOOP_DETECTED",
"errorKind": "loop_detected",
"loopType": "invalid_tool_params_stagnation"
}

Qwen Code watches its model for loops, and stops the turn when it finds one. The model is looping, not Parolsh or Qwen Code. loopType says what it did:

loopTypeThe model...
consecutive_identical_tool_callsrepeated the same tool call with the same arguments
global_tool_call_duplicaterepeated the same tool call across the turn
alternating_tool_call_patternalternated between the same two tool calls
action_stagnationkept calling the same tool without progress
shell_command_stagnationrepeated similar shell commands without progress
read_file_loopread files too many times in a row without progress
invalid_tool_params_stagnationkept sending invalid tool arguments without correcting them
repeated_tool_execution_failurekept hitting the same tool failure after a reminder
chanting_identical_sentencesrepeated the same sentence in its answer or reasoning
repetitive_thoughtsrepeated the same reasoning thought
turn_tool_call_capreached the per-turn tool-call limit

What to do:

  • Send a more specific message: name the file, the command or the next step. The model is told the turn was stopped and tries another approach.
  • Use a stronger model. Smaller models send invalid tool arguments and repeat calls more often.
  • turn_tool_call_cap: an explicit model.maxToolCallsPerTurn in ~/.qwen/settings.json is a hard cap. Remove it to use Qwen Code's adaptive default, or raise it (0 disables it).
  • model.skipLoopDetection: true in ~/.qwen/settings.json disables the other checks, except consecutive_identical_tool_calls, shell_command_stagnation, global_tool_call_duplicate, invalid_tool_params_stagnation and repeated_tool_execution_failure, which are always on.

Checked against Qwen Code 0.24.5.