AgentBisect MCPサーバー
コミット 2026年11月7日AIコーディングエージェントが二分探索によるデバッグとワークスペースのフォークを実行できるようにし、多段階の実行プロセスにおけるエラーの特定と復旧を可能にします。
別名 test-bit-sys/agentbisect
- スター
- 3
- ツール
- 5
- ダウンロード数(30日間)
- —
- 最新バージョン
- —
- 最終コミット
- 2026年11月7日
- ライセンス
- MIT
AgentBisect MCPとは
AgentBisectはMCPサーバーです。 AIコーディングエージェントが二分探索によるデバッグとワークスペースのフォークを実行できるようにし、多段階の実行プロセスにおけるエラーの特定と復旧を可能にします。. 5個のツールを提供しており、agentbisect_snapshot, agentbisect_bisect, agentbisect_rewindなどがあります。
プロジェクトのREADMEから生成された概要
AgentBisect MCP server について
Claude Code、Cursor Agent、Aiderなどの自律型コーディングエージェントを使用している開発者は、AgentBisectを使用して複雑で多段階のコーディングプロセスをデバッグできます。長いセッションの途中でエージェントがミスをした際、このツールを使用することで、最初からやり直したり、ログを手動で検索して高価なAPIトークンを浪費したりする必要がなくなります。シャドウgitレジャーを使用することで、実際のgit履歴を汚すことなく、ワークスペースのチェックポイントをスナップショットとして保存します。
agentbisect_bisectツールを実行することで、AIクライアントは記録されたステップに対して二分探索を行い、リグレッションが発生した正確な瞬間を特定できます。エラーが特定されると、agentbisect_rewindツールがファイルシステムを既知の正常な状態に復元し、エージェントがタスクを正しく再開できるようにリカバリプロンプトを生成します。このシステムは、CLI経由でのローカル利用、またはClaude DesktopやWindsurfなどのデスクトップ環境に統合されたMCP serverとして使用できるように設計されています。
できること
- 1最初の失敗ステップの特定二分探索を使用して、エージェントのアクションが長く続くシーケンスの中で、バグが混入した正確なポイントを見つけます。
- 2エージェントのエラーからの復旧ワークスペースを検証済みの正常な状態まで巻き戻し、ミスを繰り返さずに続行するためのプロンプトをエージェントに提供します。
- 3エージェントのパフォーマンスを視覚的に分析ウェブダッシュボードを使用して、ステップグラフ、diff、およびフルリスタートを回避することで節約されたトークン数を確認します。
- 4デバッグ情報の共有問題が発生したエージェントのセッションを単一のファイルにパッケージ化し、他の開発者と共有してレビューを受けることができます。
プロジェクトの README から作成されています。すべてのユースケースは、その引用と照らし合わせて確認されています。
AgentBisect MCPツール 5
READMEから検出agentbisect_snapshotagentbisect_bisectagentbisect_rewindagentbisect_get_diffagentbisect_status
| agentbisect_snapshot | — | |
| agentbisect_bisect | — | |
| agentbisect_rewind | — | |
| agentbisect_get_diff | — | |
| agentbisect_status | — |
自動チェック
実行日 2026年11月14日完全なレポート →まだ検証されていません。サーバーには80点のスコア、重大な問題がないこと、および検証に必要な十分なデータが必要です。 チェックの仕組み · 点数を上げるための改善点
- ソースリポジトリがリンクされており、アクセス可能test-bit-sys/agentbisect is public and reachablegithub.com/test-bit-sys/agentbisect ↗合格
- パッケージがこのリポジトリをソースとして指定未チェック
- ビルドの来歴 (Sigstore 証明)未チェック
- オープンソースライセンス (OSI)MITspdx.org/licenses/MIT.html ↗合格
- 過去1年以内にコミットまたはリリースありLast commit or release 2026-11-07github.com/test-bit-sys/agentbisect ↗合格
- OpenSSF Scorecard未チェック
- パッケージ名が有名なパッケージに酷似していない未チェック
- パッケージおよびその依存関係に重大な勧告なし未チェック
- モデルへの隠れた指示がない5 tool descriptions and the README read; no override phrases, credential paths or hidden characters合格
- 破壊的なツールがラベル付けされているNo tool named like delete, drop or exec合格
- リモートエンドポイントが MCP ハンドシェイクに応答未チェック
README
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.
AgentBisect MCPのよくある質問
AgentBisect MCPが提供するツールは
5個のツールを提供しており、agentbisect_snapshot, agentbisect_bisect, agentbisect_rewind, agentbisect_get_diff, agentbisect_statusなどがあります。
AgentBisectは、エージェントが失敗した正確なステップをどのように特定しますか?
二分探索トラジェクトリエンジンを使用し、O(log N)回のテスト実行で最初の失敗ステップを特定します。
AgentBisectを使用すると、既存のGitリポジトリに影響はありますか?
いいえ。汚染のないシャドウGitレジャーを使用しており、実際の.gitログに影響を与えることなく、特定のディレクトリ内のチェックポイントをスナップショットとして保存します。
AIエージェントがAgentBisectを使用して自己修復することはできますか?
はい。CursorやClaude Desktopなどの環境で動作するエージェントは、このMCP serverを使用して、自身のセッションを自律的にデバッグおよび巻き戻しすることが可能です。
リグレッションが見つかった後はどうなりますか?
ワークスペースを最後に確認された正常なステップまでフォークできます。これにより、エージェントがエラーを繰り返さずにタスクを再開するためのインテリジェントなプロンプトが生成されます。