resumeSession
Connect to an existing CodeSandbox session using its sandbox and session IDs, and create the session with optional permissions or environment variables if it is missing.
Instructions
Connect to an existing session by sandboxId + sessionId. If the session does not exist, it will be created with optional permission/env.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sandboxId": "<sandboxId>",
"sessionId": "<sessionId>"
},
"name": "resumeSession"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | Optional environment variables used if the session is created. | |
| sandboxId | Yes | Target sandbox ID that holds the session. | |
| sessionId | Yes | Identifier of the existing session to connect to. | |
| permission | No | Optional permission if the session should be created when missing. |