deepseek-ai/deepseek-harness · error · Error
run_in_background is disabled for this tool instance (enable
Error message
run_in_background is disabled for this tool instance (enableRunInBackground: false)
What it means
Error "run_in_background is disabled for this tool instance (enableRunInBackground: false)" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/subagent/tool-subagent/src/index.ts:264
interface DelegationRunRequest {
readonly run_in_background?: boolean
}
interface DelegationRunSpec {
readonly runInBackground: boolean
}
/** Resolve the model's optional scheduling request into one execution route. */
function resolveDelegationRun(
request: DelegationRunRequest,
options: { readonly backgroundEnabled: boolean; readonly continuable: boolean },
): DelegationRunSpec {
if (!options.backgroundEnabled) {
// The validator permits undeclared keys, so schema omission also needs
// execution-time enforcement.
if (request.run_in_background === true) {
throw new Error('run_in_background is disabled for this tool instance (enableRunInBackground: false)')
}
return { runInBackground: false }
}
return {
// Continuable work is independently scheduled unless the caller explicitly
// needs the result before its next action. One-shot policy keeps its existing
// foreground default because its background result requires Task collection.
runInBackground: request.run_in_background ?? options.continuable,
}
}
export function apply(ctx: Context, config: Config): void {
// Direct apply() bypasses Schemastery's numeric constraints. A direct-apply
// omission stays capless (the schema default only runs through the loader).
if (config.maxDepth !== 'provider-managed') assertSubagentMaxDepth(config.maxDepth)
// Reject an empty explicit filter at load instead of failing every delegation.
if (config.toolFilter !== undefined && config.toolFilter.allow === undefined && config.toolFilter.deny === undefined) {
throw new Error('tool-subagent: `toolFilter` is configured but names neither `allow` nor `deny` — remove the key or fill the filter')View on GitHub (pinned to b150a551b8)
Solutions
- Set enableRunInBackground: true on the tool instance, or run the subagent in the foreground.
When it happens
Trigger: Thrown at packages/subagent/tool-subagent/src/index.ts:264 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/36b5c9d38a57d750.
Report an issue: GitHub.