Skip to content

Commit 445387f

Browse files
committed
fix(cli): keep nested exec --timeout inherit comment to the option-source invariant
1 parent 5818be1 commit 445387f

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎src/cli/program/register.agent-turn.ts‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,8 @@ ${theme.muted("Docs:")} ${formatDocsLink("/cli/agent", "docs.openclaw.ai/cli/age
188188
messageFile: opts.messageFile ?? parentOpts?.messageFile,
189189
model: opts.model ?? parentOpts?.model,
190190
thinking: opts.thinking ?? parentOpts?.thinking,
191-
// Exec --timeout has a child default ("600"), so `opts.timeout ?? parent`
192-
// would never inherit. Prefer an explicit leaf flag; otherwise inherit a
193-
// parent CLI value. Parent-first `??` would keep the parent even when the
194-
// operator also set exec --timeout (production enables positional options).
191+
// Exec --timeout defaults to "600"; inherit a parent flag only when the
192+
// leaf source is default. An explicit nested --timeout must win.
195193
timeout: inheritOptionFromParent<string>(command, "timeout") ?? opts.timeout,
196194
json: opts.json === true || parentOpts?.json === true,
197195
};

0 commit comments

Comments
 (0)