Skip to content

Reuse managed advisors and keep threads waiting for commands #15

Closed
1 of 1 issue completed
Closed

Description

@pechhe

Outcome

A lead using a cheaper implementation model can consult one managed advisor repeatedly for the same piece of work, retaining the advisor conversation rather than starting from scratch. Threads with pending agent-started commands remain waiting and do not send a premature completion notification.

Settled constraints

Approved in T3 thread 0c88bf2b-f3de-4c76-8e40-63c9a841a18d on 15 October 2026. Advisor reuse is advice only: reviewers remain fresh independent leaves. Reuse preserves the original work, workspace, policy, model and read-only boundary. Every follow-up identifies the current source revision and what changed. Completion of the work ends reuse; cancellation must stop pending work and prevent later consultation. Persistent means conversation reuse, not a permanently running process or a guarantee of prompt caching.

Use the existing managed task and event lifecycle, not a parallel coordinator. Internal and external leads use an explicit task API rather than manipulating a backing child thread. Each consultation has its own task/result identity, stable retries and ordinary cancellation/status/evidence. Unknown launches must not duplicate execution; current policy/provider/workspace authority is rechecked before execution. A recorded work outcome or explicit advisor closure ends reuse. Existing one-off delegation remains compatible.

Background commands count as pending work even when long lived (including development servers); stopping or completing them releases the wait. Share the completion decision across sidebar/inbox ordering, web/desktop notifications and mobile pushes. Preserve existing foreground-run, rollback, provider-roster and Stop semantics.

Acceptance

  • Two successive advisor consultations reuse the same child/provider conversation while returning distinct consultation task IDs and results. A retry returns the same consultation without rerunning it, including after reconstruction from durable state.
  • Follow-ups include a source revision and delta, retain immutable role/model/workspace/policy identity and read-only execution, and refuse reviewers, another owner, an active consultation, a closed/cancelled advisor, mismatched work or a revoked/unavailable route.
  • Closing the advisor prevents further reuse and cancels pending work. Advisors cannot turn into reviewers or recursively delegate. Experiment evidence retains the original allocation rather than assigning a new model on each question.
  • A settled turn with only a pending command remains waiting and suppresses done notifications and auto-settlement; completion/Stop restores normal completion. Subagents/monitors and empty rosters retain their expected behavior.
  • Focused behavior tests cover lifecycle and authority boundaries. Document the lead-facing API and when reuse is appropriate. Report landed versus installed separately; the owner will reinstall after the SlipJay thread is done.

Non-goals

No new advice skill, UI redesign, model pool changes, live experiment activation, application restart, or persistent implementation/reviewer sessions. No claim that reuse guarantees lower token cost.

Sub-issues

Sub-issues

