pub struct CreateSessionInput {
pub id: String,
pub project_id: Option<ProjectId>,
pub title: Option<String>,
pub title_generated: Option<bool>,
pub system_prompt: Option<String>,
pub model: Option<String>,
pub model_ref: Option<ProviderModelRef>,
pub reasoning_effort: Option<ReasoningEffort>,
pub gold_config_json: Option<String>,
pub workspace_path: Option<String>,
pub permission_mode: Option<SessionPermissionMode>,
}Expand description
Request-level input for session creation.
Fields§
§id: String§project_id: Option<ProjectId>Stable Project membership for this root session.
title: Option<String>§title_generated: Option<bool>Explicit title lifecycle supplied by the client. When omitted, an explicit non-empty title is treated as finalized for backwards compatibility, while a default server title remains pending.
system_prompt: Option<String>§model: Option<String>§model_ref: Option<ProviderModelRef>§reasoning_effort: Option<ReasoningEffort>§gold_config_json: Option<String>§workspace_path: Option<String>Optional workspace path, same semantics as ChatTurnInput::workspace_path
(#480: connect bridge sets workspace at session-creation; an external
connector using POST /sessions should be able to as well). Only the
metadata write happens here — syncing the runtime workspace directory
on disk (ensure_session_workspace) is a handler-layer concern, same
split as the chat turn use case.
permission_mode: Option<SessionPermissionMode>Initial session-scoped permission mode, already resolved by the caller
(explicit request value wins over the durable permission-policy
default). None leaves the runtime default (Default) untouched so
callers without permission context keep the old behavior.