Repository navigation
Closed
Labels
area:runtimeRuntime and tool execution architectureenhancementNew feature or requesthelp wantedExtra attention is neededpriority:P2Important but non-urgent maintenance work
Description
Context
Verified against current main at 061bd531.
Code Mode already handles recorder provenance well: nested calls cannot author project, session_id, or recording_session_id; the adapter injects the exact outer context and re-enters canonical ToolRuntime checks.
Direct model-facing calls still commonly repeat:
recording_session_id = wc_sess_...
across many independent tool calls.
The repository correctly rejects an implicit sticky recorder keyed by ClientWindow/transport/recent activity. This issue should preserve that statelessness.
Goal
Provide an explicit request-scoped/direct-mode recorder context carrier that reduces mechanical repetition without creating ambient Session state.
Possible approaches:
- a short recorder selector returned by
work_on_project; - a bounded explicit outer wrapper/context field accepted by Host orchestration;
- another server-issued selector that resolves only recorder provenance.
The implementation should choose the smallest coherent contract.
Required invariants
- Recorder context remains provenance only; it is never business Session authority.
- No implicit sticky recorder keyed by Window, MCP session, credential, Project, recent call, or transport connection.
- Business
session_idtargeting remains a separate concept. - Every ordinary tool still runs its canonical authorization, schema, permission, and effect checks.
- Context loss must not silently attach later calls to an old recorder.
- A stale/foreign recorder selector fails closed.
- Code Mode's existing server-owned nested context behavior remains unchanged.
Acceptance criteria
- After explicit bootstrap, a normal direct workflow can reuse a compact recorder context without copying the full
wc_sess_*on every call. - Omission remains valid where recorder provenance is optional.
- No call can gain business Session authority from the recorder context.
- A fresh/unrelated model context cannot inherit recorder provenance implicitly.
- Tests cover same-principal reuse, foreign principal, closed/deleted Session, and explicit business-Session/recorder separation.
- Documentation continues to state that WebCodex HTTP/MCP requests are stateless unless an exact adapter contract explicitly carries context.
Metadata
Metadata
Assignees
Labels
area:runtimeRuntime and tool execution architectureenhancementNew feature or requesthelp wantedExtra attention is neededpriority:P2Important but non-urgent maintenance work
Activity