7 months ago
ac8c9ffWhen "Workspace backups" was disabled, backups were still being created
due to two race conditions:
1. At thread startup, applyWorkspaceDefaultsToThread was async/void'd
and would yield before set_config could arrive, while the pending
first message was sent synchronously — starting a turn (and backup)
before the disabled setting reached the session.
2. applyWorkspaceDefaultsToThread deferred ALL config (including
backupsEnabled) when the thread was busy, so auto-checkpoints kept
happening during the entire turn.
Fix: send set_config { backupsEnabled } synchronously in the
server_hello handler before any pending messages, and in
applyWorkspaceDefaultsToThread send it immediately regardless of busy
state (only defer model/provider changes).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>Parent01b5f2b