Learning resourcesReviewed · GitHub

Run the Copilot runtime in process

This GitHub guide shows application developers how to host the Copilot SDK runtime inside their application, but the feature is experimental and requires validation on each deployment platform. It covers six language SDKs, native-library packaging, configuration and shared-process constraints.

Researched 24 Nov 2026

In short.

This GitHub guide explains in-process Copilot SDK hosting for application developers, with experimental support and shared process state as its main constraints. The SDK loads a compatible native library and keeps its existing JSON-RPC behavior while removing separate runtime-process management. Deployment requires matching native artifacts and validation of startup, model turns and shutdown. Performance improvements, exact platform compatibility and operating costs are not established by the page.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage includes the complete selected documentation text at [https://docs.github.com/api/article/body?pathname=/en/copilot/how-tos/copilot-sdk/setup/in-process-runtime], including all six SDK examples, the experimental warning, runtime resolution, lifecycle behavior and limitations. Linked setup guides, the Java README and the referenced diagram image were not independently assessed. No code or runtime was executed; deployment compatibility, model turns, shutdown behavior and performance remain untested.

The overview

Identity

Run the Copilot runtime in process is GitHub documentation for an experimental Copilot SDK hosting option. It explains how to load the native runtime into the application's own process and configure it through TypeScript, Python, Go, .NET, Rust or Java.

The source is [https://docs.github.com/api/article/body?pathname=/en/copilot/how-tos/copilot-sdk/setup/in-process-runtime]. The page provides setup guidance and examples, but does not identify minimum SDK versions or a specific runtime release.

Assessment

The guide is useful when an application must avoid a separate runtime process and its developers can package native libraries for every deployment target. Its concrete benefit is removing child-process management while retaining the documented SDK interface and protocol behavior.

The tradeoff is tighter coupling to the application's process state and runtime lifecycle. The page warns that platform maturity varies and some SDK and platform combinations have reduced model-turn or shutdown coverage. It provides no measurements establishing faster startup, lower memory use or greater reliability.

Users

The intended users are developers embedding Copilot SDK capabilities in applications, particularly teams whose deployment rules prevent a separate runtime process or who want the SDK to manage the runtime lifecycle.

Using this approach requires comfort with native dependency packaging, application startup and shutdown, and process-wide configuration. Teams needing per-client working directories, different runtime versions within one process or stronger process isolation face explicit constraints.

Capabilities

The documentation states that in-process hosting supports the same SDK sessions, streaming events, tools, hooks, permissions and server-to-client requests as other transports. The native runtime runs without its own Node.js dependency, child process, TCP port or connection token.

Depending on the SDK, supported typed client settings include an authentication token, logged-in-user fallback, Copilot base directory, log level, session idle timeout and remote session mode. The absence of a transport connection token does not establish that model access needs no authentication.

Using it

Requirements

The native runtime bundle must match the host operating system, CPU architecture and, on Linux, C library. Unsupported hosts fail during runtime resolution or startup; the SDK does not fall back to a child process.

TypeScript needs no additional configuration when its package contains a compatible runtime bundle. Python deployments without startup-time runtime downloads need the documented preparation command: python -m copilot download-runtime --in-process. Go requires the build flag -tags copilot_inprocess, .NET requires allowing the GHCP001 experimental API diagnostic, and Rust requires the bundled-in-process Cargo feature.

Java requires JNA, a platform runtime classifier and experimental API opt-in. The page does not provide a complete supported-platform matrix, minimum dependency versions or account entitlement requirements.

Mechanism

The SDK loads the native runtime library through a fixed C ABI, the binary interface used to call native functions. SDK methods continue to communicate through Content-Length-framed JSON-RPC messages, carried over an in-memory connection. Startup also performs the normal SDK protocol-version handshake.

Native worker threads can invoke SDK callbacks; the SDK handles moving callbacks onto the appropriate execution context and managing their lifetime. The runtime receives a snapshot of the host environment with supported SDK-managed overrides, without mutating the host environment.

Graceful shutdown closes active sessions, requests runtime shutdown over JSON-RPC, closes connections and releases the runtime host. The native library and worker pool can remain available until the application process exits, so applications must not rely on unloading and replacing the library.

Setup

Set process-wide environment values and the application's working directory before creating the first in-process client. Then select the language-specific connection option: RuntimeConnection.forInProcess() in TypeScript and Java, RuntimeConnection.for_inprocess() in Python, copilot.InProcessConnection{} in Go, RuntimeConnection.ForInProcess() in .NET, or Transport::InProcess in Rust.

The SDK first seeks a compatible bundled or cached native library. COPILOT_CLI_PATH can point into a compatible Copilot runtime package when supplying the runtime separately. Normally, only one native library path and version can be loaded per process.

COPILOT_SDK_DEFAULT_CONNECTION=inprocess selects this transport only when a client has no explicit connection setting; an invalid value causes startup failure. The guide recommends explicit application configuration and reserves the environment variable for deployment-controlled transport selection.

Example

The Python example imports CopilotClient and RuntimeConnection from copilot, creates CopilotClient(connection=RuntimeConnection.for_inprocess()), and calls await client.start(). This illustrates selecting and starting the transport.

That snippet does not demonstrate authentication, creating a session, completing a model turn or shutting down. The guide separately recommends a deployment smoke test that starts a session and completes a model turn, followed by graceful client shutdown. No example was executed.

Assessment & evidence

Limitations

In-process hosting is experimental in every SDK, and behavior or packaging requirements can change between releases. All clients share the host process environment, current working directory, native library and runtime worker pool. There is no per-client working directory, and loading another runtime library path or version is unsupported.

Where applicable, SDK options for an arbitrary environment, working directory, telemetry configuration, executable path or CLI arguments are rejected. Supported typed options and process-global host configuration must be used instead.

Exact platform reliability remains unverified because nothing was executed. The page also does not establish offline model execution, model data handling, resource consumption or performance under concurrent workloads.

Reasoning

The fit follows from the hosting constraints: an application that prohibits child processes can use the documented in-process transport while retaining SDK sessions and events. Its developers must accept native packaging and shared process configuration.

A practical implication of the one-version restriction is that clients in the same application cannot independently choose different native runtime versions. Applications needing different working directories for individual clients also conflict with an explicit limitation. These are architectural implications of the documented constraints, not measured outcomes.

Alternatives

The page recommends the default bundled CLI setup when process isolation and the most established deployment path matter more. It describes that approach as running the bundled runtime in a managed child process: [https://docs.github.com/en/copilot/how-tos/copilot-sdk/setup/bundled-cli].

For multiple application instances connecting to a shared runtime over TCP, it points to backend services setup: [https://docs.github.com/en/copilot/how-tos/copilot-sdk/setup/backend-services]. These comparisons come from the supplied page; the linked guides were not assessed.

Evidence

The supporting source is the complete GitHub documentation page at [https://docs.github.com/api/article/body?pathname=/en/copilot/how-tos/copilot-sdk/setup/in-process-runtime]. It contains language-specific startup examples, runtime resolution rules, lifecycle descriptions and explicit experimental warnings.

The page supports statements about documented interfaces and intended behavior. It provides no benchmark results, executable test receipts or exhaustive compatibility results. Startup, model turns, callbacks and shutdown were not independently tested.

Access & freshness

Costs

Costs are unknown. The page supplies no subscription prices, model usage charges, quotas, native-runtime fees or deployment cost estimates.

Packaging matching native artifacts and validating each deployment platform are documented requirements, but their engineering effort and infrastructure costs are not quantified. Removing a child process does not establish a financial saving.

Rights

The supplied page does not state licensing terms for the documentation, SDK packages or native runtime artifacts. Commercial-use terms, redistribution permissions and notice obligations are not established.

Although the guide instructs developers to include compatible native artifacts in deployments, it does not provide the legal terms governing that distribution. Those terms need to be established from the relevant package and runtime licences.

Freshness

The documentation was captured on 24 November 2026 at 09:42:07 UTC. The supplied page gives no publication date, last-updated date, SDK release numbers or native runtime version.

Because the feature is explicitly experimental and requirements may change between releases, compatibility with a particular installed SDK and runtime version remains unknown until checked for that deployment.

Actions

Before adopting this transport, confirm that all clients can share one working directory and runtime version. Identify every target operating system, architecture and Linux C library, and ensure each has a compatible native artifact and the required SDK configuration.

Follow the guide's deployment validation: build for each target, verify runtime availability, start a session, complete a model turn and stop clients gracefully. The experimental warning also calls for validating startup and shutdown on every deployed platform.

Establish applicable account costs and package redistribution terms separately. If process isolation is essential, evaluate the bundled CLI path; if multiple instances need a shared runtime, evaluate the backend services path.

Evidence for this report

selected-page.txtselected · checked 2026-11-24