can1357/oh-my-pi · error · ToolError
data_id is required for remove_data_breakpoint
Error message
data_id is required for remove_data_breakpoint
What it means
The remove_data_breakpoint action throws this ToolError when params.data_id is missing. Removal targets the exact data_id the breakpoint was created with; without it the tool refuses the request. Capability supportsDataBreakpoints is checked first.
Source
Thrown at packages/coding-agent/src/tools/debug.ts:910
if (!params.data_id) {
throw new ToolError("data_id is required for set_data_breakpoint");
}
const response = await dapSessionManager.setDataBreakpoint(
params.data_id,
params.access_type,
params.condition,
params.hit_condition,
combinedSignal,
timeoutSec * 1000,
);
details.snapshot = response.snapshot;
details.dataBreakpoints = response.breakpoints;
return result.text(formatDataBreakpoints(response.breakpoints)).done();
}
case "remove_data_breakpoint": {
requireCapability("supportsDataBreakpoints", "data breakpoints");
if (!params.data_id) {
throw new ToolError("data_id is required for remove_data_breakpoint");
}
const response = await dapSessionManager.removeDataBreakpoint(
params.data_id,
combinedSignal,
timeoutSec * 1000,
);
details.snapshot = response.snapshot;
details.dataBreakpoints = response.breakpoints;
return result.text(formatDataBreakpoints(response.breakpoints)).done();
}
case "continue": {
const outcome = await dapSessionManager.continue(combinedSignal, timeoutSec * 1000);
details.snapshot = outcome.snapshot;
details.state = outcome.state;
details.timedOut = outcome.timedOut;
return result.text(buildOutcomeText(outcome, timeoutSec, "Continue")).done();
}
case "step_over": {View on GitHub (pinned to 9690622007)
Solutions
- Pass the same data_id returned by data_breakpoint_info and used in set_data_breakpoint
- List current data breakpoints (via snapshot) and copy the id from there
- Use the clear-all/cancel action if the tool exposes one, instead of empty params
Example fix
// before
await debugTool.run({ action: 'remove_data_breakpoint' });
// after
await debugTool.run({ action: 'remove_data_breakpoint', data_id: 'var-myVar:write' }); Defensive patterns
Strategy: validation
Validate before calling
if (typeof params.data_id !== 'string' || params.data_id.length === 0) {
throw new Error('remove_data_breakpoint needs the data_id used at set time');
} Type guard
function hasDataId(p) {
return typeof p === 'object' && p !== null
&& typeof (p as { data_id?: unknown }).data_id === 'string'
&& (p as { data_id: string }).data_id.length > 0;
} Try / catch
try {
await debugTool.run({ action: 'remove_data_breakpoint', ...params });
} catch (err) {
if (err instanceof ToolError && err.message.includes('data_id is required')) {
// read current data breakpoints from the session snapshot to recover ids, then retry
} else throw err;
} Prevention
- Persist the data_id from the set call alongside your watch list
- Distinguish data_id from the original variable name
- Use the snapshot's dataBreakpoints listing as the source of truth for removal
When it happens
Trigger: Calling action=remove_data_breakpoint without params.data_id or with an empty string.
Common situations: Caller tries to clear all data breakpoints with empty params; data_id from the set step was not persisted; mixing up data_id with the original variable name.
Understand the failure class
Background: Missing required parameter errors: what 'X is required' and 'the required X param is missing' mean, and how to fix them — this error's family across 27 libraries.
Related errors
- name is required for data_breakpoint_info
- data_id is required for set_data_breakpoint
- set_breakpoint requires file+line or function
- remove_breakpoint requires file+line or function
- instruction_reference is required for set_instruction_breakp
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/1bca4c558a7f8a79.
Report an issue: GitHub.