Skip to content

armgit / Orkas

Public Imported from GitHub
0

Orkas is an open-source (MIT), local-first AI team for your desktop: a Commander turns your goal into to-dos and coordinates 16 built-in specialist agents plus Claude Code, Codex, OpenCode, OpenClaw and Hermes, with projects, scheduled automations and connectors. Free app for macOS & Windows; built-in models or your own keys.

fix(codex): restore compatible app-server startup

IgnoreMeBut9ccafcee31a5
diff --git a/src/main/features/local_agents/backends/codex.ts b/src/main/features/local_agents/backends/codex.ts
index 3387bdd8..20dbfd3b 100644
--- a/src/main/features/local_agents/backends/codex.ts
+++ b/src/main/features/local_agents/backends/codex.ts
@@ -1102,21 +1102,16 @@ export function buildCodexTurnRuntimeOverrides(
};
}
-export const CODEX_OPENAI_HTTP_TRANSPORT_OVERRIDE =
- 'model_providers.openai.supports_websockets=false';
-
export function buildCodexArgs(opts: BackendRunOptions): string[] {
// Per multica: `codex app-server --listen stdio://` is the entry
// point for the JSON-RPC protocol. customArgs trail.
- // Keep the provider stream on HTTPS/SSE. A Responses WebSocket can remain
- // half-open after an output-item start: Codex then emits neither app-server
- // progress nor a transport failure, so its built-in HTTPS fallback never
- // runs. SSE retains Codex's own idle detection/retry without imposing an
- // Orkas-side deadline or cancelling a turn that may still recover.
- const args = [
- 'app-server', '--listen', 'stdio://',
- '-c', CODEX_OPENAI_HTTP_TRANSPORT_OVERRIDE,
- ];
+ // Keep Codex's built-in OpenAI provider intact. Current Codex versions
+ // reserve that provider id and reject `model_providers.openai.*` overrides
+ // before JSON-RPC initialization; ChatGPT login also relies on the built-in
+ // provider owning its WebSocket-to-HTTPS fallback. Orkas observes Codex
+ // retry events and applies its process watchdog, but does not select the
+ // provider transport itself.
+ const args = ['app-server', '--listen', 'stdio://'];
// orkas-bridge: codex takes config-layer overrides (`-c key=value`,
// TOML-parsed) instead of a config file. Codex spawns stdio MCP servers
// with a sanitized env (PATH/HOME only) — it does NOT inherit this Codex
diff --git a/test/main/features/local_agents/bridge_args.test.ts b/test/main/features/local_agents/bridge_args.test.ts
index deb01861..0d253b1e 100644
--- a/test/main/features/local_agents/bridge_args.test.ts
+++ b/test/main/features/local_agents/bridge_args.test.ts
@@ -4,7 +4,6 @@ import { buildClaudeArgs } from '../../../../src/main/features/local_agents/back
import {
buildCodexArgs,
buildCodexBridgeOverrides,
- CODEX_OPENAI_HTTP_TRANSPORT_OVERRIDE,
codexDeveloperInstructions,
codexThreadDeveloperInstructionParams,
} from '../../../../src/main/features/local_agents/backends/codex';
@@ -64,19 +63,16 @@ describe('claude bridge args', () => {
});
describe('codex bridge overrides', () => {
- it('uses the recoverable HTTP response stream while leaving user overrides last', () => {
- const userOverride = 'model_providers.openai.supports_websockets=true';
+ it('keeps the reserved OpenAI provider intact while leaving user overrides last', () => {
+ const userOverride = 'model="gpt-5.6-sol"';
const args = buildCodexArgs({
...BASE,
customArgs: ['-c', userOverride],
});
- expect(args.slice(0, 5)).toEqual([
- 'app-server', '--listen', 'stdio://',
- '-c', CODEX_OPENAI_HTTP_TRANSPORT_OVERRIDE,
- ]);
- expect(args.lastIndexOf(userOverride))
- .toBeGreaterThan(args.indexOf(CODEX_OPENAI_HTTP_TRANSPORT_OVERRIDE));
+ expect(args.slice(0, 3)).toEqual(['app-server', '--listen', 'stdio://']);
+ expect(args.filter(arg => arg.startsWith('model_providers.openai'))).toEqual([]);
+ expect(args.slice(-2)).toEqual(['-c', userOverride]);
});
it('emits TOML-quoted -c overrides for command/args and non-secret env', () => {