komrad

rebase_worktree

Rebase a task's branch onto the newest commit of its base branch.

writesnot idempotentdestructiveMCP toolAgent

Komrad keeps the checkout at a ref first and mails the task's writer that its files moved. A rebase that conflicts stops and is left for the writer to resolve.

Calling it#

curl -X POST http://127.0.0.1:8787/komrad.agent.v1.AgentService/RebaseWorktree \
  -H 'Content-Type: application/json' \
  -d '{
  "task_id": "<task_id>"
}'

Request#

RebaseWorktreeRequest#

FieldTypeDescription
one of*

The task whose branch to rebase onto the base branch.

task_iduuid

The task, by id.

task_slugstring

not empty

The task, by slug.

onto_basebool

Re-target a child onto the workflow's base branch, rebasing only its own commits, so it no longer has a parent.

Response#

RebaseWorktreeResponse#

FieldTypeDescription
base_refstring

The ref the branch moved onto.

base_shastring

The commit base_ref named when komrad read it.

commitsint32

How many commits the branch had that the base branch did not.

branchstring

The branch that moved.

conflictedbool

Whether the rebase stopped on conflicts and is waiting for the agent.

movedbool

Whether the branch reached the base branch without replaying anything, as when all its commits have landed.

landed_commitsint32

How many of the branch's commits had landed. The rebase dropped them.

replay_commitsint32

How many of the branch's commits the rebase replayed.