| ... | @@ -4608,7 +4608,11 @@ export const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* ( | ... | @@ -4608,7 +4608,11 @@ export const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* ( |
| 4608 | ) => runPromise(handleResumeDialog(request, callbackOptions)); | 4608 | ) => runPromise(handleResumeDialog(request, callbackOptions)); |
| 4609 | | 4609 | |
| 4610 | const claudeBinaryPath = claudeSdkExecutablePath; | 4610 | const claudeBinaryPath = claudeSdkExecutablePath; |
| 4611 | const extraArgs = parseCliArgs(claudeSettings.launchArgs).flags; | 4611 | const { |
| | 4612 | "permission-mode": launchArgPermissionMode, |
| | 4613 | "dangerously-skip-permissions": launchArgSkipPermissions, |
| | 4614 | ...extraArgs |
| | 4615 | } = parseCliArgs(claudeSettings.launchArgs).flags; |
| 4612 | const selectedModel = | 4616 | const selectedModel = |
| 4613 | input.modelSelection?.instanceId === boundInstanceId ? input.modelSelection : undefined; | 4617 | input.modelSelection?.instanceId === boundInstanceId ? input.modelSelection : undefined; |
| 4614 | const modelSelection = selectedModel | 4618 | const modelSelection = selectedModel |
| ... | @@ -4649,7 +4653,14 @@ export const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* ( | ... | @@ -4649,7 +4653,14 @@ export const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* ( |
| 4649 | auto: "auto", | 4653 | auto: "auto", |
| 4650 | "full-access": "bypassPermissions", | 4654 | "full-access": "bypassPermissions", |
| 4651 | }; | 4655 | }; |
| 4652 | const permissionMode = runtimeModeToPermission[input.runtimeMode]; | 4656 | // A permission launch arg is folded into the mode T3 sends rather than |
| | 4657 | // passed through: the CLI resolves both inputs together, so argv order |
| | 4658 | // never let the user's flag win. |
| | 4659 | const permissionMode = |
| | 4660 | (launchArgPermissionMode as PermissionMode | null | undefined) ?? |
| | 4661 | (launchArgSkipPermissions === null || launchArgSkipPermissions === "true" |
| | 4662 | ? "bypassPermissions" |
| | 4663 | : runtimeModeToPermission[input.runtimeMode]); |
| 4653 | const settings = { | 4664 | const settings = { |
| 4654 | ...(typeof thinking === "boolean" ? { alwaysThinkingEnabled: thinking } : {}), | 4665 | ...(typeof thinking === "boolean" ? { alwaysThinkingEnabled: thinking } : {}), |
| 4655 | ...(fastMode ? { fastMode: true } : {}), | 4666 | ...(fastMode ? { fastMode: true } : {}), |