{"record":{"id":"12e47fd6966fa361","repo":"can1357/oh-my-pi","slug":"julia-backend-is-unavailable-in-this-session-pass","errorCode":null,"errorMessage":"Julia backend is unavailable in this session. Pass language: ${alternatives.join(\" or \")} or install Julia.","messagePattern":"Julia backend is unavailable in this session\\. Pass language: (.+?) or install Julia\\.","errorType":"validation","errorClass":"ToolError","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/tools/eval.ts","lineNumber":288,"sourceCode":"\t\t\t\tBoolean,\n\t\t\t);\n\t\t\tthrow new ToolError(\n\t\t\t\talternatives.length > 0\n\t\t\t\t\t? `Ruby backend is unavailable in this session. Pass language: ${alternatives.join(\" or \")} or install Ruby.`\n\t\t\t\t\t: 'Ruby backend is unavailable in this session. Install Ruby to use language: \"rb\".',\n\t\t\t);\n\t\t}\n\t\treturn { backend: rubyBackend };\n\t}\n\tif (language === \"julia\") {\n\t\tif (!allowJl) throw new ToolError(\"Julia backend is disabled (PI_JL=0 or eval.jl = false).\");\n\t\tconst available = await juliaBackend.isAvailable(session, probeOpts);\n\t\tthrowIfAborted(probeOpts?.signal);\n\t\tif (!available) {\n\t\t\tconst alternatives = [allowJs ? '\"js\"' : null, allowPy ? '\"py\"' : null, allowRb ? '\"rb\"' : null].filter(\n\t\t\t\tBoolean,\n\t\t\t);\n\t\t\tthrow new ToolError(\n\t\t\t\talternatives.length > 0\n\t\t\t\t\t? `Julia backend is unavailable in this session. Pass language: ${alternatives.join(\" or \")} or install Julia.`\n\t\t\t\t\t: 'Julia backend is unavailable in this session. Install Julia to use language: \"jl\".',\n\t\t\t);\n\t\t}\n\t\treturn { backend: juliaBackend };\n\t}\n\tif (!allowJs) throw new ToolError(\"JavaScript backend is disabled (PI_JS=0 or eval.js = false).\");\n\treturn { backend: jsBackend };\n}\nfunction formatEvalInputLanguage(value: string): string {\n\tif (value === \"py\" || value === \"python\") return \"python\";\n\tif (value === \"js\" || value === \"javascript\") return \"javascript\";\n\tif (value === \"rb\" || value === \"ruby\") return \"ruby\";\n\tif (value === \"jl\" || value === \"julia\") return \"julia\";\n\treturn value;\n}\n","sourceCodeStart":270,"sourceCodeEnd":306,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/tools/eval.ts#L270-L306","documentation":"resolveBackend throws this when the Julia backend is allowed by config (eval.jl true / PI_JL not 0) but juliaBackend.isAvailable() reports the runtime cannot be used in this session (Julia not installed or not launchable). The message enumerates the alternative backends that ARE enabled so the caller can switch languages. This is a runtime availability failure, distinct from the config-disabled error.","triggerScenarios":"Calling eval with language \"jl\" when Julia is not installed or not resolvable on PATH, while at least one of PI_JS/eval.js, PI_PY/eval.py, or PI_RB/eval.rb is enabled; the alternatives list is built from those allowances (empty list yields the \"Install Julia\" variant instead).","commonSituations":"Fresh machine or container image without Julia installed; Julia not on PATH inside the agent's environment; a cell running on a host where the session was spawned without shell PATH inheritance.","solutions":["Install Julia (e.g. juliaup or your package manager) so the runtime is on PATH.","Verify with `julia --version` in the same environment/session where the agent runs.","Switch the cell to an enabled alternative: pass language \"js\" or \"py\" (or \"rb\") as listed in the error message."],"exampleFix":"// before\n{ \"language\": \"jl\", \"code\": \"println(1+1)\" }\n// after (fallback to enabled backend)\n{ \"language\": \"py\", \"code\": \"print(1+1)\" }","handlingStrategy":"fallback","validationCode":"const backends = resolveEvalBackends(session);\nconst alt = backends.js ? \"js\" : backends.python ? \"py\" : backends.ruby ? \"rb\" : null;\nif (!backends.julia && !alt) { /* no eval backend usable */ }","typeGuard":"function isJuliaAvailableError(msg: string): boolean { return msg.includes(\"Julia backend is unavailable\"); }","tryCatchPattern":"try {\n  return await evalTool.execute(id, { language: \"jl\", code }, signal);\n} catch (e) {\n  if (e instanceof ToolError && e.message.includes(\"Julia backend is unavailable\")) {\n    return evalTool.execute(id, { language: \"py\", code }, signal); // fallback backend\n  }\n  throw e;\n}","preventionTips":["Verify `julia --version` works in the target environment before scheduling Julia cells.","Bake Julia into container images used by the agent when Julia workloads are expected.","Parse the alternatives list from the error message to pick a fallback automatically."],"tags":["julia","runtime-unavailable","eval-tool","environment"],"backgroundTag":"runtime-not-installed","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}