Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
8 changes: 6 additions & 2 deletions packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,12 @@ export function Prompt(props: PromptProps) {
if (msg.agent && isPrimaryAgent) {
local.agent.set(msg.agent)
}
if (msg.model) local.model.set(msg.model)
if (msg.variant) local.model.variant.set(msg.variant)

const isolateModel = sync.data.config.isolate_subagent_model
if (!isolateModel) {
if (msg.model) local.model.set(msg.model)
if (msg.variant) local.model.variant.set(msg.variant)
}
}
})

Expand Down
4 changes: 4 additions & 0 deletions packages/opencode/src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,10 @@ export namespace Config {
.boolean()
.optional()
.describe("@deprecated Use 'share' field instead. Share newly created sessions automatically"),
isolate_subagent_model: z
.boolean()
.optional()
.describe("Prevent commands and subagents from persisting their model to the parent session"),
autoupdate: z
.union([z.boolean(), z.literal("notify")])
.optional()
Expand Down
4 changes: 4 additions & 0 deletions packages/sdk/js/src/v2/gen/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1590,6 +1590,10 @@ export type Config = {
* @deprecated Use 'share' field instead. Share newly created sessions automatically
*/
autoshare?: boolean
/**
* Prevent commands and subagents from persisting their model to the parent session
*/
isolate_subagent_model?: boolean
/**
* Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications
*/
Expand Down
Loading