Skip to content

Commit f7d2cc2

Browse files
committed
Warn when settings write is skipped for unreadable base
max-concurrent and wait-for-approval paths already used loadGlobalSettingsWriteBase but returned silently on null. Match the plugin/compaction/session-mode warn with path.
1 parent 41c7966 commit f7d2cc2

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

src/tui/runner.tsx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,7 +1506,13 @@ export async function runTUI(initialConfig: Config): Promise<number> {
15061506
onChangeMaxConcurrentSubAgents={async (limit) => {
15071507
configureSubAgentConcurrency(limit);
15081508
const base = await loadGlobalSettingsWriteBase(config.globalSettingsPath);
1509-
if (base === null) return;
1509+
if (base === null) {
1510+
tuiLogger.warn(
1511+
"Skipping max concurrent sub-agents write: unreadable global settings at {path}",
1512+
{ path: config.globalSettingsPath },
1513+
);
1514+
return;
1515+
}
15101516
await saveGlobalSettings(config.globalSettingsPath, {
15111517
...base,
15121518
maxConcurrentSubAgents: limit,
@@ -1516,7 +1522,13 @@ export async function runTUI(initialConfig: Config): Promise<number> {
15161522
onChangeWaitForApproval={async (value) => {
15171523
liveToolWatchdog.waitForApproval = value;
15181524
const base = await loadGlobalSettingsWriteBase(config.globalSettingsPath);
1519-
if (base === null) return;
1525+
if (base === null) {
1526+
tuiLogger.warn(
1527+
"Skipping wait-for-approval write: unreadable global settings at {path}",
1528+
{ path: config.globalSettingsPath },
1529+
);
1530+
return;
1531+
}
15201532
await saveGlobalSettings(config.globalSettingsPath, {
15211533
...base,
15221534
tools: { ...base.tools, waitForApproval: value },

0 commit comments

Comments
 (0)