AgentSensor is a zero-config dev server and browser runtime error sensor designed for AI coding agents. Through MCP (Model Context Protocol), it delivers real crash information from the terminal and browser directly to agents, mapped to the exact file and line number, with no copy-pasting.
Purpose
AgentSensor aims to eliminate the step where developers manually move error information between terminal errors, browser developer tools, and AI chat windows. It lets AI coding agents (such as Claude Code, Codex, Cursor, Antigravity, etc.) directly see the real errors of a running application, so they fix problems based on accurate information rather than guessing.
Key capabilities
- Zero code changes: Enabled by wrapping existing dev scripts (such as
agentsensor run -- npm run dev), with no SDK imports, middleware, or config files needed. - Captures both server and browser crashes: Intercepts backend runtime exceptions, bundler compilation errors, and in-browser exceptions (
window.onerror、unhandledrejection, React component errors). - Source mapping: Automatically enables
--enable-source-maps, strips monorepo runner prefixes, collapsesnode_modulesnoise, and maps browser URLs back to the exact workspace file. - Real-time status board: Maintains
.agentsensor/status.json, recording the open/resolved status of errors so already-fixed errors do not distract agents; if an error occurs again, it is automatically reopened. - Automatic agent triggering: Sends MCP server instructions so that connected agents check
get_runtime_errorsfirst when they receive a bug or crash report. - 100% local: No accounts, no cloud, no telemetry, no background daemon.
Usage
- Run the dev server with AgentSensor: prefix your normal dev command with
npx -y agentsensor-mcp run --(or, after installingnpm i -g agentsensor-mcpglobally, useagentsensor run --). Terminal output and colors remain unchanged, and.agentsensor/is automatically added to.gitignore. - Connect an AI coding agent (one-time setup).
- Trigger a bug and ask the agent to fix it, for example: "Fix the error I just hit." The agent will call
get_runtime_errorsandget_error_detailto get the error details, and after fixing, mark the error as resolved viacheck_fixorresolve_error.
Use cases
- Developers using AI coding agents: no longer acting as a manual copy-paste bridge between terminal errors, Chrome DevTools, and chat windows.
- Full-stack teams: capture backend route crashes and frontend React component render errors in one unified stream.
- Monorepo teams: out-of-the-box automatic workspace root detection and sub-package path resolution.
Limitations
- Current status is pre-release (0.1), with rapid improvements expected before 1.0.
- Currently supports only the Node.js, JavaScript, and TypeScript ecosystem. Non-Node runtimes (Python, Go, Rust) are not yet supported; dedicated runtime hooks and stack trace parsers are planned for future releases.
- Other feature details, pricing model, platform support, etc. are not yet provided.