Skip to content

orchestration: FileSubagentPersistence, shared InFlight, result policy helpers, awaiting-user contract #472

Closed

Description

@senamakel

Move these generic pieces out of OpenHuman agent/subagent_host/ (see openhuman#7929):

  • FileSubagentPersistence. About 580 lines of file-locked persistence: fs2 locks, sha256 key components, a per-task index, atomic replace, terminal records that read both current and legacy formats, and checkpoint-dir canonicalisation. From lifecycle.rs and lifecycle_checkpoint.rs. Upstream currently has only the trait and an in-memory store.
  • Shared singleflight. OpenHuman HostInFlight copies the driver's InFlight. Expose one process-shared in-flight dedupe on SubagentDriver, built on harness cache/singleflight.rs.
  • SubagentOutcome gaps, so hosts can drop their parallel SubagentRunStatus/request taxonomy (subagent_host/types.rs): worker_thread_id, tier, model_override, usage/cost fields.
  • result_policy additions:
    • a UTF-8-safe result cap (ops/runner_result_cap.rs) and is_safe_task_id (ops/pause_checkpoint.rs);
    • outcome framing and detection of unexecuted tool-call stubs (orchestration/tools/dispatch_outcomes.rs);
    • the artifact-offload contract and caps that ops/runner.rs reimplements.
  • The [SUBAGENT_AWAITING_USER] pause/resume envelope as a harness contract (orchestration/tools/awaiting_user.rs).
  • subagent_framing gaps: result-contract headings and spec dedup on ToolSnapshot (ops/prompt.rs). restrict_tools gaps: ToolScope plus skill_filter narrowing (tool_prep.rs).
  • Iteration-cap checkpoint summary with a deterministic fallback (ops/checkpoint.rs, plus build_cap_digest from ops/graph/dispatch.rs), placed in harness summarization.

Done when: merged upstream with tests in sibling *_tests.rs, released or tagged, and the OpenHuman follow-up can delete the host copy after a gitlink bump on vendor/tinyagents.

Parent: tinyhumansai/openhuman#7929, which has the full file-by-file verdict tables.

Activity

  1. added
    enhancementNew feature or request
    rustPull requests that update rust code
    on Oct 16, 2026
  2. added
    priority: p3Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect.
    on Oct 16, 2026
  3. tinysweeper commented on Oct 16, 2026

    @tinysweeper

    Refactoring/harness-extraction task: move generic subagent-host pieces (FileSubagentPersistence, shared InFlight, SubagentOutcome gaps, result_policy helpers, awaiting-user envelope, framing/scope gaps, checkpoint summary) out of OpenHuman's agent/subagent_host into upstream tinyagents, with tests and a tagged release so the OpenHuman host copy can be deleted. Enhancement/cleanup rather than a broken path, so p3.

    Labelled priority: p3.

  4. added theissue type on Oct 16, 2026
  5. senamakel commented on Oct 17, 2026

    @senamakel
    MemberAuthor

    Implemented and merged into the tinyagents-refactor branch on the senamakel fork:

    Closing this completed migration issue as requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority: p3Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect.rustPull requests that update rust code

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions