can1357/oh-my-pi · error

Vibe tools are unavailable in this session.

Error message

Vibe tools are unavailable in this session.

What it means

SessionTools.activateVibeTools() installs an ephemeral 'vibe' tool set, but the factory that creates those tools (#createVibeTools) is only injected when the session is constructed with vibe support enabled. When it is undefined, the method throws this Error before touching the tool registry, indicating this session simply cannot host vibe tools.

Source

Thrown at packages/coding-agent/src/session/session-tools.ts:572

				scope: "temporary",
				origin: "top-level",
			};
			return { name, description: tool.description, parameters: tool.parameters, sourceInfo };
		});
	}

	#wrapRuntimeTool(tool: AgentTool): AgentTool {
		const wrapped = wrapToolWithMetaNotice(tool);
		const extensionRunner = this.#host.extensionRunner();
		return extensionRunner ? new ExtensionToolWrapper(wrapped, extensionRunner) : wrapped;
	}

	/** Installs and activates the ephemeral vibe tool set. */
	activateVibeTools(baseToolNames: string[]): Promise<void> {
		return this.runToolRegistryMutation(async () => {
			const createVibeTools = this.#createVibeTools;
			if (!createVibeTools) {
				throw new Error("Vibe tools are unavailable in this session.");
			}

			const tools = createVibeTools();
			const vibeToolNames = tools.map(tool => tool.name);
			if (new Set(vibeToolNames).size !== vibeToolNames.length) {
				throw new Error("Vibe tool names must be unique.");
			}

			for (const tool of tools) {
				if (this.#toolRegistry.has(tool.name)) continue;
				this.#toolRegistry.set(tool.name, this.#wrapRuntimeTool(tool));
				this.#builtInToolNames.add(tool.name);
				this.#installedVibeToolNames.add(tool.name);
			}

			await this.#applyActiveToolsByName([...new Set([...baseToolNames, ...vibeToolNames])]);
		});
	}

View on GitHub (pinned to 9690622007)

Solutions

  1. Check whether the session supports vibe tools before activating (e.g. expose/inspect an availability flag or try to construct the factory yourself and pass it in).
  2. Create the session with vibe tool support enabled (supply createVibeTools factory at SessionTools construction).
  3. If vibe tools are intentionally unsupported here, skip activation rather than calling it.
  4. Update the package if a newer version gates the factory differently than your code expects.

Example fix

// before
await sessionTools.activateVibeTools(baseNames);
// after
if (sessionTools.hasVibeTools) {
  await sessionTools.activateVibeTools(baseNames);
} else {
  logger.warn("Vibe tools not available in this session");
}
Defensive patterns

Strategy: validation

Validate before calling

// gate the call on capability, e.g. via an exposed flag or option used at construction
if (!sessionOptions.createVibeTools) {
  logger.warn("Session created without vibe tool support; skipping activation");
} else {
  await sessionTools.activateVibeTools(baseToolNames);
}

Try / catch

try {
  await sessionTools.activateVibeTools(baseToolNames);
} catch (err) {
  if (err.message.includes("Vibe tools are unavailable")) {
    logger.warn("Vibe tools not supported in this session; continuing without them");
  } else throw err;
}

Prevention

When it happens

Trigger: Calling activateVibeTools on a SessionTools instance whose createVibeTools factory was never supplied at construction — e.g. sessions created without the vibe-tools option, or in builds/modes where the vibe toolset is not registered.

Common situations: SDK consumers enabling vibe mode on a plain session instead of a vibe-capable one; running an older/newer build where vibe tools are gated; a plugin or extension calling activateVibeTools unconditionally without checking availability.

Related errors


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