Skip to content
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CLI/CMUXCLI+CommandSuggestions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ extension CMUXCLI {
"notify",
"omc",
"omo",
"omo-slim",
"omos",
"omx",
"open",
"open-browser",
Expand Down
2 changes: 1 addition & 1 deletion CLI/CMUXCLI+SessionsListForkDiagnostics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ extension CMUXCLI {
guard agent == "opencode" else {
return (true, "available")
}
if launchCommand?.launcher == "omo" {
if AgentLaunchCaptureTrust.launcherIsOpenCodeSessionWrapper(launchCommand?.launcher) {
return (true, "available")
}
if sessionsListOpenCodeLooksRemoteLike(record, launchCommand: launchCommand) {
Expand Down
102 changes: 102 additions & 0 deletions CLI/cmux.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3702,6 +3702,16 @@ struct CMUXCLI {
return
}

if command == "omo-slim" || command == "omos" {
try runOMOSlim(
launcher: command,
commandArgs: commandArgs,
socketPath: resolvedSocketPath,
explicitPassword: socketPasswordArg
)
return
}

if command == "omx" {
try runOMX(
commandArgs: commandArgs,
Expand Down Expand Up @@ -16015,6 +16025,25 @@ struct CMUXCLI {
cmux omo --continue
cmux omo --model claude-sonnet-4-6
""")
case "omo-slim", "omos":
return String(localized: "cli.omoSlim.usage", defaultValue: """
Usage: cmux omo-slim [opencode-args...]
cmux omos [opencode-args...]

Launch OpenCode with oh-my-opencode-slim 2.2+ using its native cmux
multiplexer. Install and configure the plugin before using this command.

This command:
- preserves the active OpenCode and OMO Slim configuration
- selects an available OpenCode API port for background agents
- enables OpenCode background subagents
- forwards all remaining arguments to opencode

Examples:
cmux omo-slim
cmux omos --continue
cmux omos --model openai/gpt-5.6-sol
""")
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
case "omx":
return String(localized: "cli.omx.usage", defaultValue: """
Usage: cmux omx [omx-args...]
Expand Down Expand Up @@ -23064,6 +23093,78 @@ struct CMUXCLI {
throw CLIError(message: "Failed to launch opencode: \(String(cString: strerror(code)))\n\nIs opencode installed? Install with:\n npm install -g opencode-ai")
}

// MARK: - cmux omo-slim (native cmux multiplexer)

private func runOMOSlim(
launcher: String,
commandArgs: [String],
socketPath: String,
explicitPassword: String?
) throws {
var launcherEnvironment = ProcessInfo.processInfo.environment
launcherEnvironment["CMUX_SOCKET_PATH"] = socketPath
launcherEnvironment.removeValue(forKey: "CMUX_SOCKET")
setenv("CMUX_SOCKET_PATH", socketPath, 1)
unsetenv("CMUX_SOCKET")

if let explicitPassword,
!explicitPassword.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
launcherEnvironment["CMUX_SOCKET_PASSWORD"] = explicitPassword
setenv("CMUX_SOCKET_PASSWORD", explicitPassword, 1)
}

guard let openCodeExecutablePath = resolveOpenCodeExecutable(searchPath: launcherEnvironment["PATH"]) else {
throw CLIError(message: missingProviderExecutableMessage(
displayName: "OpenCode",
executableName: "opencode"
))
}

if launcherEnvironment["CMUX_WORKSPACE_ID"] == nil || launcherEnvironment["CMUX_SURFACE_ID"] == nil,
let focusedContext = try tmuxCompatFocusedContext(
processEnvironment: launcherEnvironment,
explicitPassword: explicitPassword
) {
launcherEnvironment["CMUX_WORKSPACE_ID"] = focusedContext.workspaceId
setenv("CMUX_WORKSPACE_ID", focusedContext.workspaceId, 1)
if let surfaceId = focusedContext.surfaceId {
launcherEnvironment["CMUX_SURFACE_ID"] = surfaceId
setenv("CMUX_SURFACE_ID", surfaceId, 1)
}
}
Comment thread
cursor[bot] marked this conversation as resolved.
Resolved

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Fix the combined-OR guard that lets a valid CMUX_WORKSPACE_ID get overwritten.

The condition at line 23123 uses OR: launcherEnvironment["CMUX_WORKSPACE_ID"] == nil || launcherEnvironment["CMUX_SURFACE_ID"] == nil. If CMUX_SURFACE_ID is missing but CMUX_WORKSPACE_ID is already set to the correct terminal's workspace, this condition still evaluates true. When tmuxCompatFocusedContext then resolves, line 23128 unconditionally overwrites launcherEnvironment["CMUX_WORKSPACE_ID"] with focusedContext.workspaceId, regardless of whether the existing value was already correct. focusedContext represents whatever window/surface is currently focused in the app, which is not guaranteed to match the pane that invoked cmux omo-slim. This can route the OMO Slim launch to the wrong workspace.

Gate each assignment on its own missing-ness instead of the combined condition.

🐛 Proposed fix to scope each overwrite to its own missing value
-        if launcherEnvironment["CMUX_WORKSPACE_ID"] == nil || launcherEnvironment["CMUX_SURFACE_ID"] == nil,
-           let focusedContext = try tmuxCompatFocusedContext(
-               processEnvironment: launcherEnvironment,
-               explicitPassword: explicitPassword
-           ) {
-            launcherEnvironment["CMUX_WORKSPACE_ID"] = focusedContext.workspaceId
-            setenv("CMUX_WORKSPACE_ID", focusedContext.workspaceId, 1)
-            if let surfaceId = focusedContext.surfaceId {
-                launcherEnvironment["CMUX_SURFACE_ID"] = surfaceId
-                setenv("CMUX_SURFACE_ID", surfaceId, 1)
-            }
-        }
+        let missingWorkspaceId = launcherEnvironment["CMUX_WORKSPACE_ID"] == nil
+        let missingSurfaceId = launcherEnvironment["CMUX_SURFACE_ID"] == nil
+        if missingWorkspaceId || missingSurfaceId,
+           let focusedContext = try tmuxCompatFocusedContext(
+               processEnvironment: launcherEnvironment,
+               explicitPassword: explicitPassword
+           ) {
+            if missingWorkspaceId {
+                launcherEnvironment["CMUX_WORKSPACE_ID"] = focusedContext.workspaceId
+                setenv("CMUX_WORKSPACE_ID", focusedContext.workspaceId, 1)
+            }
+            if missingSurfaceId, let surfaceId = focusedContext.surfaceId {
+                launcherEnvironment["CMUX_SURFACE_ID"] = surfaceId
+                setenv("CMUX_SURFACE_ID", surfaceId, 1)
+            }
+        }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if launcherEnvironment["CMUX_WORKSPACE_ID"] == nil || launcherEnvironment["CMUX_SURFACE_ID"] == nil,
let focusedContext = try tmuxCompatFocusedContext(
processEnvironment: launcherEnvironment,
explicitPassword: explicitPassword
) {
launcherEnvironment["CMUX_WORKSPACE_ID"] = focusedContext.workspaceId
setenv("CMUX_WORKSPACE_ID", focusedContext.workspaceId, 1)
if let surfaceId = focusedContext.surfaceId {
launcherEnvironment["CMUX_SURFACE_ID"] = surfaceId
setenv("CMUX_SURFACE_ID", surfaceId, 1)
}
}
let missingWorkspaceId = launcherEnvironment["CMUX_WORKSPACE_ID"] == nil
let missingSurfaceId = launcherEnvironment["CMUX_SURFACE_ID"] == nil
if missingWorkspaceId || missingSurfaceId,
let focusedContext = try tmuxCompatFocusedContext(
processEnvironment: launcherEnvironment,
explicitPassword: explicitPassword
) {
if missingWorkspaceId {
launcherEnvironment["CMUX_WORKSPACE_ID"] = focusedContext.workspaceId
setenv("CMUX_WORKSPACE_ID", focusedContext.workspaceId, 1)
}
if missingSurfaceId, let surfaceId = focusedContext.surfaceId {
launcherEnvironment["CMUX_SURFACE_ID"] = surfaceId
setenv("CMUX_SURFACE_ID", surfaceId, 1)
}
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CLI/cmux.swift` around lines 23123 - 23134, Update the focused-context
initialization around tmuxCompatFocusedContext so each environment variable is
filled only when its corresponding launcherEnvironment value is missing.
Preserve existing CMUX_WORKSPACE_ID and CMUX_SURFACE_ID values, and likewise
gate each matching setenv call independently while still applying focusedContext
values for missing entries.


let openCodePort = omoResolvedPort(
commandArgs: commandArgs,
processEnvironment: launcherEnvironment
)
setenv("OPENCODE_PORT", openCodePort, 1)
if launcherEnvironment["OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS"] == nil {
setenv("OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS", "true", 1)
}

var effectiveArgs = commandArgs
if omoRequestedPort(from: commandArgs) == nil {
effectiveArgs.insert(contentsOf: ["--port", openCodePort], at: 0)
}
Comment on lines +23136 to +23139

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

opencode CLI global flags before or after subcommand

💡 Result:

For the OpenCode CLI, global flags must be placed before any subcommand [1]. When using the OpenCode CLI, you should provide global flags (such as --debug, --cwd, --version, or --help) directly after the root command, preceding any specific command or subcommand [1][2]. For example: opencode --debug [subcommand] [arguments] opencode -c /path/to/project [subcommand] [arguments] The CLI follows standard command-line conventions where global flags are parsed at the root level [1][2]. Placing them after a subcommand may result in the CLI incorrectly identifying the flags as arguments belonging to that specific subcommand, or the flags may simply be ignored [1][3]. Always prioritize placing them before the subcommand to ensure they are correctly interpreted as global configuration settings [1][2].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate and inspect the referenced code and the matching runOMO logic.
wc -l CLI/cmux.swift
sed -n '23120,23170p' CLI/cmux.swift
printf '\n--- runOMO occurrences ---\n'
rg -n "func runOMO|omoRequestedPort|int \\(\"--port\"|append contentsOf: \\(\"--port\"" CLI/cmux.swift
printf '\n--- relevant omo request/port handling ---\n'
sed -n '22700,23100p' CLI/cmux.swift

Repository: manaflow-ai/cmux

Length of output: 1918


🌐 Web query:

site:github.com OpenCode OpenCode CLI global flags before subcommand --port

💡 Result:

In the OpenCode CLI, the --port flag is not a global flag; it is a command-specific option [1][2][3]. Because it is specific to commands such as run or serve, it must be placed after the subcommand, not before it [4][5]. Global flags in the OpenCode CLI are limited to options that apply to every command, such as --help, --version, --print-logs, --log-level, and --pure [1][6][4]. Since --port is associated with the configuration of the underlying server or local listener for specific operations, it is defined within the builder for those subcommands (e.g., in the run or serve command definitions) rather than at the root level [7][5][8]. Therefore, you should use the structure: opencode --port For example: opencode run --port 4096 opencode serve --port 4096

Citations:


Move --port into the opencode subcommand.

opencode defines --port as a command-level option, so this becomes cmux omo-slim run "prompt" → opencode --port <n> run "prompt" and --port can be parsed as an unexpected argument instead of a run command option. Build the call as opencode run --port <n> "prompt" before inserting the rest of commandArgs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CLI/cmux.swift` around lines 23145 - 23148, Update the effective argument
construction around omoRequestedPort so the default --port option is placed
after the opencode run subcommand, producing opencode run --port <n> before the
remaining commandArgs; preserve existing behavior when a port was explicitly
requested.


let executablePath = resolvedExecutableURL()?.path ?? (args.first ?? "cmux")
exportAgentLaunchCommandEnvironment(
launcher: launcher,
executablePath: executablePath,
arguments: [executablePath, launcher] + effectiveArgs,
workingDirectory: launcherEnvironment["PWD"]
)

var argv = ([openCodeExecutablePath] + effectiveArgs).map { strdup($0) }
defer { argv.forEach { free($0) } }
argv.append(nil)

let code = cliExecFailureErrno {
execv(openCodeExecutablePath, &argv)
}
throw CLIError(message: "Failed to launch opencode: \(String(cString: strerror(code)))")
}

// MARK: - cmux omx (Oh My Codex)

private func resolveOMXExecutable(searchPath: String?) -> String? {
Expand Down Expand Up @@ -36245,6 +36346,7 @@ export default CMUXSessionRestore;
claude-teams [claude-args...]
codex-teams [codex-args...]
omo [opencode-args...]
omo-slim [opencode-args...] (alias: omos)
omx [omx-args...]
omc [omc-args...]
hooks setup|uninstall [--agent <name>]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@ public struct AgentForkArgv: Sendable, Equatable {
return .resolved(nil)
}
return .resolved([parts.executable, "codex-teams", "fork", sessionId] + preserved)
case "omo":
case "omo", "omo-slim", "omos":
guard let launcherName = launcher else { return .passthrough }
let parts = commandParts(executablePath: executablePath, arguments: arguments, fallbackExecutable: "cmux")
var tail = parts.tail
if tail.first == "omo" { tail.removeFirst() }
if tail.first == launcherName { tail.removeFirst() }
guard let preserved = AgentLaunchSanitizer.preservedArguments(kind: "opencode", args: tail) else {
return .resolved(nil)
}
return .resolved([parts.executable, "omo", "--session", sessionId, "--fork"] + preserved)
return .resolved([parts.executable, launcherName, "--session", sessionId, "--fork"] + preserved)
Comment on lines +43 to +51

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 The ?? "omo" fallback is unreachable: Swift only enters this case branch when launcher is one of the three non-nil matched strings, so launcher is always non-optional here. The dead fallback is misleading — a future reader may assume nil can arrive here, and if the switch is ever refactored incorrectly a silent "omo" would be used instead of the real launcher name. The same pattern is repeated in AgentResumeArgv.swift and AgentLaunchSanitizer.swift.

Suggested change
case "omo", "omo-slim", "omos":
let launcherName = launcher ?? "omo"
let parts = commandParts(executablePath: executablePath, arguments: arguments, fallbackExecutable: "cmux")
var tail = parts.tail
if tail.first == "omo" { tail.removeFirst() }
if tail.first == launcherName { tail.removeFirst() }
guard let preserved = AgentLaunchSanitizer.preservedArguments(kind: "opencode", args: tail) else {
return .resolved(nil)
}
return .resolved([parts.executable, "omo", "--session", sessionId, "--fork"] + preserved)
return .resolved([parts.executable, launcherName, "--session", sessionId, "--fork"] + preserved)
case "omo", "omo-slim", "omos":
let launcherName = launcher! // non-nil: matched by this case
let parts = commandParts(executablePath: executablePath, arguments: arguments, fallbackExecutable: "cmux")
var tail = parts.tail
if tail.first == launcherName { tail.removeFirst() }
guard let preserved = AgentLaunchSanitizer.preservedArguments(kind: "opencode", args: tail) else {
return .resolved(nil)
}
return .resolved([parts.executable, launcherName, "--session", sessionId, "--fork"] + preserved)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

case "omx", "omc":
return .resolved(nil)
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,17 @@ import Foundation
/// capture verbatim poisons resume/fork for the session — the rendered command
/// runs the wrong binary with the wrong flags.
public enum AgentLaunchCaptureTrust {
private static let openCodeSessionWrapperLaunchers: Set<String> = [
"omo",
"omo-slim",
"omos",
]

/// Wrapper launchers that legitimately differ from the hook kind they launch.
private static let wrapperLaunchersByKind: [String: Set<String>] = [
"claude": ["claudeteams"],
"codex": ["codexteams"],
"opencode": ["omo", "omx", "omc"],
"opencode": openCodeSessionWrapperLaunchers.union(["omx", "omc"]),
"pi": ["omp"],
]

Expand All @@ -32,7 +38,7 @@ public enum AgentLaunchCaptureTrust {
"kiro": ["kiro", "kiro-cli"],
"kimi": ["kimi", "kimi-cli", "kimi-code"],
"omp": ["omp"],
"opencode": ["opencode", "omo", "omx", "omc"],
"opencode": openCodeSessionWrapperLaunchers.union(["opencode", "omx", "omc"]),
"pi": ["pi", "omp"],
"qoder": ["qodercli", "qoder"],
"rovodev": ["rovodev", "rovo", "rovo-dev"],
Expand All @@ -53,6 +59,12 @@ public enum AgentLaunchCaptureTrust {
return wrapperLaunchersByKind[normalizedKind]?.contains(normalizedLauncher) == true
}

public static func launcherIsOpenCodeSessionWrapper(_ launcher: String?) -> Bool {
guard let launcher = launcher?.trimmingCharacters(in: .whitespacesAndNewlines),
!launcher.isEmpty else { return false }
return openCodeSessionWrapperLaunchers.contains(launcher.lowercased())
}
Comment on lines +62 to +66

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Two independent lists for the same session-wrapper subset

launcherIsOpenCodeSessionWrapper hardcodes ["omo", "omo-slim", "omos"] inline, independently of wrapperLaunchersByKind["opencode"] (which already contains exactly this subset plus "omx" and "omc"). When the next session-aware launcher is added, both the dict and the inline literal must be updated by hand — if one is missed, callers in ContentView, AgentForkSupport, and CMUXCLI+SessionsListForkDiagnostics that rely on this function will silently disagree with the trust-table. Deriving the answer from wrapperLaunchersByKind (e.g. by filtering out "omx" and "omc") would give one authoritative source.

Rule Used: Flag correctness-critical detection/identity deriv... (source)

Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

/// True when a captured argv describes a shell dispatcher (`sh -c …`,
/// `zsh -lc …`) rather than an agent launch. This happens when the
/// launch-capture PID fallback resolves to the hook's own dispatch shell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,13 @@ public enum AgentLaunchSanitizer {
}
guard let preserved = preservedCodexLaunchArguments(args: tail) else { return nil }
return [executable, "codex-teams"] + preserved
case "omo":
if tail.first == "omo" {
case "omo", "omo-slim", "omos":
let launcherName = launcher
if tail.first == launcherName {
tail.removeFirst()
}
guard let preserved = preservedArguments(kind: "opencode", args: tail) else { return nil }
return [executable, "omo"] + preserved
return [executable, launcherName] + preserved
case "omx", "omc":
return nil
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,15 @@ public struct AgentResumeArgv: Sendable, Equatable {
[parts.executable, "codex-teams", "resume", sessionId]
+ codexResumeConfigOverrides(preserved: preserved) + preserved
)
case "omo":
case "omo", "omo-slim", "omos":
guard let launcherName = launcher else { return .passthrough }
let parts = commandParts(executablePath: executablePath, arguments: arguments, fallbackExecutable: "cmux")
var tail = parts.tail
if tail.first == "omo" { tail.removeFirst() }
if tail.first == launcherName { tail.removeFirst() }
guard let preserved = AgentLaunchSanitizer.preservedArguments(kind: "opencode", args: tail) else {
return .resolved(nil)
}
return .resolved([parts.executable, "omo", "--session", sessionId] + preserved)
return .resolved([parts.executable, launcherName, "--session", sessionId] + preserved)
case "omx", "omc":
return .resolved(nil)
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,16 @@ struct AgentForkArgvTests {
arguments: ["cmux", "omo", "--model", "anthropic/claude-sonnet-4-6"]
) == .resolved(["cmux", "omo", "--session", "SID", "--fork", "--model", "anthropic/claude-sonnet-4-6"])
)
for launcher in ["omo-slim", "omos"] {
#expect(
AgentForkArgv().launcherResolution(
launcher: launcher,
sessionId: "SID",
executablePath: nil,
arguments: ["cmux", launcher, "--model", "openai/gpt-5.6-sol"]
) == .resolved(["cmux", launcher, "--session", "SID", "--fork", "--model", "openai/gpt-5.6-sol"])
)
}
#expect(
AgentForkArgv().launcherResolution(
launcher: "omx",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,22 @@ struct AgentLaunchCaptureTrustTests {
#expect(AgentLaunchCaptureTrust.launcherDescribesKind("claudeTeams", kind: "claude"))
#expect(AgentLaunchCaptureTrust.launcherDescribesKind("codexTeams", kind: "codex"))
#expect(AgentLaunchCaptureTrust.launcherDescribesKind("omo", kind: "opencode"))
#expect(AgentLaunchCaptureTrust.launcherDescribesKind("omo-slim", kind: "opencode"))
#expect(AgentLaunchCaptureTrust.launcherDescribesKind("omos", kind: "opencode"))
#expect(AgentLaunchCaptureTrust.launcherDescribesKind("omx", kind: "opencode"))
#expect(AgentLaunchCaptureTrust.launcherDescribesKind("omc", kind: "opencode"))
#expect(AgentLaunchCaptureTrust.launcherDescribesKind("omp", kind: "pi"))
}

@Test func openCodeSessionWrappersAreRecognized() {
for launcher in ["omo", "omo-slim", "omos"] {
#expect(AgentLaunchCaptureTrust.launcherIsOpenCodeSessionWrapper(launcher))
}
#expect(AgentLaunchCaptureTrust.launcherIsOpenCodeSessionWrapper(" OMOS "))
#expect(!AgentLaunchCaptureTrust.launcherIsOpenCodeSessionWrapper("opencode"))
#expect(!AgentLaunchCaptureTrust.launcherIsOpenCodeSessionWrapper(nil))
}

@Test func crossAgentLauncherIsDistrusted() {
#expect(!AgentLaunchCaptureTrust.launcherDescribesKind("claude", kind: "codex"))
#expect(!AgentLaunchCaptureTrust.launcherDescribesKind("codex", kind: "claude"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,17 @@ struct AgentLaunchSanitizerTests {
)
}

@Test("Preserves the OMO Slim launcher when sanitizing OpenCode arguments")
func preservesOMOSlimLauncher() {
#expect(
AgentLaunchSanitizer.sanitizedLaunchArguments(
["cmux", "omo-slim", "--model", "openai/gpt-5.6-sol"],
launcher: "omo-slim",
fallbackKind: "opencode"
) == ["cmux", "omo-slim", "--model", "openai/gpt-5.6-sol"]
)
}

@Test("Drops OpenCode startup file when it appears before cwd")
func dropsOpenCodeStartupFileBeforeCwd() {
#expect(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ struct AgentResumeArgvTests {
]
) == .resolved(["cmux", "omo", "--session", "SID", "--model", "anthropic/claude-sonnet-4-6"])
)
for launcher in ["omo-slim", "omos"] {
#expect(
AgentResumeArgv().launcherResolution(
launcher: launcher,
sessionId: "SID",
executablePath: nil,
arguments: ["cmux", launcher, "--model", "openai/gpt-5.6-sol"]
) == .resolved(["cmux", launcher, "--session", "SID", "--model", "openai/gpt-5.6-sol"])
)
}
#expect(
AgentResumeArgv().builtInKind(
kind: "opencode",
Expand Down
Loading