slopus/happy · error
Codex goal actions are not supported by this runtime
Error message
Codex goal actions are not supported by this runtime
What it means
The goal-action handler calls handleCodexGoalCommand(); if it returns false, the current Codex runtime/transport does not implement that goal capability, so the handler throws. This is a capability gate, not a data error — the action was recognized but this runtime can't execute it.
Source
Thrown at packages/happy-cli/src/codex/runCodex.ts:636
} catch (error) {
logger.debug('[Codex] Goal command API failed; falling back to normal turn:', error);
return false;
}
};
session.rpcHandlerManager.registerHandler('goal-action', async (params: Record<string, unknown>) => {
const command = parseCodexGoalActionParams(params);
if (!command) {
throw new Error('Unsupported Codex goal action');
}
const threadId = client.threadId;
if (!threadId) {
throw new Error('No active Codex thread');
}
const handled = await handleCodexGoalCommand(command, threadId);
if (!handled) {
throw new Error('Codex goal actions are not supported by this runtime');
}
return { ok: true };
});
// Approval handler: routes server → client approval requests to our permission handler
client.setApprovalHandler(async (params) => {
const toolName = params.type === 'exec'
? 'CodexBash'
: params.type === 'patch'
? 'CodexPatch'
: (params.toolName ?? 'McpTool');
const input = params.type === 'exec'
? { command: params.command, cwd: params.cwd }
: params.type === 'patch'
? { changes: params.fileChanges }
: (params.input ?? {});
const activePermissionMode = activeTurnPermissionMode ?? remoteModeState.currentPermissionMode;View on GitHub (pinned to b824cd0a46)
Solutions
- Upgrade the Codex CLI (npm install -g @openai/codex) to a version supporting goal actions
- Upgrade happy-cli to the latest release
- Hide/disable goal actions in the client for sessions on unsupported runtimes
- Use the interactive Codex session directly for the goal operation as a workaround
Example fix
// before $ happy codex ... # old codex binary -> 'not supported by this runtime' // after $ npm install -g @openai/codex@latest && npm update -g happy-cli
Defensive patterns
Strategy: fallback
Validate before calling
// Query runtime capabilities before sending:
const supportsGoals = await rpc('capabilities', {}).then(c => c.goalActions === true, () => false);
if (!supportsGoals) {
console.warn('This runtime does not support goal actions.');
} Try / catch
try {
await rpc('goal-action', params);
} catch (error) {
if ((error as Error).message.includes('not supported by this runtime')) {
// fall back to manual handling in the interactive session
} else { throw error; }
} Prevention
- Advertise goal-action support in a capabilities handshake
- Upgrade the Codex CLI to the minimum version that implements goal RPCs
- Feature-flag goal actions per runtime in the client
When it happens
Trigger: Sending a goal action through a runtime whose handleCodexGoalCommand returns false — e.g. app-server transport lacking rollback/goal support, or the action type routed to a runtime that only supports a subset of goal actions.
Common situations: Older Codex CLI versions whose app-server lacks the needed RPC; running a Codex session mode that disables goal controls; feature shipped to the app before CLI support landed.
Related errors
- Unsupported Codex goal action
- The chosen rewind point is no longer present in the source C
- Claude clear goal action is not supported
- Claude edit goal action is not supported
- No active Codex thread
AI-assisted analysis of slopus/happy@b824cd0a46 (2026-08-31).
Data as JSON: /api/errors/9ab23d8c750c5145.
Report an issue: GitHub.