different-ai/openwork · error · InterpreterRuntimeError
Unknown identifier '${name}'.
Error message
Unknown identifier '${name}'. What it means
Error "Unknown identifier '${name}'." thrown in different-ai/openwork.
Source
Thrown at packages/codemode/src/interpreter/runtime.ts:3291
const binding = this.resolveBinding(name)
if (!binding) {
throw new InterpreterRuntimeError(`Unknown identifier '${name}'.`, node).as("ReferenceError")
}
// A parameter default that forward-references a later (not-yet-bound) parameter - JS TDZ.
if (binding.initialized === false) {
throw new InterpreterRuntimeError(`Cannot access '${name}' before initialization.`, node).as("ReferenceError")
}
return binding.value
}
private setIdentifierValue(name: string, value: unknown, node: AstNode): unknown {
const binding = this.resolveBinding(name)
if (!binding) {
throw new InterpreterRuntimeError(`Unknown identifier '${name}'.`, node).as("ReferenceError")
}
if (!binding.mutable) {
throw new InterpreterRuntimeError(`Cannot assign to constant '${name}'.`, node).as("TypeError")
}
binding.value = value
return value
}
private resolveBinding(name: string): Binding | undefined {
for (let index = this.scopes.length - 1; index >= 0; index -= 1) {
const scope = this.scopes[index]
const binding = scope?.get(name)
if (binding) {
return binding
}View on GitHub (pinned to 2b7df46e8a)
When it happens
Trigger: Thrown at packages/codemode/src/interpreter/runtime.ts:3291 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/e672eb7c2c8ec69a.
Report an issue: GitHub.