Codevisor Docs
Api reference

POST Sessions Id Open

POST/v1/sessions/{id}/open

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

project?|null
session*
update?|null
transcriptLimit?number||||null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/sessions/string/open" \  -H "Content-Type: application/json" \  -d '{    "session": {      "projectId": "string",      "harnessId": "string"    }  }'
{  "session": {    "id": "string",    "projectId": "string",    "serverId": "string",    "harnessId": "string",    "harnessAccountId": "string",    "agentSessionId": "string",    "title": "string",    "origin": "codevisor",    "worktreeName": "string",    "workspaceId": "string",    "cwd": "string",    "checkoutId": "string",    "isArchived": true,    "archivedAt": "string",    "isDetached": true,    "configSelections": {      "property1": "string",      "property2": "string"    },    "unavailableConfigSelections": {      "property1": "string",      "property2": "string"    },    "createdAt": "string",    "updatedAt": "string",    "sidebarState": "idle",    "sidebarStateChangedAt": "string",    "usage": {      "used": 0,      "size": 0,      "inputTokens": 0,      "cachedInputTokens": 0,      "outputTokens": 0,      "reasoningOutputTokens": 0,      "totalTokens": 0,      "costAmount": 0,      "costCurrency": "string",      "costKind": "reported"    },    "latestAttentionSequence": 0,    "lastSeenAttentionSequence": 0,    "unreadCount": 0,    "hasUnreadError": true,    "actionRequired": true,    "actionRequiredKind": "question",    "pendingPlanApproval": true,    "lastTurnFailure": "error",    "talkingToAgent": true,    "latestBotMessage": {      "text": "string",      "attachmentNames": [        "string"      ]    },    "createdBy": "agent",    "createdByAgentId": "string",    "createdByAgentMachineId": "string",    "forkedFromAgentId": "string",    "forkedFromAgentMachineId": "string",    "labels": {      "property1": "string",      "property2": "string"    }  },  "transcript": {    "items": [      {        "id": "string",        "sessionId": "string",        "sequence": 0,        "role": "user",        "text": "string",        "createdAt": "string",        "updatedAt": "string",        "isGenerating": true,        "hasDetails": true,        "turnId": "string",        "startedAt": "string",        "endedAt": "string",        "stopReason": "string",        "stopDetail": "string",        "stopKind": "usageLimit",        "retryable": true,        "planDocument": "string",        "planProposedAt": "string",        "planResumedAt": "string",        "attachments": [          {            "fileId": "string",            "name": "string",            "mimeType": "string",            "sizeBytes": 0,            "kind": "image"          }        ],        "messageId": "string",        "phase": "commentary",        "origin": "event",        "attribution": {          "kind": "app",          "viewId": "string",          "plugin": "string"        },        "sentByAgentId": "string",        "sentByAgentMachineId": "string",        "textResource": {          "itemId": "string",          "entryKey": "string",          "fields": [            {              "name": "string",              "revision": 0,              "encoding": "text",              "sizeBytes": 0,              "pageCount": 0,              "generation": 0            }          ]        },        "planResource": {          "itemId": "string",          "entryKey": "string",          "fields": [            {              "name": "string",              "revision": 0,              "encoding": "text",              "sizeBytes": 0,              "pageCount": 0,              "generation": 0            }          ]        },        "textGeneration": 0,        "textRevision": 0,        "textPosition": 0,        "setupRequests": [          {            "questionId": "string",            "presentation": "browserExtensionSetup",            "outcome": "answered"          }        ],        "interactions": [          {            "id": "string",            "kind": "question",            "payload": {              "message": "string",              "questions": [                {                  "id": "string",                  "header": "string",                  "question": "string",                  "options": [                    {                      "id": "string",                      "label": "string",                      "description": "string"                    }                  ],                  "multiSelect": true,                  "allowsOther": true,                  "isSecret": true,                  "isApproval": true,                  "backOptionLabel": "string",                  "presentation": "browserExtensionSetup",                  "pluginSetup": {                    "plugin": "string",                    "catalogId": "string",                    "serverId": "string",                    "name": "string",                    "publisher": "string",                    "description": "string",                    "reason": "string",                    "auth": "none",                    "capabilities": {                      "tools": [                        {                          "name": "string",                          "description": "string",                          "effects": "read",                          "app": true                        }                      ],                      "events": [                        {                          "name": "string",                          "description": "string"                        }                      ],                      "skills": [                        {                          "name": "string",                          "description": "string"                        }                      ],                      "panes": [                        {                          "type": "string",                          "title": "string",                          "resourceUri": "string"                        }                      ],                      "ingress": [                        {                          "name": "string",                          "title": "string",                          "route": "string"                        }                      ]                    },                    "machine": {                      "id": "string",                      "name": "string"                    }                  }                }              ]            },            "answer": {              "outcome": "answered",              "answers": {                "property1": {                  "answers": [                    "string"                  ],                  "note": "string"                },                "property2": {                  "answers": [                    "string"                  ],                  "note": "string"                }              }            }          }        ],        "pluginSetups": [          {            "id": "string",            "state": "pending",            "request": {              "plugin": "string",              "catalogId": "string",              "serverId": "string",              "name": "string",              "publisher": "string",              "description": "string",              "reason": "string",              "auth": "none",              "capabilities": {                "tools": [                  {                    "name": "string",                    "description": "string",                    "effects": "read",                    "app": true                  }                ],                "events": [                  {                    "name": "string",                    "description": "string"                  }                ],                "skills": [                  {                    "name": "string",                    "description": "string"                  }                ],                "panes": [                  {                    "type": "string",                    "title": "string",                    "resourceUri": "string"                  }                ],                "ingress": [                  {                    "name": "string",                    "title": "string",                    "route": "string"                  }                ]              },              "machine": {                "id": "string",                "name": "string"              }            }          }        ],        "apps": [          {            "viewId": "string",            "machineId": "string",            "serverId": "string",            "serverName": "string",            "toolName": "string",            "resourceUri": "string"          }        ],        "compaction": "started",        "revision": 0      }    ],    "nextBefore": "string",    "nextAfter": "string",    "hasNewer": true,    "hasMore": true,    "eventCursor": 0,    "stateUpdates": [],    "setupActivities": [],    "pendingQuestion": {      "sessionUpdate": "question",      "questionId": "string",      "message": "string",      "questions": [        {          "id": "string",          "header": "string",          "question": "string",          "options": [            {              "id": "string",              "label": "string",              "description": "string"            }          ],          "multiSelect": true,          "allowsOther": true,          "isSecret": true,          "isApproval": true,          "backOptionLabel": "string",          "presentation": "browserExtensionSetup",          "pluginSetup": {            "plugin": "string",            "catalogId": "string",            "serverId": "string",            "name": "string",            "publisher": "string",            "description": "string",            "reason": "string",            "auth": "none",            "capabilities": {              "tools": [                {                  "name": "string",                  "description": "string",                  "effects": "read",                  "app": true                }              ],              "events": [                {                  "name": "string",                  "description": "string"                }              ],              "skills": [                {                  "name": "string",                  "description": "string"                }              ],              "panes": [                {                  "type": "string",                  "title": "string",                  "resourceUri": "string"                }              ],              "ingress": [                {                  "name": "string",                  "title": "string",                  "route": "string"                }              ]            },            "machine": {              "id": "string",              "name": "string"            }          }        }      ],      "autoResolutionMs": 0    },    "pendingPlanApproval": true,    "backgroundTasks": [      {        "id": "string",        "description": "string",        "status": "string",        "taskType": "string",        "toolUseId": "string",        "startedAt": "string",        "command": "string",        "hasOutput": true,        "canStop": true      }    ],    "goal": {      "objective": "string",      "status": "active",      "activity": "planning",      "tokenBudget": 0,      "tokensUsed": 0,      "timeUsedSeconds": 0,      "createdAt": "string",      "updatedAt": "string"    },    "skills": {      "skills": [        {          "name": "string",          "description": "string",          "invocation": "string",          "source": "builtin"        }      ],      "invocationPrefix": "string",      "commands": [        "string"      ]    },    "sessionPlan": {      "entries": [        {          "content": "string",          "priority": "high",          "status": "pending"        }      ]    },    "usage": {      "used": 0,      "size": 0,      "inputTokens": 0,      "cachedInputTokens": 0,      "outputTokens": 0,      "reasoningOutputTokens": 0,      "totalTokens": 0,      "costAmount": 0,      "costCurrency": "string",      "costKind": "reported"    },    "updateGate": {      "harnessId": "string",      "harnessName": "string"    },    "autoResume": {      "state": "scheduled",      "resumesAt": "string"    }  },  "runtime": null}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}