Agent loops after providing answer in non-interactive modes (interactive: false
or direct CLI prompt)
#403
Labels
bug
Something isn't working
When MyCoder is run with
interactive: false
in the configuration, or when a prompt is provided directly via the CLI (e.g.,mycoder "some prompt"
), the agent correctly processes the request and provides an initial answer. However, instead of exiting cleanly, it enters an indefinite loop, repeatedly generating follow-up messages asking for confirmation or if further assistance is needed. The process does not terminate on its own and requires manual intervention (Ctrl+C orkill
when using mycoder -i).This behavior is observed even for simple, non-tool-intensive tasks (e.g., "What is the capital of France?") and persists whether
profile
istrue
orfalse
.Environment:
npm install -g mycoder
v22.16.0
(npmv10.9.2
) (Managed via NVM for Linux)mycoder.config.js
:Steps to Reproduce:
mycoder.config.js
as shown above.baseUrl
.mycoder "What is the capital of France?"
mycoder -i
and enter the same prompt. Ensureinteractive: false
is in the config.Expected Behavior:
The agent should provide the answer (e.g., "The capital of France is Paris.") and then terminate the process cleanly without further interaction, especially when a prompt is given directly on the CLI.
Actual Behavior:
The agent provides the correct answer, then enters a loop. Example output snippet:
The process consumes resources and generates extensive token usage due to the loop.
Additional Notes:
mycoder "prompt"
.mycoder -i
shell mode (requireskill
from another terminal). This might be a separate TTY/signal handling issue within the-i
mode.The text was updated successfully, but these errors were encountered: