Skip to main content
Glama
choruzo
by choruzo

Create a persistent OpenCode agent session

create_session

Start a persistent delegation session in a workspace without running a task yet. Follow up with send_message to keep the agent's context between calls.

Instructions

Create a persistent delegation session in a workspace without running a task yet. Follow up with send_message to keep the agent's context between calls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdYesWorkspace directory for the session.
agentNoAgent to use (default: researcher). See list_agents.
modelNoOverride the model as "provider/model" (default: the agent or user default).
titleNoHuman-readable session title.
allow_bashNoGrant (true) or revoke (false) shell commands for this session.
allow_editsNoGrant (true) or revoke (false) file edits for this session.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0-alpha.1

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations supply only openWorldHint=true, so safety/lifecycle behavior is mostly unspecified. 'Persistent' and 'keep the agent's context between calls' disclose server-side state retention, which is real added value, but nothing is said about session lifetime, default permissions, or the effect of the allow_bash/allow_edits grants.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, zero filler. The purpose is front-loaded and the follow-up instruction is packed into the second sentence without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a six-parameter session-creation tool with thin annotations and no output schema, the description omits what the call returns (a session identifier presumably needed for send_message) and says nothing about permissions defaults. Purpose and next step are covered, but the agent lacks enough to use the result confidently.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all six parameters (cwd, agent, model, title, allow_bash, allow_edits) are already documented in the schema with defaults and cross-references to list_agents. The description adds no parameter-level detail beyond that, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource: creating a persistent delegation session in a workspace. The clause 'without running a task yet' usefully separates it from the task-executing sibling delegate_task, though it never names that sibling explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly directs the follow-up step ('Follow up with send_message to keep the agent's context between calls'), which is the key lifecycle guidance. It does not state the converse case for delegate_task or list any exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.