You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of the v0.58.7 → HEAD TinyAgents-migration audit (see parent issue). Low-severity parity items, dead code, and doc drift — batchable.
Behavior nits
Stop-hook "hard stop" is soft: StopHookMiddleware pauses via SteeringCommand::Pause (src/openhuman/agent/stop_hooks.rs:144), drained only at the next iteration top — the current tool round (possibly expensive spawns) still executes, then summarize_turn_wrapup spends one more model call. Contradicts GoalBudgetStopHook's "hard-stops the moment usage would exceed the cap" doc (session/turn/core.rs:696-706). Either enforce immediately (skip pending tool round on Stop) or fix the docs and cap the wrap-up.
TextModeProvider passthroughs missing (ops/runner.rs:1157-1212): doesn't forward is_local_provider/is_local_provider_for_model/loaded_context_window/prompt_cache_capabilities — a local provider behind text-mode loses the n_keep >= n_ctx guards and is profiled as remote (tinyagents/model.rs:347). Forward the methods.
Poisoned-mutex panics on error recovery: .lock().unwrap() on error_slot (tinyagents/mod.rs:614) and EarlyExitHook slots (tinyagents/tools.rs:49/57) — use unwrap_or_else(PoisonError::into_inner).
max_iterations == 0 now normalizes to 10 (legacy clamped to 1) — confirm intended, document.
Cap-summary output cap pinned to AGENT_TURN_MAX_OUTPUT_TOKENS instead of the definition's budget (ops/graph.rs:318).
Aggregate tool-result spill can blank a result to "" with no artifact pointer (harness/tool_result_artifacts/mod.rs:343,365,386,400-403): allowed_len saturates to 0 → bound_text_to_budget(_, 0) returns "", discarding the [tool_result_preview] envelope with artifact_path; small allowed_len can truncate the envelope mid-header. Enforce a minimum envelope allowance.
rolling_segment_recap (harness/archivist/recap.rs:206): ~100-line public method, zero callers since the migration; doc describes a deleted caller architecture. Remove or re-wire.
Unreachable "falling back to inline truncation" branch (tool_result_artifacts/mod.rs:266-274) logs a fallback but returns the envelope anyway.
Stale model_vision_context references: session/types.rs:56, builder/setters.rs:147, turn_attachments_context.rs:15 + 2 more cite the deleted task-local; the replacement gate (session/turn/core.rs:843) inverts the documented legacy guard — appears intentional (managed backend routes via hint:reasoning) but the docs are wrong.
agent/README.md:12 still lists deleted harness/interrupt.rs.
Payload-summarizer doc comment says 500 000 default; config default is 4 000 (unchanged old→new — doc was always wrong; fix while here).
Local Langfuse NDJSON envelope not actually Langfuse-ingestible (missing id/timestamp, snake_case body) contrary to its doc (progress_tracing.rs:718-739).
Dead-at-base deletions confirmed clean, for the record: interrupt.rs, session_queue.rs, self_healing.rs, tree_loader.rs, memory_loader.rs facade — no action needed.
Acceptance criteria
Each numbered item either fixed or explicitly descoped with a comment/doc note; no comment left asserting behavior the code doesn't have.
Part of the v0.58.7 → HEAD TinyAgents-migration audit (see parent issue). Low-severity parity items, dead code, and doc drift — batchable.
Behavior nits
StopHookMiddlewarepauses viaSteeringCommand::Pause(src/openhuman/agent/stop_hooks.rs:144), drained only at the next iteration top — the current tool round (possibly expensive spawns) still executes, thensummarize_turn_wrapupspends one more model call. ContradictsGoalBudgetStopHook's "hard-stops the moment usage would exceed the cap" doc (session/turn/core.rs:696-706). Either enforce immediately (skip pending tool round on Stop) or fix the docs and cap the wrap-up.TextModeProviderpassthroughs missing (ops/runner.rs:1157-1212): doesn't forwardis_local_provider/is_local_provider_for_model/loaded_context_window/prompt_cache_capabilities— a local provider behind text-mode loses then_keep >= n_ctxguards and is profiled as remote (tinyagents/model.rs:347). Forward the methods..lock().unwrap()onerror_slot(tinyagents/mod.rs:614) andEarlyExitHookslots (tinyagents/tools.rs:49/57) — useunwrap_or_else(PoisonError::into_inner).max_iterations == 0now normalizes to 10 (legacy clamped to 1) — confirm intended, document.AGENT_TURN_MAX_OUTPUT_TOKENSinstead of the definition's budget (ops/graph.rs:318).""with no artifact pointer (harness/tool_result_artifacts/mod.rs:343,365,386,400-403):allowed_lensaturates to 0 →bound_text_to_budget(_, 0)returns"", discarding the[tool_result_preview]envelope withartifact_path; smallallowed_lencan truncate the envelope mid-header. Enforce a minimum envelope allowance.session/turn/core.rs:268) andLazyToolkitResolverstubbed (ops/runner.rs:904, "Improve agent harness with LangGraph-style state machine or Polaris-like architecture #4249 1b") — track restoration or explicitly descope.Dead code / doc drift
rolling_segment_recap(harness/archivist/recap.rs:206): ~100-line public method, zero callers since the migration; doc describes a deleted caller architecture. Remove or re-wire.tool_result_artifacts/mod.rs:266-274) logs a fallback but returns the envelope anyway.model_vision_contextreferences:session/types.rs:56,builder/setters.rs:147,turn_attachments_context.rs:15+ 2 more cite the deleted task-local; the replacement gate (session/turn/core.rs:843) inverts the documented legacy guard — appears intentional (managed backend routes viahint:reasoning) but the docs are wrong.agent/README.md:12still lists deletedharness/interrupt.rs.id/timestamp, snake_case body) contrary to its doc (progress_tracing.rs:718-739).interrupt.rs,session_queue.rs,self_healing.rs,tree_loader.rs,memory_loader.rsfacade — no action needed.Acceptance criteria