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>"
}'komrad rpc rebase-worktree \
--task-id '<uuid>'{
"name": "rebase_worktree",
"arguments": {
"task_id": "<task_id>"
}
}Offered by the komrad MCP server to orchestrator agents.
Request#
RebaseWorktreeRequest#
Response#
RebaseWorktreeResponse#
| Field | Type | Description |
|---|---|---|
base_ref | string | The ref the branch moved onto. |
base_sha | string | The commit |
commits | int32 | How many commits the branch had that the base branch did not. |
branch | string | The branch that moved. |
conflicted | bool | Whether the rebase stopped on conflicts and is waiting for the agent. |
moved | bool | Whether the branch reached the base branch without replaying anything, as when all its commits have landed. |
landed_commits | int32 | How many of the branch's commits had landed. The rebase dropped them. |
replay_commits | int32 | How many of the branch's commits the rebase replayed. |