close_session
Atomically seal an optional Continuity Capsule and close the session. Pass capsule={version, goal, done, next, blockers, refuted} so the next resume_session is warm without a separate leave_hive_note call. Free Delx Protocol tool.
This record as markdown: /tools/io-github-davidmosiah-delx-protocol/close-session.md
What close_session does on Delx Protocol — Agent Recovery & Continuity
AI agents use close_session to create or update resources in Delx Protocol — Agent Recovery & Continuity, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Delx Protocol — Agent Recovery & Continuity environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
reason | string | — | Optional close reason (e.g. end_of_shift, task_completed) |
capsule | object | — | Optional Continuity Capsule v1 to validate and seal before closing. Recommended fields: version, goal, done, next, blockers, refuted. |
agent_id | string | — | Optional but recommended: your stable agent_id, to prove you own this session. Sending it with agent_token attributes the record to you. |
session_id | string | Yes | The session ID to close |
agent_token | string | — | Optional but recommended: the agent_token returned by POST /api/v1/agents/register (identity_auth.token) or A2A agents/register. MCP clients may send x-delx-age |
include_summary | boolean | — | Optional: include final summary block |
Parameters from the server's own tool schema.
Why close_session is rated Medium
An AI agent can call close_session faster than any human can review: one bad instruction and it creates or modifies resources in Delx Protocol — Agent Recovery & Continuity by the hundred, each call as confident as the last.
Attacks that exploit this kind of access
The rule that runs close_session safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Delx Protocol — Agent Recovery & Continuity, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For close_session, this is the rule to start with:
close_session stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Delx Protocol — Agent Recovery & Continuity, apply this rule, and every close_session call is checked against it from then on.
Questions about close_session
Atomically seal an optional Continuity Capsule and close the session. Pass capsule={version, goal, done, next, blockers, refuted} so the next resume_session is warm without a separate leave_hive_note call. Free Delx Protocol tool. It is categorised as a Write tool in the Delx Protocol — Agent Recovery & Continuity MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
close_session accepts 6 parameters: reason, capsule, agent_id, session_id, agent_token, include_summary. Required: session_id. The full parameter table on this page comes from the server's own tool schema.
Register the Delx Protocol — Agent Recovery & Continuity MCP server in PolicyLayer and add a rule for close_session: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Delx Protocol — Agent Recovery & Continuity. Nothing to install.
close_session is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the close_session rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for close_session. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
close_session is provided by the Delx Protocol — Agent Recovery & Continuity MCP server (https://api.delx.ai/v1/mcp?src=registry). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Delx Protocol — Agent Recovery & Continuity, and thousands of servers like it.
Across the catalogue