{"record":{"id":"b785299022aa33a6","repo":"deepseek-ai/deepseek-harness","slug":"run-code-run-is-over-string-runcontroller-signa-b78529","errorCode":null,"errorMessage":"run_code run is over (${String(runController.signal.reason)}); ${name} result discarded","messagePattern":"run_code run is over \\((.+?)\\); (.+?) result discarded","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/tools/src/code-mode.ts","lineNumber":595,"sourceCode":"              // failure cannot stop the turn through a recovering program.\n              if (result.concludesTurn) exec.concludeTurn()\n              settle(result)\n              // Backpressure on pending event-append tasks: each task retains\n              // a full result while a slow backend stores it, so the pool cap\n              // bounds their count. Beyond the cap, the\n              // ordered lane waits, so later sub-calls cannot start and\n              // pending I/O/memory cannot grow without bound.\n              while (logWork.size > maxParallel) await Promise.race(logWork)\n            },\n          })\n          wakeup()\n          void drive()\n        })\n        // A budget expiry or outer cancel that occurs while this call was in\n        // flight already aborted the dispatch; stop the program now rather\n        // than hand it a result from a run that is over.\n        if (runOver()) {\n          throw new Error(`run_code run is over (${String(runController.signal.reason)}); ${name} result discarded`)\n        }\n        // The worker turns a binding rejection into ToolCallError and adds\n        // only the binding name. Native content and internal error metadata\n        // stay outside the program-facing failure contract.\n        if (outcome.isError) throw new Error(outcome.message)\n        return outcome.value\n      }\n\n      // Null-prototype + defineProperty, mirroring the worker-side namespace\n      // build: a registered tool named `__proto__` must become an ordinary\n      // own key (a plain-object assignment would hit the prototype setter,\n      // silently dropping the binding), and the runtime host resolves\n      // binding names as own properties only.\n      const functions: Record<string, CodeBindingFunction> = Object.create(null) as Record<string, CodeBindingFunction>\n      // Enumerate the CALLING AGENT's visible set (scoped tools join,\n      // restricted globals vanish) — the same view the SDK section declared,\n      // so a program can bind exactly what its prompt promised; sub-dispatch\n      // re-resolves per call through the same view (exec.agent threads down).","sourceCodeStart":577,"sourceCodeEnd":613,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/core/tools/src/code-mode.ts#L577-L613","documentation":"Error \"run_code run is over (${String(runController.signal.reason)}); ${name} result discarded\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/core/tools/src/code-mode.ts:595 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}