Repository navigation
Description
Current scope and status — 2026-09-29
Audited against main at 6524f559a85d2509b7379c472bd63ceb933cd57a in the special checkout.
This issue tracks the Workflow Session first slice explicitly proposed in the original issue, not an assertion that every durable identity already has a standalone short ref. The original broad model-reference direction remains useful, but standalone Agent/Goal/AgentTask/Conversation refs (~a, ~g, ~t, ~c) are not implemented and should be evaluated in concrete workflows rather than added solely for symmetry. Agent/Attempt compound selectors are tracked separately in #575.
Already merged
- feat(session): add durable model-facing session refs #666 implements durable principal-scoped
session_ref(~sN), canonical identity resolution and no-retarget behavior. - feat(session): accept session refs for recorder provenance #670 accepts Session refs for recorder provenance without turning recorder identity into the business target.
- Existing runtime/store tests cover authority separation, closed/deleted/recreated Sessions, restart and active-Session retention. A closed retained Session follows its canonical lifecycle rules: historical reads can remain valid; a ref never reopens it.
Actual remaining gap found in this audit
The runtime accepts ~sN, but twelve typed ToolCall Session input annotations still advertise only the canonical wc_sess_* regex. In particular, strict Host-side schema validation can reject an exact work_on_project resume or Work Result Session selector before the runtime resolver is reached.
The closure patch must align these input schemas with the existing resolver, keep canonical output/persistence/audit identity unchanged, and add regression coverage for short/canonical inputs, wrong-domain or malformed refs, and independent business/recorder refs. The failing regression was reproduced with work_on_project.session_id rejects ~s1 before the fix.
Completion boundary
Close this issue when the Session input-contract follow-up is merged and its focused tests pass. Do not close it on the claim that standalone refs for all other identity domains are implemented. No database migration, new implicit-current-state lookup, Project-ref behavior change, or credential/fence shortening is required.
Canonical IDs remain supported. Every short selector must still pass ordinary principal, Project, incarnation and lifecycle checks.
Original proposal (historical context at 061bd53)
Context
Verified against current main at 061bd531.
WebCodex now has a good short-selector model for Projects:
- canonical Project identity remains
agent:<client_id>:<project_id>; - model-facing bootstrap/discovery can return a principal-scoped
project_refsuch as~p1; - the ref is not authority and every dereference re-runs current Project visibility/authorization;
- refs are pinned to one canonical Project incarnation and never silently retarget.
However, other durable model-facing identities still require their canonical IDs everywhere. There is currently no session_ref, agent_ref, goal_ref, task_ref, or conversation_ref layer.
Examples that remain mechanically repeated in normal workflows include:
wc_sess_...wc_dagent_...wc_goal_...wc_agent_task_...- Conversation identities
This is especially noticeable in multi-window / Goal / Agent workflows where several exact identities must be carried at once.
Goal
Generalize the successful project_ref pattern into a typed model reference layer for durable workflow identities, starting with Workflow Sessions.
Possible model-facing forms:
~s1 Workflow Session
~a1 Durable Agent
~g1 Goal
~t1 AgentTask
~c1 Conversation
Exact spelling is open to implementation review.
Required invariants
- Canonical IDs remain authoritative for persistence, audit, APIs/CLI, diagnostics, and internal joins.
- A short ref is a selector only, never a credential/capability.
- Ref namespace is scoped to the authenticated principal/authority.
- Dereference must run the domain's ordinary current authorization and lifecycle checks.
- A ref must pin one exact canonical incarnation and must never silently retarget or recycle.
- Stale/deleted/invisible targets fail closed.
- No "current/recent Session/Agent/Goal" inference is introduced.
- Mutable Agent handles remain metadata and must not become identity.
- Model-facing discovery/bootstrap may return both canonical identity and ref where needed, while hot-path results should avoid redundant duplication.
Suggested first slice
Implement only Workflow Session refs first:
- issue a durable principal-scoped
session_refwhenwork_on_project, Session discovery, or handoff exposes an exact Session; - accept that ref anywhere an exact Workflow Session selector is model-facing;
- re-authorize the resolved canonical Session/Project on every use;
- add cross-principal, deleted/closed/recreated, and no-retarget regression tests.
Then evaluate Agent/Goal/Task/Conversation refs using the same internal abstraction rather than independent ad-hoc mappings.
Acceptance criteria
- A model can continue an ordinary Session using a short selector without copying the canonical
wc_sess_*on every call. - Existing canonical IDs continue to work.
- Short refs grant no additional authority.
- Cross-principal reuse fails closed.
- Deletion/recreation never retargets an old ref.
- Existing Project ref behavior remains unchanged.
- Documentation explains canonical identity vs model selector clearly.
This is runtime/model-contract work, not a WebUI alias feature.
Activity
[-]Generalize project_ref into short model-facing refs for durable workflow identities[/-][+]Complete Session-first short model-facing refs and their Host input contracts[/+]