deepseek-ai/deepseek-harness · error · Error
Parameter ` ` is empty for command
Error message
Parameter `${parameter}` is empty for command: ${command} What it means
Empty-argument sentinel from requiredForCommand with allowEmpty=false: the parameter was present but an empty string, which the command treats as missing. Input validation only; the empty parameter named in the message is at fault.
Solutions
- Re-emit the tool call with the named parameter filled in: the message names both the parameter (e.g. old_str, insert_line) and the command, and empty strings are rejected where allowEmpty is false, so supply actual content rather than "".
- Read the command's requirements before retrying: view needs no editable fields, str_replace requires a nonempty old_str, insert requires insert_line; a retry without the parameter will fail identically.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/fs/tool-str-replace-editor/src/index.ts:131 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24).
Data as JSON: /api/errors/5c1ec29c92ad20ef.
Report an issue: GitHub.
Appendix: source
Thrown at packages/fs/tool-str-replace-editor/src/index.ts:131
}
if (info.type === 'directory' && command !== 'view') {
throw new FsError(
`The path ${target.displayPath} is a directory and only the \`view\` command can be used on directories`,
'FS_NOT_REGULAR_FILE',
)
}
return info
}
function requiredForCommand(
value: string | undefined,
parameter: string,
command: string,
allowEmpty = true,
): string {
if (value === undefined) throw new Error(`Parameter \`${parameter}\` is required for command: ${command}`)
if (!allowEmpty && value.length === 0) {
throw new Error(`Parameter \`${parameter}\` is empty for command: ${command}`)
}
return value
}
function formatFileView(
path: string,
content: string,
maxOutputChars: number,
viewRange?: number[],
): string {
const allLines = content.split('\n')
let lines = allLines
let initialLine = 1
let finalLine: number | undefined
let prompt = `Here's the content of ${path} with line numbers (which has a total of ${allLines.length} lines)`
if (viewRange !== undefined) {
const [requestedInitialLine, requestedFinalLine] = viewRange
if (View on GitHub (pinned to b150a551b8)