How the agent works
You give Waibee Code a task, and it does the work itself: it reads files, runs commands, edits code, and checks the result until the task is done.
The agent loop
Section titled “The agent loop”On every turn, the agent goes through the same loop:
- Reads the task and the current context.
- Decides what to do next and calls a tool: read a file, search the code, run a command, make an edit.
- Reads the tool’s result.
- Repeats until the task is done or it needs you.
You can step in at any moment: stop the turn, correct the direction, or interject mid-turn by typing a message.
The agent guards against going in circles. If the same call or the same result keeps showing up among a tool’s recent calls, the next call is rejected and the agent gets a hint to change its approach. Polling a background command is allowed more repeats. A successful shell command does not count as a repeat unless it reads a file, and a successful file edit resets the count. If this happens a second time within one prompt, the work stops: the agent takes one last turn without tools and replies with what it has so far. A subagent behaves the same way, and the main agent receives its reply marked as unfinished. The threshold is not configurable.
The agent works with your project through tools: reading and writing files, running shell commands, searching the code, the language server (LSP), web requests, subagents, and more. The full list is under Features.
Permissions
Section titled “Permissions”Actions that change the system (file edits, commands) require approval by default. How often the agent asks depends on the permission mode (default, acceptEdits, trust, bypassPermissions) and on the lists of allowed and denied commands. More in Permissions.
Context
Section titled “Context”The agent keeps the whole conversation, including files it read and command output, in the model’s context window. The window fills up fast, so the agent compacts older history on its own, and you help it save space. How this works and what to do is in Context window.
Instructions and memory
Section titled “Instructions and memory”The agent takes your rules from instruction files (WAIBEE.md, CLAUDE.md, AGENTS.md), which it reads at the start of a session. Separately, it keeps a memory: facts about you and the project that survive restarts. For which files are read and in what order, see Configuration files; for where they live, see The .waibee directory.
Extensions
Section titled “Extensions”You can extend the agent with skills, custom commands, and subagents, hooks, MCP servers, and plugins.