1 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. added
    spec
    ready-for-agent
    on Oct 14, 2026
  2. pechhe commented on Oct 15, 2026

    @pechhe
    OwnerAuthor

    Combined delivery landed through SlipJay on origin/rollover: advisor/command waiting b6462266c64ffe8652db300e8cd832c20a12750e, followed by adapted experiment evidence e1773d6df29c6fe2800649c1bd06dcbb92623f49 (adopted from user-authorised 091e9ea9fb8d62a14dfdcbb7dbe118c713bec608). Landing operation op_00mv8sjkir_45c6d08f6c21d7911f7e1483 passed its runner gate. Migrations 64–66 remain unchanged; advisor consultations are 67 and episode evidence is 68.

    Verification: 192 tests passed across 14 combined focused files; server/contracts/client-runtime typechecks and server/web build passed. After moving rollover-note coordination into ContextRolloverNoteService, 15 handler/rollover integration tests passed (a review brief incorrectly said 23; this is the corrected count). A fresh isolated candidate server exposes the three evidence MCP tools and applies the complete 64–68 ledger. The live ledger was read only and currently ends at 66.

    Change review completed on Standards and Spec axes. Its lock-order and original-source-pin blockers were fixed with regression coverage; subsequent delta reviews confirmed the fixes and the extracted note service. The integrated Spec review remains incomplete because the installed managed reviewer has no source-reader tools and requested additional surrounding source. No confirmed new defect was reported; full integrated review must still be completed before closure.

    Owner decisions remain: include evidence in the next combined build; no separate immediate install; preserve running SlipJay work; no experiment enrollment or automatic evaluator. Desktop packaging succeeded at version 0.0.46-nightly.20261014.3118 from the landed source. The app is retained in the packaging stage and has not yet been signed/staged over the older pending app or installed. Installed tools, migration ledger and actual build/revision must be checked after the eventual coordinated install, and reported to source thread a7270db1-34f0-4ac8-a7a9-3ffc1dc1da3c. This checkpoint deliberately leaves the Spec open.

  3. removed
    ready-for-agent
    on Oct 15, 2026
  4. pechhe commented on Oct 15, 2026

    @pechhe
    OwnerAuthor

    Integrated Spec review completed for Spec #15 at published integration candidate 55308d7e193c9a640067d63db438991a5c44ecb9 (exact-tree execution view d42a2862ceb5ed26fad0b7e683226e243c3882bd), base 8bc91ef6a0c5dfdce48190e0c33d02d263c1b431, Spec body revision 6bdda8b96808, complete coverage. Included landings: b6462266c64ffe8652db300e8cd832c20a12750e and 55308d7e193c9a640067d63db438991a5c44ecb9. Excluded intervening context: separately reviewed experiment-evidence integration e1773d6df29c6fe2800649c1bd06dcbb92623f49; migration 68 and evidence tools are part of the combined install, not Spec #15.

    Standards: 0 blocking, 0 should-fix; worst finding: none.

    Spec: 0 remaining blocking, 0 should-fix; worst remaining finding: none. The integrated review confirmed an initial-result publication race; Ticket #17 fixed it and landed. A later suspected older-consultation recurrence was rejected and independently overturned: follow-up task creation selects the immutable original task, while finalization visits each consultation by its own delegated task identity.

    Validation: the publication regression failed before the fix and passed after it; 30 focused MCP tests and the server typecheck passed. SlipJay runner gate passed for op_00mv8t1g5j_22f1f13994bff1a3d2c380a9. Prior combined checks remain 192 tests across 14 files, server/contracts/client-runtime typechecks, server/web builds, and 15 extraction tests. Desktop packaging was rebuilt after the fix. The final app passed strict signing verification using Peach Pi Local Signing; all bundled server chunks match the workspace build, including the publication guard. Version 0.0.46-nightly.20261014.3118; packaged commit is honestly unknown because the builder uses Git HEAD in a noncolocated JJ workspace. The staging source manifest records the canonical revision and SHA-256 hashes instead.

    Source is published and the combined Mac app is prepared for deferred installation. The installed Mac app and VPS runtime have not been changed or restarted, and live installed MCP/migration verification remains pending until the owner's running SlipJay thread permits the combined install. No experiment enrollment or automatic evaluator was started. Final installed verification is still owed to source thread a7270db1-34f0-4ac8-a7a9-3ffc1dc1da3c.

  5. pechhe commented on Oct 15, 2026

    @pechhe
    OwnerAuthor

    Published advisor reuse and command Waiting in b646226 plus publication-race fix 55308d7; integrated Standards/Spec review clean, signed combined build staged, installation owner-deferred.

  6. pechhe commented on Oct 15, 2026

    @pechhe
    OwnerAuthor

    Installed and restarted the combined build on Mac and VPS after the owner's explicit approval. Both now run 0.0.46-nightly.20261014.3118, canonical source 55308d7e193c9a640067d63db438991a5c44ecb9. The running SlipJay thread checkpointed and completed before restart. Mac installed app.asar and every server chunk match the signed staging manifest; strict signature verification passed, live HTTP returned 200, and the live MCP catalog exposes all three experiment evidence tools. Both live migration ledgers contain 64–68, including AdvisorConsultations and ExperimentEvidence. VPS matching runtime is running, with its archive version/serve smoke passed. Mac embedded commit remains unknown; provenance is verified by the canonical source manifest and artifact hashes. No enrollment or automatic evaluator was started. Actual install result reported to source thread a7270db1-34f0-4ac8-a7a9-3ffc1dc1da3c.

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

    spec

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions