← All changes
fix· GitHub

Tasks keep the pull request the agent opened

When the agent opens a pull request during a run, the task now records it as its own.

The lookup we used to read a newly opened PR asked GitHub's CLI for a field it doesn't offer, so it failed on every call and a task could miss its own pull request. We now read the PR through GitHub's API. Matching is also stricter: the ticket has to appear as a whole word in the branch or title, so sin-33 no longer matches sin-330, and a PR picked out of the agent's output has to come from the task's repository or one enabled for your workspace.

#1543