Associate an existing pull request with a Polygraph session.
Use to link PRs that were created outside of Polygraph (e.g., manually or by CI) to the current session. Provide either a prUrl or a branch name. In a multi-repo session, pass target to disambiguate which repo the branch belongs to when using branch-based lookup.
Arguments
Section titled “Arguments”| Name | Type | Required | Description |
|---|---|---|---|
sessionId | string | yes | The Polygraph session ID. |
prUrl | string | no | URL of an existing pull request to associate with the session. |
branch | string | no | Branch name to find and associate PRs for. Used when prUrl is not provided. In a multi-repo session, requires target to disambiguate which repository the branch belongs to. |
target | string | no | Repository full name (owner/repo) or repository id identifying which session repository this PR belongs to. Required when using branch in a multi-repo session. Optional (and ignored) when prUrl is provided. |
description | string | no | User-facing Polygraph session description text. The CLI saves it to the session description timeline. |
agentSessionId | string | no | The AI agent session ID. Can be used to resume the session later. |