{"record":{"id":"bc246a27420d179f","repo":"earendil-works/pi","slug":"extension-failed-blocking-execution-string-err","errorCode":null,"errorMessage":"Extension failed, blocking execution: ${String(err)}","messagePattern":"Extension failed, blocking execution: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/core/agent-session.ts","lineNumber":502,"sourceCode":"\tprivate _installAgentToolHooks(): void {\n\t\tthis.agent.beforeToolCall = async ({ toolCall, args }) => {\n\t\t\tconst runner = this._extensionRunner;\n\t\t\tif (!runner.hasHandlers(\"tool_call\")) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\treturn await runner.emitToolCall({\n\t\t\t\t\ttype: \"tool_call\",\n\t\t\t\t\ttoolName: toolCall.name,\n\t\t\t\t\ttoolCallId: toolCall.id,\n\t\t\t\t\tinput: args as Record<string, unknown>,\n\t\t\t\t});\n\t\t\t} catch (err) {\n\t\t\t\tif (err instanceof Error) {\n\t\t\t\t\tthrow err;\n\t\t\t\t}\n\t\t\t\tthrow new Error(`Extension failed, blocking execution: ${String(err)}`);\n\t\t\t}\n\t\t};\n\n\t\tthis.agent.afterToolCall = async ({ toolCall, args, result, isError }) => {\n\t\t\tconst runner = this._extensionRunner;\n\t\t\tconst hookResult = runner.hasHandlers(\"tool_result\")\n\t\t\t\t? await runner.emitToolResult({\n\t\t\t\t\t\ttype: \"tool_result\",\n\t\t\t\t\t\ttoolName: toolCall.name,\n\t\t\t\t\t\ttoolCallId: toolCall.id,\n\t\t\t\t\t\tinput: args as Record<string, unknown>,\n\t\t\t\t\t\tcontent: result.content,\n\t\t\t\t\t\tdetails: result.details,\n\t\t\t\t\t\tisError,\n\t\t\t\t\t\tusage: result.usage,\n\t\t\t\t\t})\n\t\t\t\t: undefined;\n","sourceCodeStart":484,"sourceCodeEnd":520,"githubUrl":"https://github.com/earendil-works/pi/blob/4af9d21d3b4d664e4a29fcabfec85171077248e3/packages/coding-agent/src/core/agent-session.ts#L484-L520","documentation":"Error \"Extension failed, blocking execution: ${String(err)}\" thrown in earendil-works/pi.","triggerScenarios":"Thrown at packages/coding-agent/src/core/agent-session.ts:502 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4af9d21d3b4d664e4a29fcabfec85171077248e3","analyzedAt":"2026-08-24T13:07:14.692Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}