Skip to main content

Pull requests, updates, and conflicts

The Pull Request section appears only in a Ghast-managed worktree. GitHub CLI must be installed, authenticated, and able to access the current repository. Regular workspaces still support branches, commits, pulls, and pushes, but not this complete PR control set.

Connect the correct GitHub account​

If the panel says GitHub CLI is unavailable, use the installation entry. If it is installed but signed out, follow the authentication flow and refresh Git. Before continuing, verify the active CLI account, repository remote, and target organization so the PR is not created or merged with the wrong account.

Before creating a PR​

Confirm that:

  1. The workspace and current branch belong to this task.
  2. The worktree contains no missing target change or unrelated file.
  3. Required changes are committed and pushed.
  4. The PR base branch is correct.
  5. Local checks, remote checks, and omitted validation are explicit.
  6. Commits contain no secrets, build output, or personal files.

When no PR exists, the panel offers Create PR. After creation it can show the number, title, state, draft state, additions, deletions, and file count, plus a link to open it in a browser.

These controls do not run one fixed script. Each sends a request to the main coding conversation and starts an agent run:

ControlWork requested from the agent
Create PROrganize one or more Conventional Commits, then create the PR with gh pr create.
FixDownload failing CI logs to a local file, then ask the agent to read them, modify code, commit, and push.
Commit & PushOrganize Conventional Commits and push the current branch.
PushPush the current branch only.

The action row changes with local state. Local worktree changes show only Commit & Push. No local changes plus unpushed commits shows Push. When neither exists, it shows Update and Merge. Merge is enabled only when GitHub reports MERGEABLE. After every agent run, inspect the conversation result, diff, Git, and the GitHub remote again.

Checks and review​

The panel summarizes CI checks, review, and mergeability. A failed item can offer Fix. Ghast first saves the failing CI logs to a local file, then includes that path in the coding request. Open the failure first and verify that it belongs to the current commit. Starting another fix run does not cancel an earlier remote job.

Passing checks and approved review report GitHub state only. Sign-in, device permissions, external Providers, human approval, and the real product flow still require separate verification.

Update starts a rebase immediately​

Update has no preview or second confirmation. Selecting it immediately rebases the task branch onto the detected base. First verify the base branch, a clean worktree, saved commits, and the absence of another Git operation in Terminal.

When a conflict occurs and the client recognizes an active rebase, the panel shows conflict files, progress, Resolve with AI, Continue Rebase, and Abort Rebase. If no conflict card appears, inspect the actual rebase state in both Git and Terminal.

Resolve with AI uses the global Tool Model under Settings → General, not the model selected for this coding session. It generates complete file content, overwrites the conflict file immediately, and runs git add; there is currently no preview or confirmation before that write. The panel then shows an explanation and confidence level, neither of which proves correct behavior. Open every written file and its diff, then select Continue Rebase only when all conflicts are correct. Choose Abort Rebase when a safe result is unclear, then handle the update manually.

Merge starts a squash merge immediately​

Merge has no second confirmation. Selecting it immediately requests a squash merge. Before clicking, verify the PR, base branch, active GitHub account, checks, review state, and that the repository accepts squash merges.

After a successful merge, Ghast offers:

Current labelResult
Keep worktreeRetain the local worktree and task branch, and clear the saved PR association from this worktree
Delete worktreeForce-remove the worktree checkout and delete Ghast’s worktree record; the task branch remains
Delete and archive conversationPerform the same worktree cleanup and permanently delete associated conversations; this is not a recoverable archive, and the task branch remains
Decide laterLeave cleanup pending for later

Before deleting, inspect uncommitted files, unpushed commits, terminal output, and conversation conclusions you still need. Cleanup force-removes the worktree, but Ghast can remove its Workspace record even if filesystem cleanup failed; verify whether the path still exists afterward. Delete the task branch separately only after confirming it is no longer needed. Cleanup does not back up code or conversations.

Verify the result

The secondary copy under Delete worktree can currently say that the branch is removed too, but the cleanup operation removes only the worktree checkout and Ghast record; the task branch remains. Check both the branch and path in Git afterward, then decide separately whether to delete the branch.