Projects and project tasks
Projects are daemon-owned coordination resources. They sit above sessions, runs, channels, and mailboxes without replacing any of them. Use them when you need durable work ownership, shared project membership, linked public channels, and project-scoped task tracking across multiple agent-backed sessions.What a project is
A project is a top-level daemon record with:- a stable
project_id - a display name and optional description
- a lifecycle status
- a durable member roster
- zero or more linked channels
- zero or more project tasks
- caller metadata
- a shared session
- a shared run queue
- a second public messaging system
- sessions still execute work
- runs still represent concrete execution
- channels still hold public conversation
- mailboxes still carry private inter-agent coordination
Projects versus session tasks
Kheish now has two different task concepts:- session tasks are session-scoped control records used inside the execution model
- project tasks are daemon-owned work items attached to a project
- one assignee project member
- one assignee session
- one latest associated run
- one optional public discussion thread
- other project tasks through
blocked_by
Choosing the right primitive
Use only sessions and runs when:- one execution context can own the work directly
- you do not need durable cross-session ownership or coordination
- the shared state is mainly a public conversation
- multiple sessions need durable shared membership
- work ownership or dependencies must outlive one run
- public channel discussion should stay linked to explicit task records
Members
Project members support the same member kinds used by channels:human_actorsession
- only
sessionmembers can own project tasks - the same session cannot be registered twice in one project under two different member ids
- assignment can be resolved by project
member_id,session_id, or liveagent_id
Linked channels
Projects can link existing daemon-owned channels. Each link currently stores:- the linked
channel_id - an optional semantic
role default_for_new_tasksmirror_members- caller metadata
default_for_new_tasks means:
- if a project task has no explicit discussion thread and the daemon needs to create one at start time, it uses that linked channel
mirror_members means:
- project members are mirrored into the linked channel as normal channel members
project:{project_id}:{member_id}
member_id.
Project tasks
Project tasks are daemon-owned records with:project_task_id- title and description
- status
- optional assignee member id
- optional assignee session id
- optional latest associated run id
- optional discussion reference
- dependency ids in
blocked_by - optional output
- metadata and timestamps
pendingin_progressblockedcompletedfailedcancelled
Task discussion threads
Project tasks can point at one public thread through:discussion.channel_iddiscussion.thread_root_message_id
default_for_new_tasks=true, the daemon can create a kickoff thread there when the task starts.
That kickoff thread is posted by a synthetic human actor:
project-control
Starting a project task
POST /v1/projects/{project_id}/tasks/{task_id}/start starts work by creating a normal daemon run in the assigned member session.
Current start rules are strict:
- the project must be
active - the task must be assigned
- the assignee must be a session-backed project member
- all declared dependencies must already be
completed - terminal tasks must be reopened before start
- a second start is rejected while the latest associated run is still non-terminal
- reuses the current public discussion thread when it is still valid, or creates one if the project has a default linked channel
- otherwise, it can continue without any public discussion thread
- submits a normal input run in the assignee session
- stores the new
latest_run_id - keeps
primary_session_idaligned with the assignee session
queuedrun -> project task stayspending- every other current run state -> project task becomes
in_progress
Dependency validation
Project-task dependencies are validated when they are created or replaced. Current validation rejects:- missing dependency ids
- self-dependency
- cycles
completed.
Lifecycle guards
Projects participate in daemon topology rules. Current guards include:- a channel cannot be deleted while any project still links it
- a project channel link cannot be removed while non-terminal tasks still reference that channel as their discussion channel
- a session cannot be ended while it is still a project member
- a session also cannot be ended while it still owns non-terminal project tasks
Persistence and recovery
Projects and project tasks are persisted under the daemon state root as daemon-owned records, separate from session journals and separate from channel logs. That means:- projects survive daemon restart
- project tasks survive daemon restart
- project-task discussion references and latest run ids survive restart
When to use projects
Use projects when you need:- one durable work area spanning multiple sessions
- named members and explicit ownership
- linked public coordination channels
- operator-visible work decomposition that outlives one run
