can1357/oh-my-pi · error · Error
This extension host does not support service-tier actions
Error message
This extension host does not support service-tier actions
What it means
Extension host capability gating: throwUnsupportedServiceTierAction is the shared 'never' thrower used when a host implementation does not provide service-tier actions. An extension calling service-tier APIs on such a host gets this Error, since the host cannot fulfill the request.
Source
Thrown at packages/coding-agent/src/extensibility/extensions/runner.ts:90
UserBashEvent,
UserBashEventResult,
UserPythonEvent,
UserPythonEventResult,
} from "./types";
/** Combined result from all before_agent_start handlers */
interface BeforeAgentStartCombinedResult {
messages?: NonNullable<BeforeAgentStartEventResult["message"]>[];
systemPrompt?: string[];
}
export type ExtensionErrorListener = (error: ExtensionError) => void;
export const EXTENSION_HANDLER_TIMEOUT_MS = 30_000;
let extensionHandlerTimeoutMs = EXTENSION_HANDLER_TIMEOUT_MS;
function throwUnsupportedServiceTierAction(): never {
throw new Error("This extension host does not support service-tier actions");
}
export function testSetExtensionHandlerTimeoutMs(timeoutMs: number): void {
extensionHandlerTimeoutMs = timeoutMs;
}
function normalizeHandlerTimeout(timeoutMs: number): number {
return Number.isFinite(timeoutMs) && timeoutMs > 0 ? timeoutMs : EXTENSION_HANDLER_TIMEOUT_MS;
}
/**
* Dedicated cap for `session_shutdown` handlers. The generic 30s budget is
* appropriate for events extensions can observe (e.g. `session_start`,
* `before_provider_request`), but `session_shutdown` is fire-and-forget
* teardown — extensions receive no result and the user has already asked to
* leave. A hung handler (e.g. an extension waiting on a stuck IPC pipe to a
* companion app) MUST NOT hold Ctrl+C / `/exit` hostage for the full window.
* See issue #2600.View on GitHub (pinned to 9690622007)
Solutions
- Feature-detect before calling: check the host's supported capabilities/hasServiceTier flag if exposed, and skip tier logic otherwise.
- Wrap service-tier calls in try-catch and degrade gracefully when the host lacks support.
- Run the extension only in hosts that implement service-tier actions, or update the host to provide them.
Example fix
// before
runtime.setServiceTier(family, tier);
// after
try {
runtime.setServiceTier(family, tier);
} catch (err) {
if (err.message.includes('service-tier actions')) return; // host unsupported
throw err;
} Defensive patterns
Strategy: try-catch
Validate before calling
if (hostCapabilities?.serviceTier === true) {
runtime.setServiceTier(family, tier);
} Type guard
function supportsServiceTiers(rt: IExtensionRuntime): boolean {
return typeof rt.setServiceTier === 'function' && rt.serviceTierSupported === true;
} Try / catch
try {
runtime.setServiceTier(family, tier);
} catch (err) {
if (err.message.includes('service-tier actions')) {
logger.debug('host lacks service-tier support, skipping');
return;
}
throw err;
} Prevention
- Treat service tiers as an optional capability; always wrap calls.
- Document which hosts your extension requires and fail fast at load otherwise.
- Feature-detect via a capabilities API where available instead of hardcoding host assumptions.
- Re-check capability assumptions when embedding the runtime in new hosts or after version upgrades.
When it happens
Trigger: An extension calls getServiceTiers()/setServiceTier() through an IExtensionRuntime whose concrete host (e.g. a minimal runner, RPC host, or embedded host) wires service-tier methods to throwUnsupportedServiceTierAction.
Common situations: Extension written for the full CLI host is loaded into a lightweight/embedded host that lacks service-tier support; capability matrix changed between versions and code assumes service tiers exist everywhere.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Invalid service tier "${String(tier)}" for family "${String(
- Capability "${def.id}" is already defined
- Unknown capability: "${capabilityId}". Define it first with
- Unknown capability: "${capabilityId}"
- Pending action store unavailable for custom tools in this ru
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/881facfebdb56683.
Report an issue: GitHub.