different-ai/openwork · error · ToolRuntimeError
InvalidDataValue
InvalidDataValue
Error message
Binding name '${name}' is reserved by CodeMode. What it means
Error "Binding name '${name}' is reserved by CodeMode." thrown in different-ai/openwork.
Source
Thrown at packages/codemode/src/interpreter/runtime.ts:3374
limits.maxToolCalls,
searchIndex,
hooks,
)
const logs: Array<string> = []
const logged = () => (logs.length > 0 ? { logs: [...logs] } : {})
if (options.code.trim().length === 0) {
return Effect.succeed({
ok: false,
error: { kind: "ParseError", message: "Code cannot be empty." },
toolCalls: tools.calls,
})
}
const operation = Effect.gen(function* () {
const bindings = Object.entries(options.bindings ?? {}).map(([name, value]) => {
if (name === "tools" || name === "$codemode") {
throw new ToolRuntimeError("InvalidDataValue", `Binding name '${name}' is reserved by CodeMode.`)
}
if (!identifierSegment.test(name)) {
throw new ToolRuntimeError("InvalidDataValue", `Binding name '${name}' must be a valid JavaScript identifier.`)
}
return [name, copyIn(value, `Binding '${name}'`)] as const
})
const program = parseProgram(options.code)
const interpreter = new Interpreter<Services<Tools>>(tools.invoke, tools.keys, bindings, logs)
const value = yield* interpreter.run(program)
const result = copyOut(copyIn(value, "Execution result"), true) as DataValue
return {
ok: true,
value: result,
...logged(),
toolCalls: tools.calls,
} satisfies Result
}).pipe((program) => {
const timeoutMs = limits.timeoutMsView on GitHub (pinned to 2b7df46e8a)
When it happens
Trigger: Thrown at packages/codemode/src/interpreter/runtime.ts:3374 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01).
Data as JSON: /api/errors/6bdd7becc495e9de.
Report an issue: GitHub.