Skip to content

associate_pr

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.

NameTypeRequiredDescription
sessionIdstringyesThe Polygraph session ID.
prUrlstringnoURL of an existing pull request to associate with the session.
branchstringnoBranch 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.
targetstringnoRepository 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.
descriptionstringnoUser-facing Polygraph session description text. The CLI saves it to the session description timeline.
agentSessionIdstringnoThe AI agent session ID. Can be used to resume the session later.