Project and session ownership
A Workplace Project owns the workspace root, project lifecycle, ordering, reusable member configuration, and the durable Project Member roster. It is not a transcript. A Session owns one conversation: messages, streams, approvals, deliveries, optional Plan, and runtime participation.Session.projectId is absent for a standalone chat
and set for a project session. Both kinds use the same ses_… ID and the same
session APIs.
Project creation does not create an implicit session. Sessions are created and listed
explicitly under their project:
Managed workspace scopes
Managed project agents use four collaboration scopes under the project’s Monad data directory. This directory is separate fromSession.cwd, which remains the source
working directory used to launch the provider.
Monad passes the four concrete shared, agent, session, and runtime directories to the
provider adapter as additional working roots. It does not pass the containing project
directory as one broad root. The provider’s sandbox is responsible for enforcing those
roots; host processes and users still have their normal operating-system access.
Use stable IDs in paths.
projectMemberId keeps one member’s agent workspace stable
across sessions, while sessionId makes a session workspace common to every bound
member. Display names and provider names are mutable and must not determine storage
identity.
The shared workspace owns MEMORY.md and memories/. Writers use MEMORY.md.lock
when updating that shared index or its detail files. Runtime tokens stay in the private
runtime workspace and are written with owner-only permissions where the platform
supports them.
Experience-owned documents
An Experience may impose a narrower ownership rule than the filesystem. The Kanban Experience stores its stage documents in the session scope:Identity versus participation
These records have separate lifetimes:- Profile — reusable provider and launch defaults.
- ProjectMember — stable project-local identity: profile reference, display name, custom prompt, launch/working-directory overrides, and enabled/disabled lifecycle. Creating two members from one Profile creates two identities.
- SessionBinding — one Project Member’s participation in one Session: delivery and visibility cursors, current native runtime reference, participation lifecycle, and last health.
- Native runtime session — replaceable provider execution state, process/session reference, working path, and reconnect metadata.
{ member, binding } from
sessionMemberBindingSchema. Session member APIs include:
Compatibility member inputs
WorkplaceProject.memberTemplates and the legacy session_members storage remain as
compatibility/authoring inputs while the canonical runtime model is
ProjectMember plus SessionBinding. Inviting a template or spawning an ad-hoc member
must resolve to a durable project identity and a session-local binding; clients must
not invent a second session-member view model on the wire.
Invariants
- Projects never receive chat messages directly.
- Every message, observation, delivery, approval, and Plan mutation is Session-scoped.
- Durable fanout creates Delivery records; it is not a hidden task scheduler.
- Provider/runtime identifiers never replace Project Member identity.
- Runtime recovery reconciles existing bindings and delivery cursors before sending more work.
- Profile, Project Member, Session Binding, and native runtime configuration are resolved in that order and frozen where required for audit/resume.