File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed
cli/cmd/tui/component/prompt Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -145,8 +145,12 @@ export function Prompt(props: PromptProps) {
145145 if ( msg . agent && isPrimaryAgent ) {
146146 local . agent . set ( msg . agent )
147147 }
148- if ( msg . model ) local . model . set ( msg . model )
149- if ( msg . variant ) local . model . variant . set ( msg . variant )
148+
149+ const isolateModel = sync . data . config . isolate_subagent_model
150+ if ( ! isolateModel ) {
151+ if ( msg . model ) local . model . set ( msg . model )
152+ if ( msg . variant ) local . model . variant . set ( msg . variant )
153+ }
150154 }
151155 } )
152156
Original file line number Diff line number Diff line change @@ -871,6 +871,10 @@ export namespace Config {
871871 . boolean ( )
872872 . optional ( )
873873 . describe ( "@deprecated Use 'share' field instead. Share newly created sessions automatically" ) ,
874+ isolate_subagent_model : z
875+ . boolean ( )
876+ . optional ( )
877+ . describe ( "Prevent commands and subagents from persisting their model to the parent session" ) ,
874878 autoupdate : z
875879 . union ( [ z . boolean ( ) , z . literal ( "notify" ) ] )
876880 . optional ( )
Original file line number Diff line number Diff line change @@ -1590,6 +1590,10 @@ export type Config = {
15901590 * @deprecated Use 'share' field instead. Share newly created sessions automatically
15911591 */
15921592 autoshare ?: boolean
1593+ /**
1594+ * Prevent commands and subagents from persisting their model to the parent session
1595+ */
1596+ isolate_subagent_model ?: boolean
15931597 /**
15941598 * Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications
15951599 */
You can’t perform that action at this time.
0 commit comments