Skip to content

T5-P1-A3-WP1 — Prevent Orchestrator From Improvising Recovery on Degraded Tool Responses#4067

Merged
Trecek merged 3 commits into
developfrom
t5-p1-a3-wp1-prevent-the-orchestrator-from-improvising-a-rec/4000
Jun 11, 2026
Merged

T5-P1-A3-WP1 — Prevent Orchestrator From Improvising Recovery on Degraded Tool Responses#4067
Trecek merged 3 commits into
developfrom
t5-p1-a3-wp1-prevent-the-orchestrator-from-improvising-a-rec/4000

Conversation

@Trecek

@Trecek Trecek commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

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 with success:false AND absent/null/empty content as a degraded state. The 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 must 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.md

Closes #4000

🤖 Generated with Claude Code via AutoSkillit

Token Usage Summary

Step Model count uncached output cache_read peak_ctx turns cache_write time
plan* opus[1m] 1 1.8k 13.5k 1.1M 87.2k 41 70.3k 9m 9s
verify* sonnet 1 108 8.8k 849.3k 84.4k 42 63.6k 2m 59s
implement* MiniMax-M3 1 2.1M 7.6k 0 0 59 0 4m 29s
audit_impl* sonnet 1 882 7.5k 207.1k 43.4k 16 31.2k 3m 36s
prepare_pr* MiniMax-M3 1 200.4k 1.8k 0 0 13 0 49s
compose_pr* MiniMax-M3 1 211.8k 1.3k 0 0 13 0 40s
Total 2.5M 40.5k 2.1M 87.2k 165.1k 21m 43s

* Step used a non-Anthropic provider; caching behavior may differ.

Token Efficiency

Step LoC Changed cache_read/LoC cache_write/LoC output/LoC
plan 0
verify 0
implement 116 0.0 0.0 65.8
audit_impl 0
prepare_pr 0
compose_pr 0
Total 116 18525.6 1423.5 349.3

Model Usage Breakdown

Model steps uncached output cache_read cache_write time
opus[1m] 1 1.8k 13.5k 1.1M 70.3k 9m 9s
sonnet 2 990 16.4k 1.1M 94.8k 6m 35s
MiniMax-M3 3 2.5M 10.7k 0 0 5m 58s

Trecek added 3 commits June 11, 2026 08:34
…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.
@Trecek Trecek added this pull request to the merge queue Jun 11, 2026
Merged via the queue into develop with commit 46facbc Jun 11, 2026
3 checks passed
@Trecek Trecek deleted the t5-p1-a3-wp1-prevent-the-orchestrator-from-improvising-a-rec/4000 branch June 11, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant