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
Evolve WorkHub from a transient Session router into a unified conversational entry point backed by one stable WorkHub Coordination Session per Runtime Host.
The user should be able to ask an ordinary question, clarify intent, continue existing work, or create new work from the same conversation. Concrete execution remains in ordinary Sessions.
The approved architecture direction is recorded in Discussion #3286. The exact routing strategy is intentionally left open until the R3 experiment is complete.
Architecture contract
Coordination Session lifecycle
Reuse the existing Session, Turn, transcript, model, recovery, and event infrastructure; do not add a second WorkHub database or lifecycle.
Lazily create one stable WorkHub Coordination Session for each Runtime Host and reuse it after restart.
Hide it from the ordinary Session list and exclude it from routing candidates.
Switching Runtime Host switches to that Host's Coordination Session.
The first milestone does not coordinate across Runtime Hosts.
Authority boundaries
Concern
Durable authority
User messages sent in WorkHub, ordinary Q&A, clarification, coordination decisions, delegation references, and coordination summaries
WorkHub Coordination Session
Concrete execution, project/filesystem scope, model and permission mode, root-Turn admission, tools, artifacts, recovery, archive/delete, and the authoritative execution transcript
Target ordinary Session
Aggregated WorkHub cards, filters, status summaries, and navigation aids
Rebuildable projection; no durable authority
The Coordination Session is a special role of Session, not a new authority outside the Session substrate. It owns only the coordination conversation; it never takes ownership of another Session's execution facts.
Coordination outcomes
Every WorkHub input resolves to one of four dispositions:
answer_here
delegate_existing
create_new
clarify
answer_here: answer inside the Coordination Session.
delegate_existing: send concrete work to one bounded, valid ordinary Session.
create_new: create an ordinary Session, then delegate the work to it.
clarify: continue the clarification in the Coordination Session without guessing or creating.
Delegation and safety
Delegation links the coordination and execution transcripts instead of copying execution history into WorkHub. The minimum linkage is:
delegationId
coordinationTurnId
targetSessionId
targetTurnId
disposition
status
All strategy output is advisory. A shared deterministic Action Gate validates the target and operation before any write: current Runtime Host, target existence, archive/waiting state, self-routing, expected-Turn ownership for Stop, explicit create_new, risk confirmation, and existing tool/permission ceilings.
Evolution from the current MVP
Session projection + deterministic router (R2.3/R2.4)
↓
stable per-Host Coordination Session and persistent WorkHub transcript
↓
typed dispositions + deterministic Action Gate
↓
linked delegation to ordinary Sessions
↓
R2.4 vs R3-A vs R3-B experiment
↓
evidence-based production strategy and gradual cleanup
feat(desktop): preserve WorkHub routing context #3674 merged the transitional R2.4 context-continuity work. It remains valuable as a deterministic baseline/resolver and as safety-test coverage, but it is not the final WorkHub architecture.
Delivery slices
Slices and PRs are intentionally not one-to-one. A PR may deliver multiple tightly coupled checklist items when they form one reviewable, usable loop.
Slice 0 — Close and preserve the deterministic baseline
Keep the fixed 10-Session evaluation snapshot and versioned routing-policy IDs.
Make create_new the only disposition allowed to create an ordinary Session.
Return safe clarification or an actionable error when the proposed action is rejected.
Test every rejected-action path independently of model behavior.
Exit: no routing/model strategy can directly acquire execution authority or bypass Runtime safety.
Slice 5 — Linked delegation and execution feedback
Delegate concrete work to an existing or newly created ordinary Session without copying its full transcript.
Persist the bounded coordination-to-execution linkage through existing Session/Turn/event mechanisms.
Project target acceptance, running, waiting, completion, failure, abort, and recovery back into WorkHub.
Define and implement the first response contract: immediate acknowledgement, wait-for-result, or an explicit hybrid.
Support natural-language correction while preserving user order and stopping only the WorkHub-owned expected Turn.
Delegate ordinary stop/cancel behavior to the authoritative target Session.
Exit: a user can delegate, observe, correct, stop, and resume work from one persistent coordination transcript.
Slice 6 — R3 routing experiment platform
Put R2.4, R3-A, and R3-B behind the same versioned strategy interface and Action Gate.
Keep R2.4 baseline fully deterministic for disposition and target selection.
Implement R3-A model-direct: the model chooses a disposition and, for delegation, one bounded valid Session candidate.
Implement R3-B model-gated-R2.4: the model chooses the disposition; R2.4 selects the target only for delegate_existing.
Disable R2.4 auto-creation inside the R3-B delegation branch.
Run all strategies with the same model/reasoning configuration, fixed Session snapshot, bounded Session summaries, WorkHub transcript prefix, Runtime state, and inputs.
Repeat model-backed runs enough times to measure consistency rather than reporting a single lucky run.
Exit: all three strategies can be compared on the same end-to-end coordination shell without changing execution safety.
Slice 7 — Evaluation, strategy selection, and rollout
Full desktop tests, typecheck, production build, lint, format check, and affected knip workspaces pass.
Navigation/restart and real-model end-to-end tests cover both answer_here and delegation.
Adversarial review finds no second authority, transcript-copying path, self-route, unsafe Stop, implicit create, stale async overwrite, or model-bypass path.
UI changes include current before/after evidence or a recording.
Deferred decisions / non-goals for the first milestone
Whether Work is 1:1 with Session, 1:N over Sessions, or an independent durable entity.
A new Work database, event store, or lifecycle.
Replacing ordinary Sessions as execution authorities.
A single global Coordination Session across Runtime Hosts.
Cross-Runtime-Host orchestration.
Copying complete target transcripts into WorkHub.
Letting a model output directly authorize creation, Stop, tools, permissions, or arbitrary Session IDs.
Full cross-Work dependency planning or large-scale semantic recall/indexing.
Existing evidence
R2.3: 8/11 deterministic routing/interaction scenarios and 7/11 strict real-model end-to-end scenarios on the fixed 10-Session snapshot.
feat(desktop): preserve WorkHub routing context #3674 merged as 464b6939, with the correction-ordering finding resolved and the GitHub CI test check passing. The merged PR records 71/71 focused WorkHub tests, 1359/1359 full desktop tests, and 2/2 reconstruction/correction E2E tests. No reproducible R2.4 baseline evaluation result is claimed here.
Goal
Evolve WorkHub from a transient Session router into a unified conversational entry point backed by one stable WorkHub Coordination Session per Runtime Host.
The user should be able to ask an ordinary question, clarify intent, continue existing work, or create new work from the same conversation. Concrete execution remains in ordinary Sessions.
The approved architecture direction is recorded in Discussion #3286. The exact routing strategy is intentionally left open until the R3 experiment is complete.
Architecture contract
Coordination Session lifecycle
Authority boundaries
The Coordination Session is a special role of Session, not a new authority outside the Session substrate. It owns only the coordination conversation; it never takes ownership of another Session's execution facts.
Coordination outcomes
Every WorkHub input resolves to one of four dispositions:
answer_here: answer inside the Coordination Session.delegate_existing: send concrete work to one bounded, valid ordinary Session.create_new: create an ordinary Session, then delegate the work to it.clarify: continue the clarification in the Coordination Session without guessing or creating.Delegation and safety
Delegation links the coordination and execution transcripts instead of copying execution history into WorkHub. The minimum linkage is:
All strategy output is advisory. A shared deterministic Action Gate validates the target and operation before any write: current Runtime Host, target existence, archive/waiting state, self-routing, expected-Turn ownership for Stop, explicit
create_new, risk confirmation, and existing tool/permission ceilings.Evolution from the current MVP
The existing work remains useful:
Delivery slices
Slices and PRs are intentionally not one-to-one. A PR may deliver multiple tightly coupled checklist items when they form one reviewable, usable loop.
Slice 0 — Close and preserve the deterministic baseline
Exit: R2.4 is mergeable, reproducible, and safe to retain behind the new coordination layer.
Slice 1 — Record the architecture decision and ubiquitous language
Coordination Session,ordinary Session,disposition,delegation,Action Gate, andprojectionin the domain language.Exit: code and review can use one unambiguous authority and lifecycle vocabulary.
Slice 2 — Coordination Session lifecycle
Exit: WorkHub always opens the correct persistent coordination conversation for the active Runtime Host.
Slice 3 — Persistent unified conversation and
answer_hereanswer_herewithout creating or selecting an ordinary Session.Exit: WorkHub is a real reusable conversation even when no concrete work is delegated.
Slice 4 — Typed coordination actions and deterministic Action Gate
answer_here,delegate_existing,create_new, andclarify.create_newthe only disposition allowed to create an ordinary Session.Exit: no routing/model strategy can directly acquire execution authority or bypass Runtime safety.
Slice 5 — Linked delegation and execution feedback
Exit: a user can delegate, observe, correct, stop, and resume work from one persistent coordination transcript.
Slice 6 — R3 routing experiment platform
delegate_existing.Exit: all three strategies can be compared on the same end-to-end coordination shell without changing execution safety.
Slice 7 — Evaluation, strategy selection, and rollout
Exit: the default strategy is evidence-backed, observable, and safely reversible.
Slice 8 — Rebuildable WorkHub projection enhancements
Exit: the unified conversation remains understandable as the number of ordinary Sessions grows.
Release gates
answer_hereand delegation.Deferred decisions / non-goals for the first milestone
Existing evidence
464b6939, with the correction-ordering finding resolved and the GitHub CItestcheck passing. The merged PR records 71/71 focused WorkHub tests, 1359/1359 full desktop tests, and 2/2 reconstruction/correction E2E tests. No reproducible R2.4 baseline evaluation result is claimed here.