Skip to main content
In this recipe, you will see how the AI calls engineering tools (@tool_call) to fix tests.
1

The User Defines the Goal

Start /coder mode with a clear instruction about what needs to be fixed.
2

The AI Investigates (ReAct Loop)

The AI analyzes the request and calls the plugin to run the tests and identify the errors:
3

ChatCLI Executes

The command result is returned to the AI. ChatCLI acts as an intermediary, executing the requested command and capturing the output.
4

The AI Continues (Reading)

Based on the errors found, the AI requests to read the problematic file:
5

Applying the Fix (Patch)

After analyzing the code, the AI generates and applies the necessary patch:
This entire flow happens autonomously within /coder mode. The AI executes a ReAct loop (Reason + Act) where each step informs the next, until all tests pass.