AgentBisect MCP server
Commit 7 Nov 2026Memungkinkan AI coding agent untuk melakukan binary search debugging dan workspace forking guna menemukan serta memulihkan diri dari error dalam trajectory multi-step.
Juga dikenal sebagai test-bit-sys/agentbisect
- Stars
- 3
- Tools
- 5
- Unduhan, 30 hari
- β
- Versi terbaru
- β
- Commit terakhir
- 7 Nov 2026
- Lisensi
- MIT
Apa itu AgentBisect MCP?
AgentBisect adalah MCP server. Memungkinkan AI coding agent untuk melakukan binary search debugging dan workspace forking guna menemukan serta memulihkan diri dari error dalam trajectory multi-step. Server ini menyediakan 5 tool, seperti agentbisect_snapshot, agentbisect_bisect, agentbisect_rewind.
Ringkasan dibuat dari README proyek
Tentang AgentBisect MCP server
Developer yang menggunakan autonomous coding agent seperti Claude Code, Cursor Agent, atau Aider dapat menggunakan AgentBisect untuk melakukan debug pada trajectory coding multi-step yang kompleks. Ketika agent melakukan kesalahan di tengah sesi yang panjang, tool ini mencegah Anda untuk memulai ulang dari awal atau membuang-buang API token yang mahal dengan mencari log secara manual. Tool ini menggunakan shadow git ledger untuk mengambil snapshot checkpoint workspace tanpa mengotori git history asli Anda.
Dengan menjalankan tool agentbisect_bisect, AI client dapat melakukan binary search di seluruh langkah yang tercatat untuk menemukan momen tepat saat regresi terjadi. Setelah error ditemukan, tool agentbisect_rewind akan memulihkan filesystem ke state yang diketahui baik dan menghasilkan recovery prompt untuk membantu agent melanjutkan tugasnya dengan benar. Sistem ini dirancang untuk digunakan secara lokal melalui CLI atau sebagai MCP server yang terintegrasi ke dalam desktop environment seperti Claude Desktop atau Windsurf.
Apa yang bisa Anda lakukan dengannya
- 1Temukan langkah pertama yang rusakTemukan titik tepat dalam urutan panjang aksi agent di mana bug diperkenalkan menggunakan binary search.
- 2Pulihkan diri dari error agentLakukan rewind pada workspace ke state yang terverifikasi baik dan berikan prompt kepada agent agar dapat melanjutkan tanpa mengulangi kesalahan.
- 3Analisis performa agent secara visualGunakan dashboard web untuk melihat grafik langkah, diff, dan berapa banyak token yang dihemat dengan menghindari restart penuh.
- 4Bagikan bukti debuggingKemas sesi agent yang bermasalah ke dalam satu file tunggal untuk dibagikan kepada developer lain guna ditinjau.
Ditulis berdasarkan README proyek. Setiap use case diperiksa terhadap kutipan dari README tersebut.
Tool AgentBisect MCP 5
Terdeteksi dari READMEagentbisect_snapshotagentbisect_bisectagentbisect_rewindagentbisect_get_diffagentbisect_status
| agentbisect_snapshot | β | |
| agentbisect_bisect | β | |
| agentbisect_rewind | β | |
| agentbisect_get_diff | β | |
| agentbisect_status | β |
Pengecekan otomatis
Berjalan 14 Nov 2026Laporan lengkap βBelum diverifikasi. Sebuah server memerlukan skor 80, tidak ada temuan serius, dan data yang cukup untuk kami periksa. Cara kerja checks Β· Yang perlu diperbaiki untuk menambah poin
- Source repository terhubung dan dapat dijangkautest-bit-sys/agentbisect is public and reachablegithub.com/test-bit-sys/agentbisect βLolos
- Nama paket mencantumkan repositori ini sebagai sumbernyaTidak diperiksa
- Provenance build (atestasi Sigstore)Tidak diperiksa
- Lisensi open source (OSI)MITspdx.org/licenses/MIT.html βLolos
- Ada commit atau release dalam satu tahun terakhirLast commit or release 2026-11-07github.com/test-bit-sys/agentbisect βLolos
- OpenSSF ScorecardTidak diperiksa
- Nama package tidak mirip dengan package populerTidak diperiksa
- Tidak ada advisory kritis pada paket atau dependensinyaTidak diperiksa
- Tidak ada instruksi tersembunyi untuk model5 tool descriptions and the README read; no override phrases, credential paths or hidden charactersLolos
- Tools yang bersifat destruktif telah diberi labelNo tool named like delete, drop or execLolos
- Endpoint remote merespons handshake MCPTidak diperiksa
README
Lihat di GitHubπ₯ The Problem: "Compounding Agent Drift"
When you ask an autonomous coding agent (Claude Code, Cursor Agent, Google Antigravity, Devin, Cline, or Aider) to implement a multi-file feature or perform a large refactor, it executes 20 to 50 sequential steps (tool calls, file edits, bash commands).
Inevitably:
- At Step 12, the agent makes a subtle semantic error (e.g., inverts an authorization check or changes a function signature).
- Steps 13 to 40 turn into compounding hallucinations, writing broken patches on top of invalid assumptions.
- At the end of the session, the test suite is completely broken.
Today, developers face a frustrating dilemma:
- Guess manually by reading through a 2,000-line JSON transcript.
- Or run
git checkout .β wasting 40,000+ API tokens, $1.50+ in costs, and 30 minutes of waiting.
Traditional: [Step 1] βββββββββββββββββΊ [Step 12: BUG] βββββββββββββββββΊ [Step 40: FAIL] β
ββββ Wipe whole session (git checkout .)! 40k tokens wasted!
AgentBisect: [Step 1] ββββΊ [Step 12: FIRST BAD] ββββΊ [Step 11: FORK HERE] ββββΊ [SUCCESS] β
ββββ Bisect isolated Step 12 in 5 test runs! Saved 28k tokens!
π The Solution: AgentBisect
AgentBisect brings deterministic binary search and time-travel trajectory debugging to AI coding agents:
- Non-Polluting Shadow Git Ledger: Automatically snapshots workspace checkpoints inside
.agentbisect/shadow_git/without polluting your real.gitlog or creating unwanted branches. - Binary Search Trajectory Engine (
agentbisect find): Locates the exact first broken step in $\mathcal{O}(\log_2 N)$ test executions (just 5 test runs for 32 steps). - Workspace & Context Forking (
agentbisect fork <step>): Rewinds your filesystem to the last verified good step and synthesizes an intelligent post-mortem prompt (AGENT_FORK_PROMPT.md) for the agent to resume without repeating the error. - Self-Healing MCP Server & Skill: Agents running inside Cursor, Claude Desktop, or Antigravity can invoke
agentbisect_bisectto autonomously debug and rewind themselves. - Interactive Local Web Dashboard (
agentbisect ui): Full-featured dark-mode web dashboard with visual step graphs, side-by-side diffs, and token waste analytics. - Zero-Overhead Portable Evidence Bundles (
agentbisect bundle export/import): Package faulty sessions as.bisect.zipfor instant sharing and post-mortem review.
β‘ 10-Second Playground Demo
Try AgentBisect immediately without configuring any transcript or repo:
pip install agentbisect
agentbisect demo
(Also supports Node.js microservices via agentbisect demo --lang node)
This launches a pre-packaged simulation of an autonomous agent session, executes binary search live in your terminal, pinpoints the exact line broken at Step 12, and produces an interactive HTML report!
π¦ Installation
Install via pip:
pip install agentbisect
Or install latest from source:
git clone https://github.com/test-bit-sys/agentbisect.git
cd agentbisect
pip install -e .
π 10-Second Setup on ANY Agent
AgentBisect can automatically configure itself for your preferred agent with a single command:
# π― 1-Click Auto Configuration:
agentbisect setup --agent cursor --write # Configures .cursor/mcp.json
agentbisect setup --agent antigravity --write # Installs skill in .gemini/skills/
agentbisect setup --agent claude --write # Configures Claude Desktop
agentbisect setup --agent cline --write # Configures .cline/mcp.json
agentbisect setup --agent windsurf --write # Configures Windsurf MCP
# Or view snippets for all agents without writing:
agentbisect setup
π οΈ CLI Quick Reference
| Command | Description |
|---|---|
agentbisect setup --agent <name> |
Automatically configure MCP server & skills for any agent |
agentbisect find "<test_cmd>" |
Binary search across agent steps to locate regression step |
agentbisect fork <step_num> |
Rewind workspace to <step_num> and generate AGENT_FORK_PROMPT.md |
agentbisect ui |
Launch the local web UI dashboard with interactive visual diffs |
agentbisect snapshot "<msg>" |
Create an immediate shadow git snapshot of current workspace |
agentbisect wrap "<cmd>" |
Execute command transparently and auto-record a shadow step |
agentbisect doctor |
Run pre-flight environment, dependency, and permission diagnostics |
agentbisect bundle export |
Package current session into a portable .bisect.zip bundle |
agentbisect bundle import <pkg> |
Import and inspect a .bisect.zip evidence bundle |
agentbisect mcp |
Launch the stdio Model Context Protocol (MCP) server |
π€ MCP Server Setup (Self-Healing Agent)
Enable your agent in Cursor, Claude Desktop, or Antigravity to debug itself:
Add to your MCP configuration (claude_desktop_config.json or Cursor Settings):
{
"mcpServers": {
"agentbisect": {
"command": "agentbisect",
"args": ["mcp"]
}
}
}
Available MCP Tools:
| Tool Name | Parameters | Description |
|---|---|---|
agentbisect_snapshot |
summary, files? |
Snapshots current workspace to shadow git |
agentbisect_bisect |
test_command, timeout_seconds? |
Runs binary search over recorded steps |
agentbisect_rewind |
target_step, hint? |
Rewinds workspace and generates recovery prompt |
agentbisect_get_diff |
step_number |
Retrieves unified git diff of any step |
agentbisect_status |
none | Returns active session metadata and step count |
π‘οΈ Reliability & Correctness Guarantees
AI agent trajectories often break traditional debugging assumptions. AgentBisect incorporates formal reliability boundaries:
1. Explicit Regression Oracle
Every test evaluation distinguishes between:
PASS: Exit code 0, test assertions satisfied.FAIL: Non-zero exit code indicating code assertion failure.INCONCLUSIVE: Command timed out or process hung without deterministic conclusion.ERROR: Infrastructure/environment defect (missing binary, permissions, OS failure). Infrastructure errors are never conflated with code regressions.
2. Non-Monotonic Trajectory Detection
Agents often introduce a bug at step $k$, partially patch it at step $m$, and break something else at step $n$. AgentBisect automatically monitors and detects non-monotonic inversions:
CONFIRMED_FIRST_REGRESSION(95β99% confidence): Monotonicity holds, step $k-1$ passed, step $k$ failed.PROBABLE_FIRST_REGRESSION(80β90% confidence): Boundary identified with skipped unverified steps.EARLIEST_OBSERVED_FAILURE(65% confidence): Non-monotonic trajectory detected; identifies the earliest observed failure while highlighting that subsequent steps passed.INCONCLUSIVE: Infrastructure failures or flapping tests prevented deterministic diagnosis.
3. Flaky Test Mitigation & Stability Policies
Run tests with configurable retries (--retries N) and stability policies (--stability-policy majority or require_all_pass). Intermittent failures are never hidden; all execution attempts are recorded with timestamps, exit codes, and stdout/stderr.
4. Transactional Workspace Restoration
During bisection, files are safely evaluated. Your working treeβincluding uncommitted changes and untracked filesβis transactionally stashed and guaranteed to be restored upon completion or keyboard interrupt. User .git directories and configurations are strictly protected from deletion.
5. Hardened Security & Isolation
- Zip-Slip Protection: Evidence bundle import validates every archive path against path traversal attacks (
../), disallowing arbitrary file overwrites and symlinks outside.agentbisect/. - Advisory File Locking: High-concurrency environments use atomic file locks (
agentbisect.lock) to prevent concurrent ledger corruption between CLI, MCP, and Web UI. - Atomic Persistence: Session metadata writes use atomic rename replacement to eliminate partial file corruption.
π Feature Comparison
| Feature | Standard git bisect |
LLM Tracing (Langfuse/Arize) | AgentBisect |
|---|---|---|---|
| Target Unit | Human git commits | API prompt logs | Agent trajectory steps |
| Workspace Isolation | β Pollutes user .git |
β No workspace control | β Shadow Git (Zero pollution) |
| Autonomous Search | β Manual marking | β No regression search | β Autonomous $\mathcal{O}(\log_2 N)$ Search |
| Context Forking | β None | β None | β Workspace Rollback + Guidance Prompt |
| Agent Self-Healing (MCP) | β None | β None | β Native MCP Server & Skill |
| Token Waste Analytics | β None | β Logs tokens only | β Calculates compounding waste saved |
π€ Supported Agent Frameworks
- Google Antigravity & Gemini CLI (
transcript.jsonl) - Claude Code (
.claude/session transcripts) - Cursor Agent / Composer
- Cline
- OpenHands / SWE-bench format
- Aider
- Generic JSON / JSONL Trajectories
π§ͺ Running Tests
pytest tests/ -v
π License
Distributed under the MIT License. See LICENSE for details.
Pertanyaan tentang AgentBisect MCP
Tool apa yang disediakan AgentBisect MCP?
Server ini menyediakan 5 tool, termasuk agentbisect_snapshot, agentbisect_bisect, agentbisect_rewind, agentbisect_get_diff, agentbisect_status.
Bagaimana AgentBisect menemukan langkah tepat di mana agent mengalami kegagalan?
Tool ini menggunakan binary search trajectory engine yang menemukan langkah pertama yang rusak dalam O(log N) eksekusi test.
Apakah menggunakan AgentBisect akan memengaruhi repositori Git saya yang sudah ada?
Tidak, tool ini menggunakan shadow Git ledger yang tidak mengotori workspace untuk mengambil snapshot checkpoint di dalam direktori tertentu tanpa memengaruhi .git log asli Anda.
Bisakah AI agent saya menggunakan AgentBisect untuk memperbaiki dirinya sendiri?
Ya, agent yang berjalan di environment seperti Cursor atau Claude Desktop dapat menggunakan MCP server ini untuk melakukan debug dan rewind sesi mereka secara otonom.
Apa yang terjadi setelah regresi ditemukan?
Anda dapat melakukan fork pada workspace ke langkah terakhir yang terverifikasi baik, yang kemudian akan menghasilkan prompt cerdas untuk membantu agent melanjutkan tugas tanpa mengulangi error yang sama.