Repository navigation
feat(context): bump tinyagents and tinysearch, expose expiry, reasoning, pruning and keep_recent_tokens options - #714
Merged
Conversation
…ns tip Co-authored-by: Medulla <medulla@tinyhumans.ai>
…ng replay and tool pruning Adds [context] keep_recent_tokens, tool_result_max_age_turns, tool_result_exempt_tools, replay_reasoning and prune_retired_tools with env overlays. Expiry and reasoning replay are pinned on each thread like the tool_search options (replay_pin.rs); prune_retired_tools chains onto the session builder and the granted snapshot names its deferred catalogue as offered. AgentSpec and Turn gain matching setters over ContextOverrides. Co-authored-by: Medulla <medulla@tinyhumans.ai>
Adds [search] compact_results (RenderOptions::compact via render_*_with) and contents_max_chars (ProviderConfig.contents_max_chars), both off by default, with env overlays. Co-authored-by: Medulla <medulla@tinyhumans.ai>
…nder options Co-authored-by: Medulla <medulla@tinyhumans.ai>
…once Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
This was referenced Nov 8, 2026
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.
Closes #706
Part of tinyhumansai/chottu-core#712
What changed
vendor/tinyagentsto d8af36518 ([tinyagents-slim] subagents: collapse to one asyncspawn_subagent; dropdelegate_*, control tools,wait,subagent.steer#201 result expiry, [tinyagents-slim] relocate: parent-context builder totriage/#203 reasoning replay, [tinyagents-slim] relocate:harness/fork_context.rsintosubagent_host/#204 prune retired tools) andvendor/tinysearchto b99ebbb (wip(agent): trace exporter capture_content gating + Langfuse cached double-count (tinyhumansai#4454) #6 compact render,contents_max_chars). Both are the fork epic tips.[context]gainskeep_recent_tokens,tool_result_max_age_turns,tool_result_exempt_tools,replay_reasoningandprune_retired_tools, each with an env overlay. Defaults keep today's behaviour.keep_recent_tokens(envOPENHUMAN_CONTEXT_KEEP_RECENT_TOKENS,0clears) sets the verbatim tail an in-turn compaction keeps; unset keeps 20k (capped at a fifth of a known window). Mapped incontext_wiring.rsfor both strategies.agent/tinyagents/replay_pin.rs, recorded ascontext_replayon the first row besidetool_discovery) and reach the harness asRunConfig::result_expiry/replay_reasoning. A resumed thread keeps what it started with; a thread that recorded nothing keeps today's behaviour.prune_retired_toolsis chained atensure.rsnext to.retain_recorded_tools(...); the granted snapshot names the deferred catalogue throughToolSnapshot::with_offered_names, so a deferred tool the host has not rebuilt keeps its recorded declaration.[search]gainscompact_results(RenderOptions::compact()throughrender_*_with) andcontents_max_chars(ProviderConfig.contents_max_chars), both off by default.AgentSpecandTurnsetterskeep_recent_tokens,tool_result_max_age_turns,tool_result_exempt_tools,replay_reasoning,prune_retired_toolsoverContextOverrides;ContextOverridesandReasoningReplayare re-exported. The embed API docs are regenerated.Public API / behaviour changes
New config keys and embed setters only. No new key set means unchanged behaviour.
Not done
The tinysearch excerpt length (
RenderOptions::excerpt_chars) is not exposed; the cap and the compact switch are.Gates (vendor/openhuman)
cargo fmt --all -- --check: passcargo check -p openhuman -p openhuman-embed --tests: passcargo clippy -p openhuman --lib -- -D warnings: pass;cargo clippy -p openhuman-embed --all-targets -- -D warnings: passkeep_recent_tokens(config, env,keep_recent_tokens_override_reaches_compaction),replay_pin,prompt_replay_options,context_overrides,granted_snapshot,context_wiring,discovery::pin,search::render,search_compact_results,the_codec_records, embedagent::spec.node scripts/generate-architecture-docs.mjs --check,check-crate-chain,check-storage-*,check-test-ownership: passPre-existing failures (not caused by this change)
cargo clippy -p openhuman --all-targets: 23 lints in test files this PR does not touch.an_agent_with_*build tests, including the existing discovery ones and the new context ones;modules::search::config_teststhat callstore_api_key).session_host::discovery_pin_testshangs locally, so no session-level replay test was added; the codec test covers the record path.pnpm rust:layout:artifacts/tiny_store_tests.rsis 784 lines;check-core-hosted-freeflagsconfig/schema/security_mode.rs;check-security-module-dependenciesneedsnode_modules.scripts/modules/pin-status.mjsreports tinysearchaheadof its released pin, so hosted CI needs a tinysearch module release and re-pin. Until then a released module ignorescontents_max_chars(the field isserde(default)).