Answer: Set the create-session cloud option to create a cloud session, optionally including repository metadata to associate it with a GitHub repository. The page provides examples in TypeScript, Python, Go, .NET, Java, and Rust. Status: Confirmed Entry: tool/github-copilot/agents-and-automation/create-cloud-session Revision: 2 Digest: sha256:c47757c3c972f9d4 (changes whenever the content changes) Timeline: Created: 2026-11-15T13:14:13Z Last changed: 2026-11-17T13:25:58Z (Rust example: . with_cloud (CloudSessionOptions:: with_repository ( CloudSessionRepository:: new ( "github" , "copilot-sdk" ). with_branch ( "main" ), )) → let session = client. create_session ( SessionConfig:: default () . with_cloud (CloudSessionOptions:: with_repository ( CloudSessionRepository:: new ( "github" , "copilot-sdk" ). with_branch ( "main" ), )) . with_permission_handler (Arc:: new (ApproveAllHandler)), ). await ?;) Last verified: 2026-11-20T13:08:06Z Next check: 2026-11-21T13:08:06Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of instruction | Set the create-session cloud option to create a cloud session. | [1] | 2026-11-20 repository metadata | You can include repository metadata to associate the cloud session with a GitHub repository. | [1] | 2026-11-20 TypeScript example | const session = await client. createSession ({ onPermissionRequest : async () => ({ kind : "approve-once" }), cloud : { repository : { owner : "github" , name : "copilot-sdk" , branch : "main" , }, }, }); | [1] | 2026-11-20 Python example | session = await client.create_session( on_permission_request=PermissionHandler.approve_all, cloud=CloudSessionOptions( repository=CloudSessionRepository( owner= "github" , name= "copilot-sdk" , branch= "main" , ) ), ) | [1] | 2026-11-20 Go example | session, err := client.CreateSession(ctx, &copilot.SessionConfig{ Cloud: &copilot.CloudSessionOptions{ Repository: &copilot.CloudSessionRepository{ Owner: "github" , Name: "copilot-sdk" , Branch: "main" , }, }, | [1] | 2026-11-20 .NET example | var session = await client.CreateSessionAsync( new SessionConfig { Cloud = new CloudSessionOptions { Repository = new CloudSessionRepository { Owner = "github" , Name = "copilot-sdk" , Branch = "main" , }, }, | [1] | 2026-11-20 Java example | var session = client.createSession( new SessionConfig () .setCloud( new CloudSessionOptions () .setRepository( new CloudSessionRepository () .setOwner( "github" ) .setName( "copilot-sdk" ) .setBranch( "main" ))) .setOnPermissionRequest(PermissionHandler.APPROVE_ALL) ).get(); | [1] | 2026-11-20 Rust example | let session = client. create_session ( SessionConfig:: default () . with_cloud (CloudSessionOptions:: with_repository ( CloudSessionRepository:: new ( "github" , "copilot-sdk" ). with_branch ( "main" ), )) . with_permission_handler (Arc:: new (ApproveAllHandler)), ). await ?; | [1] | 2026-11-20 Sources: [1] GitHub. "Cloud sessions - GitHub Docs". https://docs.github.com/en/copilot/how-tos/copilot-sdk/features/cloud-sessions Role: primary. Accessed: 2026-11-20T13:08:06Z Quote: "Set the create-session cloud option to create a cloud session." (Supports: instruction) Quote: "You can include repository metadata to associate the cloud session with a GitHub repository." (Supports: repository metadata) Quote: "const session = await client. createSession ({ onPermissionRequest : async () => ({ kind : "approve-once" }), cloud : { repository : { owner : "github" , name : "copilot-sdk" , branch : "main" , }, }, });" (Supports: TypeScript example) Quote: "session = await client.create_session( on_permission_request=PermissionHandler.approve_all, cloud=CloudSessionOptions( repository=CloudSessionRepository( owner= "github" , name= "copilot-sdk" , branch= "main" , ) ), )" (Supports: Python example) Quote: "session, err := client.CreateSession(ctx, &copilot.SessionConfig{ Cloud: &copilot.CloudSessionOptions{ Repository: &copilot.CloudSessionRepository{ Owner: "github" , Name: "copilot-sdk" , Branch: "main" , }, }," (Supports: Go example) Quote: "var session = await client.CreateSessionAsync( new SessionConfig { Cloud = new CloudSessionOptions { Repository = new CloudSessionRepository { Owner = "github" , Name = "copilot-sdk" , Branch = "main" , }, }," (Supports: .NET example) Quote: "var session = client.createSession( new SessionConfig () .setCloud( new CloudSessionOptions () .setRepository( new CloudSessionRepository () .setOwner( "github" ) .setName( "copilot-sdk" ) .setBranch( "main" ))) .setOnPermissionRequest(PermissionHandler.APPROVE_ALL) ).get();" (Supports: Java example) Quote: "let session = client. create_session ( SessionConfig:: default () . with_cloud (CloudSessionOptions:: with_repository ( CloudSessionRepository:: new ( "github" , "copilot-sdk" ). with_branch ( "main" ), )) . with_permission_handler (Arc:: new (ApproveAllHandler)), ). await ?;" (Supports: Rust example) Snapshot SHA-256: d2e986e44936ecec69c96e70f6bb781c0a5b0e5d2db4fab79da0707e30ca6e9b (captured 2026-11-18T13:03:10Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-18T13:03:10Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:08:06Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:08:06Z Last attempt: 2026-11-20T13:08:06Z Notes and limitations: Extracted automatically from a single official source (section "Creating a cloud session"). Related: https://latestn.com/tool/github-copilot/agents-and-automation/create-custom-agent-cli How do I create a custom agent for GitHub Copilot CLI? https://latestn.com/tool/github-copilot/agents-and-automation/create-custom-agent-profile How do I create a custom agent profile in GitHub Copilot in my IDE? https://latestn.com/tool/github-copilot/agents-and-automation/create-custom-agent-profile-2 How do I create a custom agent profile for GitHub Copilot cloud agent in a repository? https://latestn.com/tool/github-copilot/agents-and-automation/create-automation How do I create an automation in the GitHub Copilot app? https://latestn.com/tool/github-copilot/agents-and-automation/create-automation-2 How do I create an automation with Copilot cloud agent in GitHub Copilot? https://latestn.com/tool/github-copilot/agents-and-automation/create-cloud-agent-automations How do I create automations with the GitHub Copilot cloud agent? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-17T13:25:58Z | changed | Rust example: . with_cloud (CloudSessionOptions:: with_repository ( CloudSessionRepository:: new ( "github" , "copilot-sdk" ). with_branch ( "main" ), )) → let session = client. create_session ( SessionConfig:: default () . with_cloud (CloudSessionOptions:: with_repository ( CloudSessionRepository:: new ( "github" , "copilot-sdk" ). with_branch ( "main" ), )) . with_permission_handler (Arc:: new (ApproveAllHandler)), ). await ?; | [1] 2026-11-17T13:25:58Z | changed | Java example: .setCloud( new CloudSessionOptions () .setRepository( new CloudSessionRepository () .setOwner( "github" ) .setName( "copilot-sdk" ) .setBranch( "main" ))) → var session = client.createSession( new SessionConfig () .setCloud( new CloudSessionOptions () .setRepository( new CloudSessionRepository () .setOwner( "github" ) .setName( "copilot-sdk" ) .setBranch( "main" ))) .setOnPermissionRequest(PermissionHandler.APPROVE_ALL) ).get(); | [1] 2026-11-17T13:25:58Z | changed | .NET example: Cloud = new CloudSessionOptions { Repository = new CloudSessionRepository { Owner = "github" , Name = "copilot-sdk" , Branch = "main" , }, }, → var session = await client.CreateSessionAsync( new SessionConfig { Cloud = new CloudSessionOptions { Repository = new CloudSessionRepository { Owner = "github" , Name = "copilot-sdk" , Branch = "main" , }, }, | [1] 2026-11-17T13:25:58Z | changed | Go example: Cloud: &copilot.CloudSessionOptions{ Repository: &copilot.CloudSessionRepository{ Owner: "github" , Name: "copilot-sdk" , Branch: "main" , }, }, → session, err := client.CreateSession(ctx, &copilot.SessionConfig{ Cloud: &copilot.CloudSessionOptions{ Repository: &copilot.CloudSessionRepository{ Owner: "github" , Name: "copilot-sdk" , Branch: "main" , }, }, | [1] 2026-11-17T13:25:58Z | changed | Python example: cloud=CloudSessionOptions( repository=CloudSessionRepository( owner= "github" , name= "copilot-sdk" , branch= "main" , ) ), → session = await client.create_session( on_permission_request=PermissionHandler.approve_all, cloud=CloudSessionOptions( repository=CloudSessionRepository( owner= "github" , name= "copilot-sdk" , branch= "main" , ) ), ) | [1] 2026-11-17T13:25:58Z | changed | TypeScript example: cloud : { repository : { owner : "github" , name : "copilot-sdk" , branch : "main" , }, }, → const session = await client. createSession ({ onPermissionRequest : async () => ({ kind : "approve-once" }), cloud : { repository : { owner : "github" , name : "copilot-sdk" , branch : "main" , }, }, }); | [1] 2026-11-15T13:14:13Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/agents-and-automation/create-cloud-session/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/github-copilot/agents-and-automation/create-cloud-session POST: https://latestn.com/dispute/tool/github-copilot/agents-and-automation/create-cloud-session with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/github-copilot/agents-and-automation/create-cloud-session?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I create a GitHub Copilot cloud session in TypeScript, Python, Go, .NET, Java, or Rust? Revision 2, last verified 2026-11-20T13:08:06Z. https://latestn.com/tool/github-copilot/agents-and-automation/create-cloud-session (accessed 2026-11-21T09:54:08Z). @misc{LatestN_tool_github_copilot_agents_and_automation_create_cloud_session_r2, title = {How do I create a GitHub Copilot cloud session in TypeScript, Python, Go, .NET, Java, or Rust?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/agents-and-automation/create-cloud-session}}, note = {Revision 2; digest sha256:c47757c3c972f9d4; last verified 2026-11-20T13:08:06Z; accessed 2026-11-21T09:54:08Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/github-copilot/agents-and-automation/create-cloud-session