can1357/oh-my-pi · error · ToolError

Julia backend is disabled (PI_JL=0 or eval.jl = false).

Error message

Julia backend is disabled (PI_JL=0 or eval.jl = false).

What it means

The eval tool's backend resolver (resolveBackend) checks per-language allowances before probing the Julia runtime. This error means the Julia language backend is intentionally disabled by configuration, not merely unavailable. Allowance comes from the eval.jl setting (default false) with the PI_JL environment flag acting as an override (eval-backends.ts resolveEvalBackends: $flag("PI_JL", settings.julia)).

Source

Thrown at packages/coding-agent/src/tools/eval.ts:281

	}
	if (language === "ruby") {
		if (!allowRb) throw new ToolError("Ruby backend is disabled (PI_RB=0 or eval.rb = false).");
		const available = await rubyBackend.isAvailable(session, probeOpts);
		throwIfAborted(probeOpts?.signal);
		if (!available) {
			const alternatives = [allowJs ? '"js"' : null, allowPy ? '"py"' : null, allowJl ? '"jl"' : null].filter(
				Boolean,
			);
			throw new ToolError(
				alternatives.length > 0
					? `Ruby backend is unavailable in this session. Pass language: ${alternatives.join(" or ")} or install Ruby.`
					: 'Ruby backend is unavailable in this session. Install Ruby to use language: "rb".',
			);
		}
		return { backend: rubyBackend };
	}
	if (language === "julia") {
		if (!allowJl) throw new ToolError("Julia backend is disabled (PI_JL=0 or eval.jl = false).");
		const available = await juliaBackend.isAvailable(session, probeOpts);
		throwIfAborted(probeOpts?.signal);
		if (!available) {
			const alternatives = [allowJs ? '"js"' : null, allowPy ? '"py"' : null, allowRb ? '"rb"' : null].filter(
				Boolean,
			);
			throw new ToolError(
				alternatives.length > 0
					? `Julia backend is unavailable in this session. Pass language: ${alternatives.join(" or ")} or install Julia.`
					: 'Julia backend is unavailable in this session. Install Julia to use language: "jl".',
			);
		}
		return { backend: juliaBackend };
	}
	if (!allowJs) throw new ToolError("JavaScript backend is disabled (PI_JS=0 or eval.js = false).");
	return { backend: jsBackend };
}
function formatEvalInputLanguage(value: string): string {

View on GitHub (pinned to 9690622007)

Solutions

  1. Set the eval.jl setting to true in the session/project settings to enable the Julia backend.
  2. Set PI_JL=1 in the environment to override the setting for the current session.
  3. Re-run the eval cell with language "js" or "py" (or "rb" if enabled) instead of Julia.

Example fix

// before (settings file)
{ "eval": { "jl": false } }
// after
{ "eval": { "jl": true } }
// or in shell before launching
export PI_JL=1
Defensive patterns

Strategy: validation

Validate before calling

import { resolveEvalBackends } from "./eval-backends";
const backends = resolveEvalBackends(session);
if (!backends.julia) {
  // avoid the call: use another language or prompt user to enable eval.jl / PI_JL
}

Type guard

function juliaEnabled(b: { julia: boolean }): b is { julia: true } { return b.julia; }

Try / catch

try {
  await evalTool.execute(id, { language: "jl", code }, signal);
} catch (e) {
  if (e instanceof ToolError && e.message.includes("Julia backend is disabled")) {
    // fall back to an enabled language
  } else throw e;
}

Prevention

When it happens

Trigger: Calling the eval tool with language "jl" or "julia" when the setting eval.jl is false/unset (rb/jl are opt-in, default off) or PI_JL=0 is set in the environment. The check runs before juliaBackend.isAvailable is ever probed, so Julia being installed does not matter.

Common situations: A user asks the agent to run Julia code without ever enabling the opt-in Julia backend; a CI environment or project config sets PI_JL=0 to hard-disable it; a user upgraded from a config that assumed rb/jl default-on.

Related errors


AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31). Data as JSON: /api/errors/b10716684ccb4063. Report an issue: GitHub.