Skip to content

[Bug] Custom API gets stuck in infinite file-reading loop on Windows ("terminal issue, reading directly") #1327

Description

@mh292929

What happened

I configured a custom OpenAI-compatible API endpoint (using DeepSeek) in Freebuff on Windows.

When asking the agent to inspect, read, or modify a file in the project, it fails to read the file contents. The agent repeatedly reports an issue with the terminal and outputs messages such as:
"Terminal has an issue, reading directly..." or "I'll read the file directly, retrying..."

Instead of reading the file and proceeding with the requested task, it enters an infinite retry loop. This caused rapid consumption of nearly 1 million tokens across 57 repeated requests in a single session without making any progress.

Steps to reproduce

  1. Run Freebuff on Windows.
  2. Configure a custom OpenAI-compatible API endpoint and key (using a DeepSeek model).
  3. Open a project folder and give a prompt that requires reading an existing file (e.g., "Check main.py and fix the issue").
  4. Observe the agent failing to read the file via terminal/tool execution.
  5. Notice the agent looping continuously with messages about terminal problems and trying to read the file directly.

Where does this happen?

Desktop app

Operating system

Windows

Version

0.0.106

Model

deepseek-v4-flash

Logs or screenshots

Agent repeatedly outputs:
"Terminal has an issue, reading directly..."
"Retrying to read the file..."
(Enters an infinite loop generating dozens of API requests while stuck on reading the file).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:desktopThe Electron desktop appbot:triagedClassified by the community triage bottype:bugA defect in the code with a reproducible failure

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions