mirror of
https://github.com/codewhale-hq/Codewhale.git
synced 2026-11-07 17:09:13 -10:00
fix(engine): avoid redundant shell completion re-entry
Keep shell completion runtime messages available to the next turn without forcing an extra model request when a tracked shell finishes during the current turn. This preserves completion delivery while avoiding timing-dependent token spend and platform-specific wiremock failures. Verified: cargo fmt --all -- --check; the three engine regressions (yolo_mode_does_not_prompt_for_background_shell, operate_model_shell_uses_normal_approval_and_workspace_sandbox, full_access_subagent_handoff_keeps_model_shell_free_of_approval_prompts) 3 passed / 0 failed; shell handoff unit test 1/1.
This commit is contained in:
1 parent
80348784ac
commit
03ece7d8b1
1 file changed
-4
@@ -1428,8 +1428,6 @@ impl Engine {
|
||||
if let Some(status) = shell_completion_status_text(&shell_completions, "") {
|
||||
let _ = self.tx_event.send(Event::status(status)).await;
|
||||
}
|
||||
turn.next_step();
|
||||
continue;
|
||||
}
|
||||
|
||||
// Sub-agent completion handoff (issue #756). The model finished
|
||||
@@ -1597,8 +1595,6 @@ impl Engine {
|
||||
{
|
||||
let _ = self.tx_event.send(Event::status(status)).await;
|
||||
}
|
||||
turn.next_step();
|
||||
continue;
|
||||
}
|
||||
|
||||
if self.drain_subagent_completion_events("late").await > 0 {
|
||||
|
||||
Reference in new issue
Block a user