REQ-IDEN-003: Handoff rules and auto-chain continuation

← Requirements

What it requires

  1. Given no locked tier, When should_auto_chain is evaluated, Then it is false.
  2. Given a tier declaring auto_chain and a completing response at depth > 0, When the decision runs, Then state becomes COMPLETE.
  3. Given the same at depth 0, When the decision runs, Then a tier change to the auto_chain target fires.
  4. Given no auto_chain configuration, When the decision runs, Then auto-chain does not fire.
tier
NOT_RUN

Where it lives

  • src/core6

See it on the map

How it is met

implemented byresults (168 tests)dir_tier_changeis_response_completeset_handoff_rulesshould_auto_chaintri_get_handoff_targetstry_auto_chain168 absent168 tests, a summary by result: every test is in the tests table below

Show on the map

Implemented by

Tests (168)

Reached through calls

168 tests: 168 absent

testresultlinked byimplementers exercisedcalls away
gh#123 part 4: ChildContextInfo.max_consecutive_empty_turns_override wired through engineabsentinferred5 of 61
gh#179: a workspace-bound session is seeded with its workspace's promptsabsentinferred1 of 6: set_handoff_rules1
set_handoff_rules wires internal tier resolver trampolinesabsentinferred1 of 6: set_handoff_rules1
Configure with null JSON returns errorabsentinferred1 of 6: set_handoff_rules5
Double-configure on one handle is refusedabsentinferred1 of 6: set_handoff_rules5
Nemotron3-Nano-4B Q8 first inference does not crash (gh#66)absentinferred1 of 6: set_handoff_rules5
Three handles can coexistabsentinferred1 of 6: set_handoff_rules5
Two GPU-resident handles can coexist (v2.2.8 target)absentinferred1 of 6: set_handoff_rules5
Two handles configure independentlyabsentinferred1 of 6: set_handoff_rules5
entropic_configure called twice on the same handle returns ALREADY_CONFIGUREDabsentinferred1 of 6: set_handoff_rules5
entropic_configure rejects NULL config_jsonabsentinferred1 of 6: set_handoff_rules5
entropic_configure rejects NULL handleabsentinferred1 of 6: set_handoff_rules5
entropic_configure_dir on /dev/null subpath returns an error, not an exceptionabsentinferred1 of 6: set_handoff_rules5
entropic_configure_dir on a tmp dir runs the loader pathabsentinferred1 of 6: set_handoff_rules5
entropic_configure_dir rejects NULL handleabsentinferred1 of 6: set_handoff_rules5
entropic_configure_dir with empty string path returns an error code, not an exceptionabsentinferred1 of 6: set_handoff_rules5
entropic_configure_from_file rejects NULL handleabsentinferred1 of 6: set_handoff_rules5
entropic_configure_from_file rejects NULL pathabsentinferred1 of 6: set_handoff_rules5
entropic_configure_from_file rejects missing fileabsentinferred1 of 6: set_handoff_rules5
entropic_last_error reflects most-recent operation failureabsentinferred1 of 6: set_handoff_rules5
entropic_last_error returns per-handle state (v2.2.6)absentinferred1 of 6: set_handoff_rules5
entropic_register_mcp_server on a configured handle absentinferred1 of 6: set_handoff_rules5
entropic_run_messages with console logging disabled still absentinferred1 of 6: set_handoff_rules5
entropic_seconds_since_last_activity returns 0 before any run absentinferred1 of 6: set_handoff_rules5
gh#110: MTP engages through the real agent loop (entropic_run)absentinferred1 of 6: set_handoff_rules5
gh#121 regression: configure populates engine's allowed_tools from identity frontmatterabsentinferred1 of 6: set_handoff_rules5
gh#144: concurrent bridge clients queue instead of racingabsentinferred1 of 6: set_handoff_rules5
gh#154 a tier grammar stem that cannot resolve YET still absentinferred1 of 6: set_handoff_rules5
gh#154 a tier grammar stem that resolves still configuresabsentinferred1 of 6: set_handoff_rules5
gh#154 a tier with no grammar is unaffectedabsentinferred1 of 6: set_handoff_rules5
gh#154 entropic_metrics_json carries a generations arrayabsentinferred1 of 6: set_handoff_rules5
gh#156 a frontmatter-less app_context fails configure absentinferred1 of 6: set_handoff_rules5
gh#156 a frontmatter-less constitution fails configure tooabsentinferred1 of 6: set_handoff_rules5
gh#156 a missing app_context path fails configureabsentinferred1 of 6: set_handoff_rules5
gh#156 a well-formed app_context file still configuresabsentinferred1 of 6: set_handoff_rules5
gh#156 app_context false still configuresabsentinferred1 of 6: set_handoff_rules5
gh#156 inline app_context content still configuresabsentinferred1 of 6: set_handoff_rules5
gh#158 entropic_interrupt_session targets exactly one runabsentinferred1 of 6: set_handoff_rules5
gh#163 entropic_configure carries app_context into ParsedConfigabsentinferred1 of 6: set_handoff_rules5
gh#163 entropic_configure_dir carries app_contextabsentinferred1 of 6: set_handoff_rules5
gh#163 entropic_configure_from_file carries app_contextabsentinferred1 of 6: set_handoff_rules5
gh#163 the object and false spellings survive configure_dir tooabsentinferred1 of 6: set_handoff_rules5
gh#164 entropic_release_model names an unknown tierabsentinferred1 of 6: set_handoff_rules5
gh#164 entropic_release_model refuses to unload mid-turnabsentinferred1 of 6: set_handoff_rules5
gh#165 entropic_session_context_set guards its preconditionsabsentinferred1 of 6: set_handoff_rules5
gh#165 entropic_session_context_set refuses the running sessionabsentinferred1 of 6: set_handoff_rules5
gh#165 entropic_session_context_set round-trips through the C ABIabsentinferred1 of 6: set_handoff_rules5
gh#175: a non-positive mcp.server_timeout_seconds is refused at configureabsentinferred1 of 6: set_handoff_rules5
gh#203: followup returns delegation_id and summary from real storageabsentinferred1 of 6: set_handoff_rules5
gh#204: an unservable http_port fails configure loudlyabsentinferred1 of 6: set_handoff_rules5
gh#95: identity grammar: field constrains that tier's outputabsentinferred1 of 6: set_handoff_rules5
h1.run() after h2.configure() does not segfault (v2.2.6)absentinferred1 of 6: set_handoff_rules5
Basic response contains no special tokensabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Batch generation worksabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Budget-exhausted forced complete sets terminal_reason metadataabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Circuit breaker limits tool calls per turnabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Compaction fires when context exceeds thresholdabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Compaction triggers at thresholdabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Context accumulates across turnsabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Context anchors persist across runsabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Delegation directive triggers child loopabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Delegation wiring fires on_delegation_start callbackabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Dynamic identity creation and generation through engine loopabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Empty response handled gracefullyabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Engine state transitions include PLANNING and EXECUTINGabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Finish reason length continues loopabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Generate is called exactly once per iterationabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Hooks fire in correct order during a generation cycleabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Interrupt stops loopabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
MCP authorization denial propagates through engineabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Max iterations stops loopabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Metrics accurate after runabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Multi-turn engine calls retain contextabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Root conversation created at run() init when storage wired (gh#48)absentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Route callback is invoked for tier selectionabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Routing fires on_tier_selected callbackabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Single iteration completesabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Single-turn engine loop produces coherent responseabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
State transitions IDLE->PLANNING->EXECUTING->COMPLETEabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Streaming generation worksabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Streaming interrupt propagates to backend cancel chain absentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Tier routing fires callbackabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Tool call cycle: generate, parse, execute, generateabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
Tool call cycle: generate, parse, execute, regenerateabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
True end-to-end: real prompts, real engine, real modelabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
a context-overflow refusal fails the turn instead of retrying itabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
auto_chain child sets COMPLETE at depth > 0absentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
auto_chain does not fire without configabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
auto_chain root fires tier change at depth 0absentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
budget_exhausted child is relayed partial to lead (E2)absentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
delegation guards reject depth/cycle/repeat/pipeline-depthabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
delegation snapshot + per-tier metrics accumulationabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#105: constitutional validator's toolless render must NOT clobber absentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#111: a delegation whose child produces raw UTF-8 content does not absentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#111: a tool call whose arg carries raw UTF-8 is preserved, not absentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#111: raw UTF-8 in backend-cleaned content is sanitized before it absentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#119: delegation auto-complete folds child summary into lead's absentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#121: zero-tool-call correction names tier's actual toolsabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#123 part 1: zero-tool-call counter resets after genuine tool call progressabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#123 part 2: zero-tool-call ceiling is per-tier configurableabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#123 part 3: prose-only nudge turn does NOT set failure_reason in metadataabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#158: two concurrent runs accumulate metrics safelyabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#160: an isolated delegation never writes the project, and absentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#162: a delegate seeded with context answers from the named absentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#162: resume by target picks that tier's latest delegationabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#169: a capped loop carries its last real content, annotatedabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#169: a capped loop that produced nothing stays distinguishableabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#169: the parent relay receives the capped child's real workabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#181: a hard cut with nothing substantive stays distinguishableabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#181: a thinking-budget hard cut carries the run's real contentabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#181: the parent relay receives the hard-cut child's real workabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#183: a fresh top-level run still clears a stale interruptabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#183: a tier's identity overrides reach a top-level runabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#209/#212: a turn that ends in ERROR records why, for the callerabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#77: entropic.complete is terminal when emitted with sibling pipelineabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#80: a tool call resets the budget windowabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#80: budget off (default) does not gate a tool-call-free spiralabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#80: tokens budget nudges then hard-cuts a tool-call-free spiralabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#81: interrupt during tool processing halts before pending dispatchabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#81: run_loop(inherit_interrupt=false) clears a stale interruptabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#81: run_loop(inherit_interrupt=true) preserves a pre-set interruptabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#84 combined: should_stop halts the loop when the duplicate absentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#84: a successful tool call DOES reset the budgetabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#84: rejected-duplicate tool calls do NOT reset the budgetabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#88 combined: process_tool_results defangs a meta {action} absentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#88: a gemma multi-turn session never accumulates a parrotable absentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
hook dispatch: info / PRE_GENERATE cancel / POST_GENERATE rewrite / ON_ERRORabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
last_loop_metrics populated after runabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
max_iterations override caps loop before global limitabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
misc accessors: pause / context_usage / idle / project_dirabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
queue capacity / cap mutation / clear / observer / state slotabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
resume_delegation failure paths surface typed errorsabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
set_storage wiring covers init_session_conversation pathsabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
should_auto_chain false when no locked tierabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
v2.14.6: a lead that answers in prose is nudged, and its forced absentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
v2.14.6: after a nudge, a tier that owes a tool call is forced to make oneabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
v2.14.6: an empty turn is retried, never accepted as completeabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
v2.14.6: the model's own tool call stays in the history it is shownabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
v2.14.6: with thinking on, each loop turn ends in a real tool callabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
validation_provider variants are all non-fatalabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
zero-tool-call with explicit_completion halts within retry capabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain6
gh#158: interrupting one session leaves the other runningabsentinferred1 of 6: set_handoff_rules6
gh#158: metrics and context reads are safe during live runsabsentinferred1 of 6: set_handoff_rules6
gh#158: two concurrent sessions do not bleed into each otherabsentinferred1 of 6: set_handoff_rules6
gh#164: entropic_release_model frees VRAM through the C ABIabsentinferred1 of 6: set_handoff_rules6
gh#165 + gh#164: release the weights, keep the conversationabsentinferred1 of 6: set_handoff_rules6
gh#165: a dropped session restored from JSON keeps answeringabsentinferred1 of 6: set_handoff_rules6
gh#166: two workspaces on one handle do not read each other's absentinferred1 of 6: set_handoff_rules6
gh#169: an iteration-capped delegate hands its parent the audit it absentinferred1 of 6: set_handoff_rules6
gh#179: each workspace's sessions answer from its own app_context, absentinferred1 of 6: set_handoff_rules6
gh#181: a delegate hard-cut by the thinking budget hands its absentinferred1 of 6: set_handoff_rules6
gh#194: a plain generation publishes the prefill it performedabsentinferred1 of 6: set_handoff_rules6
gh#198: a deferred handle holds no GPU memory until it runsabsentinferred1 of 6: set_handoff_rules6
gh#204/gh#205: two HTTP clients, different session, workspace and absentinferred1 of 6: set_handoff_rules6
gh#214: a prompt that does not fit fails the turn, typedabsentinferred1 of 6: set_handoff_rules6
gh#216: multi-byte text at the history cut does not poison later turnsabsentinferred1 of 6: set_handoff_rules6
gh#217: release is refused while another session is decodingabsentinferred1 of 6: set_handoff_rules6
gh#93: autoparser family parses a multi-parameter tool callabsentinferred1 of 6: set_handoff_rules6
gh#93: entropic_interrupt stops a long run early (cancel-bridge)absentinferred1 of 6: set_handoff_rules6
gh#94: enable_thinking:false suppresses think blocks (facade)absentinferred1 of 6: set_handoff_rules6
gh#99: run_as emits each tier's grammar on a shared modelabsentinferred1 of 6: set_handoff_rules6
outside-root optional: a real model's reads outside its root absentinferred1 of 6: set_handoff_rules6
v2.14.1: a declared server serves each workspace from its own repositoryabsentinferred1 of 6: set_handoff_rules6
v2.14.3: release frees the model over MCP and the conversation survivesabsentinferred1 of 6: set_handoff_rules6
v2.14.4: a model's commit message with shell syntax is text, not a commandabsentinferred1 of 6: set_handoff_rules6
v2.14.5: a failed turn is an error carrying only its own textabsentinferred1 of 6: set_handoff_rules6
gh#182: a model-supplied max_turns bounds the delegated childabsentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain7
v2.14.6: after a prose answer is nudged, the forced retry may only absentinferred4 of 6: dir_tier_change, is_response_complete, should_auto_chain, try_auto_chain7