can1357/oh-my-pi · error · ToolError
Current adapter does not support ${description}
Error message
Current adapter does not support ${description} What it means
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.
Source
Thrown at packages/coding-agent/src/tools/debug.ts:566
throw new ToolError(
`launch program resolves to a directory: ${displayPath}. Pass an executable file path or choose an adapter that supports package directories.`,
);
}
interface DebugRenderArgs extends Partial<DebugParams> {}
function getActiveSessionSnapshot(): DapSessionSummary {
const snapshot = dapSessionManager.getActiveSession();
if (!snapshot) {
throw new ToolError("No active debug session. Launch or attach first.");
}
return snapshot;
}
function requireCapability(capability: keyof DapCapabilities, description: string): DapSessionSummary {
const snapshot = getActiveSessionSnapshot();
if (dapSessionManager.getCapabilities()?.[capability] !== true) {
throw new ToolError(`Current adapter does not support ${description}`);
}
return snapshot;
}
function resolveDisassemblyReference(memoryReference: string | undefined): string {
if (memoryReference) {
return memoryReference;
}
const snapshot = getActiveSessionSnapshot();
if (snapshot.instructionPointerReference) {
return snapshot.instructionPointerReference;
}
throw new ToolError(
"disassemble requires memory_reference unless the current stop location has an instruction pointer reference",
);
}
function summarizeDebugCall(args: DebugRenderArgs): string {View on GitHub (pinned to 9690622007)
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.
Example fix
// before
debugTool({ action: "disassemble", memory_reference: "0x1000" }) // debugpy lacks support
// after
debugTool({ action: "stack_trace" }) // pick an action the adapter supports, or attach with a capable adapter Defensive patterns
Strategy: validation
Validate before calling
const caps = await debugTool({ action: "snapshot" }); // snapshot exposes adapter capabilities
if (!caps.capabilities?.supportsDisassembleRequest) {
// skip disassemble or switch adapter
} Type guard
function supports(cap: Record<string, unknown> | undefined, key: string): cap is Record<string, unknown> {
return !!cap && cap[key] === true;
} Try / catch
try {
return await debugTool({ action: "disassemble", memory_reference });
} catch (e) {
if (String(e).startsWith("Current adapter does not support")) {
return null; // feature unsupported by this adapter
}
throw e;
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- launch program resolves to a directory: ${displayPath}. Pass
- No active debug session. Launch or attach first.
- disassemble requires memory_reference unless the current sto
- program is required for launch
- No debugger adapter available. Installed adapters: ${getConf
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/97b026c25f7d811a.
Report an issue: GitHub.