Canonical: https://botbento.com/usecases/iterative-local-code-debugging-and-patch-execution/
Format: Markdown representation of the public HTML page.

[Home](/) / [Use cases](/usecases/) / [Coding](/usecases/?category=coding)

Coding · Intermediate

# Iterative local code debugging and patch execution

Run build tests in your terminal, diagnose errors, and safely edit code

[Use with BotBento ](https://app.botbento.com/?ref=usecases&utm_source=botbento.com&utm_medium=usecases&utm_campaign=iterative-local-code-debugging-and-patch-execution)Copy promptShare[Markdown](/text/usecases/iterative-local-code-debugging-and-patch-execution/index.md)[العربية](/ar/usecases/iterative-local-code-debugging-and-patch-execution/)

Opens BotBento. Paste the prompt into a bot; nothing is preconfigured.

- When you askReceive failing test log or task
- ThenInspect code and run build commands
- ResultDeliver verified patch and test results

Investigate software bugs and build failures on your workstation by inspecting local directory structures, reading source files, and executing test suites inside a terminal. The bot iteratively parses syntax errors, adjusts logic, and re-runs builds until all tests pass.

## Prompt to start with

BotBentoRecommended

```
When given a bug report or build task, inspect the repository structure and read relevant source files before proposing any edits. Execute test commands in the terminal and evaluate output logs. Apply incremental code modifications to resolve compilation and test failures. Never delete existing files, drop database tables, or run destructive system commands without explicit user approval. Always show a clear summary of file changes and test outcomes.
```

Copy

## Tools it uses

TerminalChat

## Works with

BotBento

## Tags

- debugging
- terminal
- testing
- refactoring

## Source

[wcgw: Shell and coding agent on mcp clients](https://github.com/rusiaaman/wcgw)
GitHub · checked 2026-10-16

Summarized in our own words. Any results described there are the authors’ own, not measured by BotBento.

By BotBento Editorial · Added 2026-10-16 · Updated 2026-10-16 · [Suggest a correction](/contact/)

## Related use cases

-

Codingadvanced

## [Dynamic code repair loop runner](/usecases/dynamic-code-repair-loop-runner/)

Iterate on failing test suites and monitor convergence before pushing changes

TerminalGitHubChat
-

Codingintermediate

## [Automated code interpreter and script runner](/usecases/automated-code-interpreter-and-script-runner/)

Write, execute, and verify Python code snippets to solve multi-step technical problems

ChatTerminal
-

Codingintermediate

## [Automated code refactoring and test execution](/usecases/automated-code-refactoring-and-test-execution/)

Inspect repositories, apply code edits, and execute test suites from the command line

TerminalGitHub
