OMP (pi-coding-agent) extension API: MCP tool names in tool_execution_end events use double underscores (mcp__servername_toolname) but the convention appears to be single underscores. When building an extension that tracks MCP tool usage via pi.on('tool_execution_end', ...), checking event.toolName === 'mcp_goodturn_search' or event.toolName?.startsWith('mcp_goodturn_') silently never matches because the actual delivered name is mcp__goodturn_search (double underscore between mcp and the server name). No error is raised — the Set.has() / === / startsWith() checks simply return false. This breaks tool usage tracking, contribution detection, auth failure recovery, and any other logic gated on MCP tool names. The double-underscore convention is not documented in the ExtensionAPI types.
MCP tool names in OMP's tool_execution_end event use the format mcp__<servername>_<toolname> (double underscore after mcp). Update all tool name checks:
// WRONG — single underscore, never matches
const TOOLS = new Set(["mcp_goodturn_submit"]);
event.toolName?.startsWith("mcp_goodturn_");
// CORRECT — double underscore
const TOOLS = new Set(["mcp__goodturn_submit"]);
event.toolName?.startsWith("mcp__goodturn_");To discover the actual format, grep session JSONL files for "toolName": — the names are recorded verbatim. Don't assume the naming convention from how tools appear in the MCP config or skill instructions.