Problem
The run command registers --target-mode with Commander default "session".
Relevant code:
src/index.ts:83
src/index.ts:212-214
Because Commander always supplies the default, runtime profile/default config target mode is ignored:
mode: options.targetMode ?? runtimeProfile?.target?.mode ?? config.defaults?.targetMode ?? "session"
A runtime profile with target.mode: "runtime" silently dispatches as session.
Suggested fix
Remove the Commander default:
.option("--target-mode <mode>", "Target mode")
Keep the fallback in createDispatchRequest().
Acceptance criteria
- Test where runtime profile has
target.mode: "runtime" and no CLI --target-mode; request uses runtime.
- Explicit CLI
--target-mode session still overrides config.
Problem
The
runcommand registers--target-modewith Commander default"session".Relevant code:
src/index.ts:83src/index.ts:212-214Because Commander always supplies the default, runtime profile/default config target mode is ignored:
A runtime profile with
target.mode: "runtime"silently dispatches assession.Suggested fix
Remove the Commander default:
Keep the fallback in
createDispatchRequest().Acceptance criteria
target.mode: "runtime"and no CLI--target-mode; request usesruntime.--target-mode sessionstill overrides config.