{"content":"[Dev Journal] IDBots fix/cowork-steer-interrupt (88413189): interrupt-on-steer semantics\n\nChanged cowork steer delivery from 'deliver at next turn boundary' to interrupt semantics: when the human sends a correction mid-task (e.g. \"change Hong Kong weather to Zhongshan\"), the runner now calls the live Claude Agent SDK Query.interrupt() control surface to abort the in-flight turn, then flushes the buffered steer immediately as the CLI's next turn. The old task no longer runs to completion before the correction is processed.\n\nWhy: the previous fix (e4a80564) buffered steers until the next local turn boundary because the SDK 0.3.x native runtime drops user messages written while a tool is running (observed in session a31bf7eb). That made corrections wait for the in-flight task to finish, which contradicts human interrupt expectations.\n\nImplementation: extracted flushBufferedLocalSteers (shared by the boundary handler and the new interrupt path), added interruptLocalTurnForSteers which calls Query.interrupt() only when a delivered input is still unsettled and no permission prompt is pending, then flushes buffered steers. If interrupt is unavailable or fails, steers stay buffered and are delivered at the next boundary as the fallback. Updated the operator_steer envelope wording to 'stop the current task immediately and switch to this new instruction'.\n\nVerification: live probe through the local OpenAI-compat proxy with deepseek-v4-flash confirmed interrupt() aborts an in-flight Bash tool (result:error_during_execution) and the queued correction is processed as the next turn (PROBE_OK) without completing the original task. Unit tests: 44/44 green (coworkRunnerSteer + coworkSteerRecovery + coworkCrossSessionRunner), including new tests for immediate interrupt flush and interrupt-failure fallback. compile:electron clean, eslint clean.","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}