{"record":{"id":"97b026c25f7d811a","repo":"can1357/oh-my-pi","slug":"current-adapter-does-not-support-description","errorCode":null,"errorMessage":"Current adapter does not support ${description}","messagePattern":"Current adapter does not support (.+?)","errorType":"exception","errorClass":"ToolError","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/tools/debug.ts","lineNumber":566,"sourceCode":"\tthrow new ToolError(\n\t\t`launch program resolves to a directory: ${displayPath}. Pass an executable file path or choose an adapter that supports package directories.`,\n\t);\n}\n\ninterface DebugRenderArgs extends Partial<DebugParams> {}\n\nfunction getActiveSessionSnapshot(): DapSessionSummary {\n\tconst snapshot = dapSessionManager.getActiveSession();\n\tif (!snapshot) {\n\t\tthrow new ToolError(\"No active debug session. Launch or attach first.\");\n\t}\n\treturn snapshot;\n}\n\nfunction requireCapability(capability: keyof DapCapabilities, description: string): DapSessionSummary {\n\tconst snapshot = getActiveSessionSnapshot();\n\tif (dapSessionManager.getCapabilities()?.[capability] !== true) {\n\t\tthrow new ToolError(`Current adapter does not support ${description}`);\n\t}\n\treturn snapshot;\n}\n\nfunction resolveDisassemblyReference(memoryReference: string | undefined): string {\n\tif (memoryReference) {\n\t\treturn memoryReference;\n\t}\n\tconst snapshot = getActiveSessionSnapshot();\n\tif (snapshot.instructionPointerReference) {\n\t\treturn snapshot.instructionPointerReference;\n\t}\n\tthrow new ToolError(\n\t\t\"disassemble requires memory_reference unless the current stop location has an instruction pointer reference\",\n\t);\n}\n\nfunction summarizeDebugCall(args: DebugRenderArgs): string {","sourceCodeStart":548,"sourceCodeEnd":584,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/tools/debug.ts#L548-L584","documentation":"The requested debug action needs a DAP capability (e.g. disassembly, conditional breakpoints, restart) that the connected adapter did not advertise as `true` in its DAP Capabilities response. requireCapability checks `dapSessionManager.getCapabilities()[capability] !== true` after confirming an active session exists. The tool fails fast instead of sending a request the adapter would reject or mishandle.","triggerScenarios":"Calling an action gated behind a capability (requireCapability call sites in execute) — e.g. disassemble, restart, or other feature-specific actions — against an adapter whose capabilities response reports the feature as false or omits it.","commonSituations":"Using disassemble with debugpy (no disassembly support); expecting restart-frame behavior on adapters that don't implement it; an older adapter version lacking a newer DAP feature; attaching to a runtime with limited DAP support.","solutions":["Use an adapter/runtime that supports the capability (e.g. for disassembly use an adapter that reports supportsDisassembleRequest).","Drop or replace the unsupported action with one the adapter advertises.","Upgrade the adapter binary/config in the workspace DAP adapter config to a version that supports the feature.","Read the session capabilities snapshot and branch your automation on it before issuing the action."],"exampleFix":"// before\ndebugTool({ action: \"disassemble\", memory_reference: \"0x1000\" }) // debugpy lacks support\n// after\ndebugTool({ action: \"stack_trace\" }) // pick an action the adapter supports, or attach with a capable adapter","handlingStrategy":"validation","validationCode":"const caps = await debugTool({ action: \"snapshot\" }); // snapshot exposes adapter capabilities\nif (!caps.capabilities?.supportsDisassembleRequest) {\n  // skip disassemble or switch adapter\n}","typeGuard":"function supports(cap: Record<string, unknown> | undefined, key: string): cap is Record<string, unknown> {\n  return !!cap && cap[key] === true;\n}","tryCatchPattern":"try {\n  return await debugTool({ action: \"disassemble\", memory_reference });\n} catch (e) {\n  if (String(e).startsWith(\"Current adapter does not support\")) {\n    return null; // feature unsupported by this adapter\n  }\n  throw e;\n}","preventionTips":["Read the DAP capabilities snapshot before using advanced features.","Match the action to the adapter's advertised feature set.","Keep adapter binaries updated for newer DAP capabilities."],"tags":["debug","dap","capability","unsupported-feature"],"backgroundTag":"adapter-capability-missing","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}