From d500b699283c34cccfc8edb808677e934e9fb335 Mon Sep 17 00:00:00 2001 From: Bhuvan Agrawal <11240550+bhuvan002@users.noreply.github.com> Date: Tue, 10 Nov 2026 12:40:43 -0800 Subject: [PATCH 1/2] docs(classifier): clarify user-turn fail-open retention Signed-off-by: Bhuvan Agrawal <11240550+bhuvan002@users.noreply.github.com> --- docs/routing_algorithms/llm_classifier_routing.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/routing_algorithms/llm_classifier_routing.md b/docs/routing_algorithms/llm_classifier_routing.md index 8b5918d1f..3a7abd714 100644 --- a/docs/routing_algorithms/llm_classifier_routing.md +++ b/docs/routing_algorithms/llm_classifier_routing.md @@ -311,9 +311,17 @@ calls that follow: classify_trigger = "user_turn" ``` -Tool results are the agent continuing work the user already asked for, so they -do not re-open the decision. A failed or unusable verdict keeps the current -target. When no target has been selected yet, the next request is judged again. +Tool results continue the current user turn and reuse its selected target. +A new user message runs the judge again and applies the route's failure policy. +If a standalone `llm_classifier` route falls back after an unusable verdict or +judge failure, the fallback replaces the previous selection and is retained for +the new turn's continuations. This also applies when no target has been selected +yet. + +For capability routes, the fallback is `strong_target`. With `fail_open = true` +(the default), a judge client failure can therefore replace a previous +`weak_target` selection. With `fail_open = false`, judge client failures stop the +request. Custom and direct routes use `default_target` when falling back. `new_session` judges once and reuses that target for the rest of the session, including `strong_target` when it was selected as the fallback for an unusable From 78e9adce4b4df3fbc56b144dd3935a126579c55d Mon Sep 17 00:00:00 2001 From: Bhuvan Agrawal <11240550+bhuvan002@users.noreply.github.com> Date: Tue, 10 Nov 2026 14:49:02 -0800 Subject: [PATCH 2/2] docs(classifier): clarify turn overrides and streamed judge failures Signed-off-by: Bhuvan Agrawal <11240550+bhuvan002@users.noreply.github.com> --- docs/routing_algorithms/llm_classifier_routing.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/routing_algorithms/llm_classifier_routing.md b/docs/routing_algorithms/llm_classifier_routing.md index 3a7abd714..8fce5f1e1 100644 --- a/docs/routing_algorithms/llm_classifier_routing.md +++ b/docs/routing_algorithms/llm_classifier_routing.md @@ -313,6 +313,9 @@ classify_trigger = "user_turn" Tool results continue the current user turn and reuse its selected target. A new user message runs the judge again and applies the route's failure policy. +`x-initiator` overrides message-based detection: `user` starts a new turn even +for tool results; `agent` can reuse the prior target even for a user-role message. + If a standalone `llm_classifier` route falls back after an unusable verdict or judge failure, the fallback replaces the previous selection and is retained for the new turn's continuations. This also applies when no target has been selected @@ -320,8 +323,10 @@ yet. For capability routes, the fallback is `strong_target`. With `fail_open = true` (the default), a judge client failure can therefore replace a previous -`weak_target` selection. With `fail_open = false`, judge client failures stop the -request. Custom and direct routes use `default_target` when falling back. +`weak_target` selection. With `fail_open = false`, errors returned by the judge +call stop the request. If a host delivers a judge stream that later fails while +libsy reads it, the failure becomes an unusable verdict and can still select +`strong_target`. Custom and direct routes use `default_target` when falling back. `new_session` judges once and reuses that target for the rest of the session, including `strong_target` when it was selected as the fallback for an unusable