T5-P1-A3-WP1 — Prevent Orchestrator From Improvising Recovery on Degraded Tool Responses#4067
Merged
Trecek merged 3 commits intoJun 11, 2026
Conversation
…lse + empty content) Add an explicit catch-all halt rule to both the cook-session orchestrator prompt and the fleet food-truck prompt that declares any tool response with success:false AND absent/null/empty content as a degraded state. The cook orchestrator must print user_visible_message, refuse to improvise recovery, and halt. The fleet prompt must emit the sentinel with reason="degraded_tool_response" and stop. The canonical sentinel contract in _type_dispatch_identity.py now also includes the new reason value as the IL-0 source of truth. Both prompt builders get corresponding contract tests. - src/autoskillit/core/types/_type_dispatch_identity.py: add "degraded_tool_response" to the L3 sentinel contract reason enum. - src/autoskillit/cli/_prompts_orchestrator.py: add FAILURE PREDICATE — DEGRADED TOOL RESPONSE between the open_kitchen predicate and CONTEXT LIMIT ROUTING. - src/autoskillit/fleet/_prompts.py: add FAILURE PREDICATE — DEGRADED RESPONSE between the open_kitchen predicate and TWO FAILURE TIERS, and extend the Section 8 reason enum to include the new value. - tests/cli/test_orchestrator_prompt_contract.py: new TestDegradedToolResponsePredicate class — presence, content, ordering. - tests/fleet/test_food_truck_prompt.py: three new module-level tests for the degraded halt rule, empty-content trigger, and reason enum.
…ADED TOOL RESPONSE predicate Mirror the fleet prompt's 'do not route to on_failure' prohibition in the orchestrator predicate — the asymmetry meant the orchestrator could still attempt on_failure handling on a degraded response.
prompt.index('Fields:') finds the first occurrence — anchor to
'--- SECTION 8:' first so future additional Fields: sections
in the prompt don't silently cause the assertion to check the wrong region.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add an explicit catch-all halt rule to both the cook-session orchestrator prompt (
_prompts_orchestrator.py) and the fleet food-truck prompt (_prompts.py) that declares any tool response withsuccess:falseAND absent/null/emptycontentas a degraded state. The orchestrator must printuser_visible_message, refuse to improvise recovery, and halt. The fleet prompt must emit the sentinel withreason="degraded_tool_response"and stop. The canonical sentinel contract in_type_dispatch_identity.pymust also include the new reason value. Both prompt builders get corresponding contract tests.Implementation Plan
Plan file:
/home/talon/projects/autoskillit-runs/impl-20260611-081716-639257/.autoskillit/temp/make-plan/t5_p1_a3_wp1_degraded_tool_response_halt_plan_2026-06-11_081900.mdCloses #4000
🤖 Generated with Claude Code via AutoSkillit
Token Usage Summary
* Step used a non-Anthropic provider; caching behavior may differ.
Token Efficiency
Model Usage Breakdown