github / github/app

Let the agent/SDK detach (promote to top-level) and pin sessions programmatically

Open
#2,635 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
2.1k
Forks
153
PR merge metrics
No merged PRs in 30d

Description

### Feature summary

Give the agent (and the app SDK) a way to promote a session to top-level and pin it programmatically — the same "detach" + "pin" actions that exist in the UI today.

### What problem are you trying to solve?

I orchestrate work across several dedicated, long-lived sessions (control dashboards, a repo-owner session, etc.). When the agent creates one of these via `create_session`, it always nests under the creating session. To make these dedicated sessions easy to find and durable, I want them to be **top-level and pinned**.

Right now that's only possible manually through the UI ("detach" then "pin" on each session). There is no agent tool or SDK call to do it, so any automated bootstrap flow (create the dedicated sessions on a new machine) leaves them buried as nested children until I fix the hierarchy by hand.

### Proposed solution

Expose the existing UI capabilities to the agent/SDK, e.g.:

- A tool/SDK method to **detach** a session (reparent to top-level), and
- A tool/SDK method to **pin/unpin** a session.

Ideally `create_session` could also accept optional flags like `top_level: true` and `pinned: true` so a dedicated session can be created in its final placement in one step.

### Workflow impact

Makes agent-driven, multi-session topologies fully self-setting-up: the bootstrap step can create the dedicated sessions AND place/pin them correctly, so a new machine ends up with the same clean, pinned top-level layout without any manual UI fiddling.

### Installation context

GitHub Copilot desktop app on Windows. Multi-session orchestration created via the agent's `create_session` tool.

### Additional context

Related to a canvas-bootstrap request (project canvases in the "Start from canvas" picker) — together they'd let a project ship a portable, self-bootstrapping, self-organizing multi-session control setup.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the agent's create_session tool and the existing UI actions for detaching and pinning sessions. Define the agent/SDK entry points and session behavior needed so newly created sessions can become top-level and pinned, including the proposed create_session flags; done means the placement can be established without manual UI steps.

Written by the indexing model from the issue text.

Assessment

Domain
api, desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.