Skip to main content

Open a pull request

When the work is ready, press Open PR in the chat footer. The agent commits anything pending, pushes the branch and opens a pull request against the Target Branch. A pull request that is ready for review moves the session to Under Review. When you merge it on GitHub, the session moves to Completed.

Open the pull request​

  1. Check the work in the Preview and in the Changes tab. See Review the changes.
  2. Press Open PR in the chat footer. On the board, you can instead drag the session's card from Active to Under Review.
  3. Read the agent's reply. It links the pull request and says which branch it targets, whether it is a draft, and which reviewers it asked for.

If the agent is working when you press it, the request waits Up next and runs after the current turn. Your unsent message in the composer stays where it is.

Open PR appears once the branch has commits and nothing is left to commit or push. With the Commits preference on Manual, commit and push first, or ask the agent in the chat to open the pull request.

What the agent does​

Open PR runs as an ordinary turn. It sends /kosuke:open-pr, or $kosuke:open-pr on a Codex session. A Custom or Personal Skill named open-pr never takes its place.

  • It commits and pushes the pending work, whatever your Commits preference says.
  • It writes a title and a description with a summary of the changes. The title also becomes the session's title.
  • It opens the pull request ready for review. If one is already open for the branch, it updates that one instead.

To open a draft, request reviewers or add evidence links, type /kosuke:open-pr ($kosuke:open-pr on a Codex session) with its flags, as /kosuke:open-pr describes.

Draft or ready for review​

The pull request's state on GitHub decides where the session sits.

Pull requestSession
Ready for reviewUnder Review
DraftActive

A draft keeps the session Active, so you can keep working with the agent. When it is done, press Ready for review in the chat footer, or drag the card to Under Review. Kosuke marks the pull request ready on GitHub and the session moves to Under Review. Changing the draft state on GitHub moves the session the same way.

Under Review and Resume​

A banner above the composer reads "Ready for review" with a link to the pull request and a Resume button. A turn already running finishes, and messages waiting Up next pause.

To keep working, send a message, press Resume, or drag the card back to Active. Kosuke turns the pull request back into a draft and the session returns to Active; a message you sent goes out after that.

A session after Open PR. Above the composer, a banner reads "Ready for review" with a hint that starts "Send a message or Resume", the pull request number #474 and a Resume button. The composer reads "Type your message" under a "1 unresolved comment" chip, and the session in the sidebar carries a PR badge. On the right, the Changes tab shows the Branch scope with its comment folded to "Outdated comment".

Where it targets​

The pull request opens against the Target Branch. That is the branch in Open PRs against, in the Advanced tab of the project settings. When that setting is empty, it is the repository's default branch.

If the setting changes after a pull request is open, the agent asks you whether to move the pull request the next time it updates it.

Whose GitHub account opens it​

The pull request comes from the GitHub account of the member who pressed Open PR, when they have a GitHub Connection. Otherwise the Kosuke App opens it, and the description names who asked for it. Ready for review, the Resume button and a card drag act on GitHub the same way. A message that resumes the session converts the pull request as the Kosuke App. The agent says in the chat which account it is about to use.

If GitHub refuses your account because you cannot write to the repository, the agent opens the pull request as the Kosuke App and tells you. You connect GitHub in Settings > Your Account > Account, as Import a repository describes.

How the Commits preference affects pushing​

The Commits preference of whoever sends a message applies to that turn. Set yours in Settings > Your Account > Preferences. See Your account and preferences.

CommitsWhat happens at the end of a turn
Automatic (the default)The agent commits and pushes its changes through the repository's hooks. A file it leaves out stays in the sandbox, and the agent says why. An open pull request updates after every turn.
ManualThe changes stay uncommitted. You commit them from the chat footer, or ask the agent to.

Open PR commits and pushes in both modes.

Follow the pull request​

The session carries a PR badge in the sidebar and on its board card. Its color sums up the pull request. Hover it for the details, such as "Checks passed (3)" or "Conflicts". The first row below that applies sets the color.

ColorSummaryMeans
RedChanges need attentionChecks failed, or the pull request has conflicts.
AmberChanges are waitingChecks are running or pending, GitHub reports non-passing checks (unstable), or the branch is behind.
GreenReady to finishGitHub reports the pull request mergeable with nothing blocking it, and it is not a draft.
PinkUnder reviewThe session is Under Review.
GreyDraft or Status unavailableA draft with nothing to flag, or a Completed session, whose status Kosuke clears at merge.

When the branch falls behind the Target Branch or has conflicts, run Sync.

When it merges or closes​

On GitHubIn Kosuke
MergedThe session moves to Completed and its sandbox is removed.
Closed without mergingThe session moves to Archived and its sandbox is removed.
ReopenedThe session returns to Active or Under Review, following the draft state.

Archiving the session in Kosuke closes its pull request, and restoring it reopens the pull request. See Chat sessions and the board.

Review comments from GitHub​

Reviewers comment on the pull request on GitHub as usual. To have the agent work through them, run /kosuke:handle-pr-comments in the chat. The command resumes an Under Review session as any message does. The agent fixes or answers each unresolved comment and replies on GitHub. See /kosuke:handle-pr-comments.

Next steps​