Skip to content

Building AI agents, atomically

Map the MCP error-envelope behavior

Eigenwisec9b399851135
diff --git a/.claude/.codebase-info/.map-state.json b/.claude/.codebase-info/.map-state.json
index ce10a17..74138df 100644
--- a/.claude/.codebase-info/.map-state.json
+++ b/.claude/.codebase-info/.map-state.json
@@ -2,8 +2,8 @@
"schemaVersion": 1,
"tool": "codebase-mapper",
"version": "2.15.10",
- "mappedAt": "2026-10-13",
- "gitCommit": "8f915c9dd4d8268571f42ee1c32e730b80a49be6",
+ "mappedAt": "2026-10-14",
+ "gitCommit": "bf0d5cf0ac56ea9e07cdd842e18b18612c9fdaac",
"documents": [
"architecture.md",
"coding-style.md",
@@ -20,7 +20,7 @@
"INDEX.md": "dd70bf99170b2677ba146497792392e899cc1b7b37d93ea8f03b390944cb6c73",
"architecture.md": "8e6be8d2795231ea5919d7cdc23a201595f9fed9724b635e6cc686b2bf24581f",
"coding-style.md": "b63e8dff06d16a2d882f02624c62f490291317aec8b3032f6d79b3ee035e8567",
- "communication.md": "62f68e393ae8ff624e46ca9380ee7e91341ca46233efcd729aa3708e16fda66c",
+ "communication.md": "2de8a4c97c6dcd8b9dd259a8728a25c94514f89e3b0cee35af2edbe847c064c0",
"dependencies.md": "b445a920c121e27006fec824add6865d01cf71212a517e5ff8b2058d3999037a",
"directory-structure.md": "5bd6d10635f7103c9a13c546e76d0b39febc746bb926acf3d90ebe5e369b4807",
"entry-points.md": "62fd8ff478fc27c3658776626059bdd4101cab12a74a48cdd8787f9ca7b83f97",
diff --git a/.claude/.codebase-info/communication.md b/.claude/.codebase-info/communication.md
index d846b8c..940e10f 100644
--- a/.claude/.codebase-info/communication.md
+++ b/.claude/.codebase-info/communication.md
@@ -31,6 +31,7 @@ providers and external tools.
- Discovery follows tool, resource, template and prompt cursors. Template continuation errors propagate.
- Schema references decode escaped definition names and support non-object definitions.
- Typed SDK tool results use structured content only when it is non-None, then use the existing validated JSON-text fallback. Present empty structured data retains precedence. Mapping adapters keep their separate validation contract.
+- SDK `CallToolResult` and strictly validated mapping envelopes with `isError=True` raise a `RuntimeError` before typed or generic output parsing. The message uses `TextContent` only (meaningful fallback when no text); `structuredContent`, `_meta` and binary blocks never enter messages or logs. Raw application dictionaries that merely contain `isError`/`name` keys (even with a string `content`) stay ordinary outputs.
## Hooks / observability
- Built on Instructor's hook system: `register_hook(event, handler)`, `unregister_hook`,