fix(tui): keep task shell tools eagerly loaded (#2253)#2271
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds "task_shell_start" and "task_shell_wait" to the list of default active native tools in the TUI engine's tool catalog, and includes corresponding unit tests to verify that these tools do not default to a deferred policy. I have no feedback to provide as there are no review comments to evaluate.
|
Independent review: Confirmed minimal & correct. Two-line insertion into Merges cleanly against v0.8.48 (PR #2256): Supersedes this fix. That PR rewrites |
|
@Hmbown — quick harvest note (cross-author since you opened both). #2256's Recommendation: land #2271 as the targeted hotfix for #2253 now (it's clean against |
Summary
Closes #2253.
Thanks @bevis-wong for the clear Windows/deepseek-v4-flash report and logs.
Verification
Greptile Summary
This PR fixes a regression where
task_shell_startandtask_shell_waitwere omitted from the eagerly-loaded native tool catalog, causing first-use calls to be intercepted by the deferred schema-hydration path instead of executing — breaking the long-running shell flow, notably on Windows with deepseek-v4-flash.tool_catalog.rs: Insertstask_shell_startandtask_shell_waitintoDEFAULT_ACTIVE_NATIVE_TOOLSin the correct alphabetical position, soshould_default_defer_toolreturnsfalsefor both andmaybe_hydrate_requested_deferred_toolno longer intercepts their first call.tests.rs: Adds two assertions to the existingnon_yolo_mode_retains_default_defer_policytest, providing targeted regression coverage for the fix.Confidence Score: 5/5
Safe to merge — the change is a two-line catalog addition with a matching regression test; no existing behavior is altered for any other tool.
The fix is minimal and surgical: two tool names added to an alphabetically-ordered constant, a targeted should_default_defer_tool check confirmed by two new test assertions, and the logic path through maybe_hydrate_requested_deferred_tool is already well-exercised by the surrounding test suite. There is no risk of side-effects on other tools in the catalog.
No files require special attention.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A["Model requests task_shell_start / task_shell_wait"] --> B{"Is tool in DEFAULT_ACTIVE_NATIVE_TOOLS?"} B -- "Before fix: NO (deferred)" --> C["maybe_hydrate_requested_deferred_tool intercepts call"] C --> D["Returns schema-hydration response\n(tool NOT executed, retry required)"] D --> E["Long-running shell flow broken\n(regression on Windows / deepseek-v4-flash)"] B -- "After fix: YES (eager)" --> F["should_default_defer_tool returns false\ndefer_loading = Some(false)"] F --> G["maybe_hydrate_requested_deferred_tool returns None\n(tool proceeds to execution)"] G --> H["task_shell_start / task_shell_wait execute normally"]Reviews (1): Last reviewed commit: "fix(tui): keep task shell tools eagerly ..." | Re-trigger Greptile