Skip to content

Commit bec7f5f

Browse files
committed
fix(omp): log why the MCP catalog was skipped
A catalog endpoint failure dropped the catalog silently, leaving only a restart-required status with no trace of the cause. Fixed by Claude Opus 5.5 in Claude Code (T3 Code).
1 parent 89c3e30 commit bec7f5f

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

‎packages/provider-omp/src/server/adapter.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -948,6 +948,10 @@ export const makeOmpAdapterV2 = Effect.fn("OmpAdapter.make")(function* (
948948
catch: (cause) => protocol("OMP native host tool installation failed", cause),
949949
});
950950
if (authorized.catalogInstalled) yield* catalogs.acknowledgeCatalogEndpoint(config);
951+
else
952+
yield* Effect.logWarning("OMP MCP catalog unavailable; T3 tools only", {
953+
cause: authorized.catalogError,
954+
});
951955
}
952956
installedConfig = config;
953957
},

‎packages/provider-omp/src/server/toolBridge.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ export interface AuthorizedMcpTools {
198198
readonly readOnlyT3ToolNames: ReadonlySet<string>;
199199
/** False when the catalog endpoint failed; T3's own tools are still available. */
200200
readonly catalogInstalled: boolean;
201+
readonly catalogError?: unknown;
201202
callTool(
202203
name: string,
203204
args: Record<string, unknown>,
@@ -228,6 +229,7 @@ export async function connectAuthorizedMcpTools(
228229
const routes = new Map(t3.tools.map((tool) => [tool.name, t3.client]));
229230
if (routes.size !== t3.tools.length) throw new Error("Invalid or duplicate MCP catalog tool");
230231
let catalogInstalled = true;
232+
let catalogError: unknown;
231233
if (config.catalogEndpoint && config.catalogEndpoint !== config.endpoint) {
232234
// Like the other providers, a failing catalog server costs only the catalog, not the session.
233235
try {
@@ -239,13 +241,15 @@ export async function connectAuthorizedMcpTools(
239241
} catch (error) {
240242
if (signal.aborted) throw error;
241243
catalogInstalled = false;
244+
catalogError = error;
242245
}
243246
}
244247
return {
245248
tools,
246249
t3ToolNames,
247250
readOnlyT3ToolNames,
248251
catalogInstalled,
252+
...(catalogInstalled ? {} : { catalogError }),
249253
callTool: async (name, args, callSignal, onProgress) => {
250254
const client = routes.get(name);
251255
if (!client) throw new Error("Tool unavailable for this authorized catalog");

0 commit comments

Comments
 (0)