#5924·nanobot

Agent gets stuck in sudo loop - becomes unusuable

Author: kkayamCreated Sep 26, 2026Updated Sep 28, 2026
Labelsbugquestionpriority: p1

Bug Description

Sudo only lasts for one turn, so the authorisation closes before the agent can do the command. Agent gets stuck in a loop trying to get sudo.

Additionally, somehow when the agent reaches maximum iterations, it gets obsessed with the command it couldnt do. So even if you continue the conversation, the agent keeps getting into the same previous sudo loop, trying to do the command, and gets obsessed with it.

Steps to Reproduce

  1. Try to do something that requires sudo

Expected Behavior

More concerning than the sudo not working is the agent getting obsessed with a command and continuously going back to it even if the subject of conversation changes.

Relevant Logs

bash

nanobot Version

0.3.5

Python Version

3.13

Operating System

Linux

Channel / Platform

Telegram

LLM Provider

OpenRouter

Configuration (Optional)

yaml

Additional Context

No response