diff --git a/src/cli/cli-installer.test.ts b/src/cli/cli-installer.test.ts index d2458fc21..61f95b54f 100644 --- a/src/cli/cli-installer.test.ts +++ b/src/cli/cli-installer.test.ts @@ -156,6 +156,10 @@ describe("runCliInstaller", () => { expect(versionSpy).not.toHaveBeenCalled() expect(addPluginSpy).not.toHaveBeenCalled() expect(writeConfigSpy).not.toHaveBeenCalled() + const output = mockConsoleLog.mock.calls.map((call) => call.join(" ")).join("\n") + expect(output).not.toContain("Model Assignment") + expect(output).not.toContain("OpenAI/ChatGPT") + expect(output).not.toContain("Sisyphus agent performs best") detectSpy.mockRestore() installedSpy.mockRestore() diff --git a/src/cli/cli-installer.ts b/src/cli/cli-installer.ts index aa1fdf588..6c1b60032 100644 --- a/src/cli/cli-installer.ts +++ b/src/cli/cli-installer.ts @@ -116,7 +116,7 @@ export async function runCliInstaller(args: InstallArgs, version: string): Promi printBox(formatConfigSummary(config), isUpdate ? "Updated Configuration" : "Installation Complete") - if (!config.hasClaude) { + if (config.hasOpenCode && !config.hasClaude) { printInfo( "Note: Sisyphus agent performs best with Claude Opus 4.5+. " + "Other models work but may have reduced orchestration quality.", @@ -124,6 +124,7 @@ export async function runCliInstaller(args: InstallArgs, version: string): Promi } if ( + config.hasOpenCode && !config.hasClaude && !config.hasOpenAI && !config.hasGemini && diff --git a/src/cli/install-codex/codex-config-toml.test.ts b/src/cli/install-codex/codex-config-toml.test.ts index 65d792dde..8997379e2 100644 --- a/src/cli/install-codex/codex-config-toml.test.ts +++ b/src/cli/install-codex/codex-config-toml.test.ts @@ -24,6 +24,10 @@ describe("codex-config-toml", () => { "hide_world_writable_warning = false", "hide_rate_limit_model_nudge = true", "", + "[windows]", + 'sandbox = "elevated"', + "wsl2_proxy = true", + "", ].join("\n"), ) @@ -46,8 +50,11 @@ describe("codex-config-toml", () => { expect(content).toContain("hide_full_access_warning = true") expect(content).toContain("hide_world_writable_warning = true") expect(content).toContain("hide_rate_limit_model_nudge = true") + expect(content).toContain("[windows]") + expect(content).toContain("wsl2_proxy = true") expect(content).not.toContain('approval_policy = "on-request"') expect(content).not.toContain('sandbox_mode = "workspace-write"') + expect(content).not.toContain('sandbox = "elevated"') }) test("#given empty Codex config #when updating config #then enables MultiAgentV2 with ten thousand session threads", async () => { diff --git a/src/cli/install-codex/codex-config-toml.ts b/src/cli/install-codex/codex-config-toml.ts index 325fb7b65..ac3a60bdd 100644 --- a/src/cli/install-codex/codex-config-toml.ts +++ b/src/cli/install-codex/codex-config-toml.ts @@ -1,7 +1,7 @@ import { mkdir, readFile, writeFile } from "node:fs/promises" import { dirname } from "node:path" import { ensureCodexMultiAgentV2Config } from "./codex-multi-agent-v2-config" -import { appendBlock, findTomlSection, replaceOrInsertSetting } from "./toml-section-editor" +import { appendBlock, findTomlSection, removeSetting, replaceOrInsertSetting } from "./toml-section-editor" import type { CodexAgentConfig, CodexMarketplaceSource, TrustedHookState } from "./types" const SISYPHUS_LEGACY_MARKETPLACES = ["lazycodex", "code-yeongyu-codex-plugins"] as const @@ -115,10 +115,17 @@ function ensureAutonomousPermissions(config: string): string { let next = replaceOrInsertRootSetting(config, "approval_policy", JSON.stringify("never")) next = replaceOrInsertRootSetting(next, "sandbox_mode", JSON.stringify("danger-full-access")) next = replaceOrInsertRootSetting(next, "network_access", JSON.stringify("enabled")) + next = removeWindowsSandboxSetting(next) next = ensureNoticeEnabled(next, "hide_full_access_warning") return ensureNoticeEnabled(next, "hide_world_writable_warning") } +function removeWindowsSandboxSetting(config: string): string { + const section = findTomlSection(config, "windows") + if (!section) return config + return removeSetting(config, section, "sandbox") +} + function ensureNoticeEnabled(config: string, key: string): string { const section = findTomlSection(config, "notice") if (!section) return appendBlock(config, `[notice]\n${key} = true\n`) diff --git a/src/cli/install-validators.test.ts b/src/cli/install-validators.test.ts index e2334c228..a103e9d2b 100644 --- a/src/cli/install-validators.test.ts +++ b/src/cli/install-validators.test.ts @@ -179,4 +179,20 @@ describe("formatConfigSummary", () => { expect(summary).toContain("Platform: both") expect(summary).not.toContain("Codex Harness") }) + + test("hides OpenCode model catalog for codex-only installs", () => { + // #given + const config = argsToConfig(createArgs({ platform: "codex", codexAutonomous: true })) + + // #when + const summary = formatConfigSummary(config) + + // #then + expect(summary).toContain("Platform: codex") + expect(summary).toContain("Codex autonomous mode: enabled") + expect(summary).not.toContain("Claude") + expect(summary).not.toContain("OpenAI/ChatGPT") + expect(summary).not.toContain("Model Assignment") + expect(summary).not.toContain("Models auto-configured") + }) }) diff --git a/src/cli/install-validators.ts b/src/cli/install-validators.ts index 7a91a18cb..ee5fb6fca 100644 --- a/src/cli/install-validators.ts +++ b/src/cli/install-validators.ts @@ -36,6 +36,9 @@ export function formatConfigSummary(config: InstallConfig): string { if (config.hasCodex) { lines.push(` ${SYMBOLS.info} Codex autonomous mode: ${config.codexAutonomous ? "enabled" : "disabled"}`) } + + if (!config.hasOpenCode) return lines.join("\n") + lines.push("") const claudeDetail = config.hasClaude ? (config.isMax20 ? "max20" : "standard") : undefined diff --git a/src/cli/tui-installer.ts b/src/cli/tui-installer.ts index f24f96cbf..edb99aa77 100644 --- a/src/cli/tui-installer.ts +++ b/src/cli/tui-installer.ts @@ -96,14 +96,22 @@ export async function runTuiInstaller(args: InstallArgs, version: string): Promi spinner.stop(`Config written to ${color.cyan(omoResult.configPath)}`) } - if (!config.hasClaude) { + if (config.hasOpenCode && !config.hasClaude) { p.log.info( `${color.bold("Note:")} Sisyphus agent performs best with Claude Opus 4.5+.\n` + `Other models work but may have reduced orchestration quality.`, ) } - if (!config.hasClaude && !config.hasOpenAI && !config.hasGemini && !config.hasCopilot && !config.hasOpencodeZen && !config.hasVercelAiGateway) { + if ( + config.hasOpenCode && + !config.hasClaude && + !config.hasOpenAI && + !config.hasGemini && + !config.hasCopilot && + !config.hasOpencodeZen && + !config.hasVercelAiGateway + ) { p.log.warn("No model providers configured. Using opencode/big-pickle as fallback.") }