Skip to main content
A pull request joins a work item when a session on that item opens or declares it. A pull request the agent opened in the session is usually linked when the session syncs. Declare it yourself when it was not. Run this inside the session, from the checkout where the pull request was opened:
To name a different repository, add --repo <owner/name>. The command sends only the session id, the repository, the pull request number and the OUTERLAYER_WORK item number. It declares onto that item or refuses. Declaring the same pull request twice is a no-op.

Open the pull request too

outerlayer work open-pr --title <text> --body-file <path> opens the pull request and declares it in one step. If a pull request is already open on the branch, it edits that one instead. Run it again after you change the title or description.
  • In a runner’s build, the gateway opens it as the factory’s GitHub App.
  • In your own session, it runs gh under your login and then declares the result.
See work open-pr.

When it refuses

Withdraw a declaration

If a pull request was declared onto the wrong item, run outerlayer work pr <number> --withdraw --item <n>. It removes that item’s declaration and leaves other items’ declarations of the pull request. It needs your own login with Withdraw others’ work. A factory key or an agent session is refused with withdraw_needs_person.

Name the session yourself

When the CLI cannot detect the session, for example from another shell, pass its id. For Claude Code, it is the id claude --resume takes. The session must still be on a work item.