Cloud session GitHub status
claude_get_sessionReads a cloud session job's progress, result, or error by job ID; with a session ID or URL, reports its pushed branch and opened pull request.
Instructions
With a job id from claude_create_cloud_session, report that create's progress in job (status, elapsed time, the tail of the CLI output, and session_id once the CLI prints it), its final result once job.status is done, or its error. With a job id from claude_run_local, report that run in local_job the same way. A job read uses memory only and runs nothing. With a session id or URL, report the branch a cloud session pushed and any pull request it opened. Prepares the github.com checkout in CLAUDE_MCP_REPO_CACHE (origin set to that repository), then runs print-mode claude --teleport=<session> --debug there and stops when the CLI exits. Print mode checks out the session branch and exits; it is not given a prompt and it is not started on a terminal, so it does not continue as a local interactive session. The branch is taken from the debug line Branch after checkout when that matches HEAD, otherwise from a HEAD move. The pull request number and URL come from that output when present, otherwise from a read-only gh pr list. Claude's GitHub app (or /web-setup) is what pushes the branch and opens the pull request; this tool only reads them.
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": {
"session": "<session>"
},
"name": "claude_get_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | No | github.com owner/name the session was started in. Omit when this server created the session with repo set; that repository is recorded in the cache. Ignored for a job id. | |
| session | Yes | What to read: a job id (job_...) returned by claude_create_cloud_session, or a cloud session id (session_... / cse_...) or https://claude.ai/code/... URL. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cli | Yes | ||
| job | Yes | Set when `session` was a create job id: that create's progress or result. The other fields are then null, false or empty. | |
| args | Yes | ||
| repo | Yes | github.com owner/name the status read used. | |
| branch | Yes | Branch the cloud session pushed, or null when none is checked out yet. | |
| parsed | Yes | True when the pushed branch was identified. | |
| pr_url | Yes | ||
| pr_error | Yes | Set when gh could not look up a pull request. Null when there is no pull request. | |
| local_job | Yes | Set when `session` was a claude_run_local job id: that run's progress or result. The other fields are then null, false or empty. | |
| pr_number | Yes | ||
| pr_source | Yes | Where the pull request fields came from. | |
| session_id | Yes | ||
| base_branch | Yes | Branch the cache was reset to before teleport. |