Skip to content

Results from this documentation version only.

    ← Alcubi Delegator

    Review, continue, and accept work

    A READY ticket is waiting for your judgment. Delegator is designed for work that a human will review. It’s up to you decide whether the work meets the ticket’s requirements.

    Use your actual ticket ID in place of 42. Leave the default ID out of the command to default to the first READY ticket for the project. From the project’s primary checkout:

    Terminal window
    ticket_id=42
    dg ticket show "$ticket_id"
    dg ticket runs "$ticket_id"
    worktree=$(dg ticket show "$ticket_id" --worktree-only)
    branch=$(dg ticket show "$ticket_id" --branch-only)
    git -C "$worktree" status --short
    git -C "$worktree" log -5 --oneline
    git diff HEAD..."$branch"

    Compare the diff with the ticket’s scope. Run the relevant tests and build commands in the worktree. Check any behavior a passing test suite does not cover, such as an interface or a migration.

    If you have a Git diff tool configured, dg ticket diff opens the ticket’s change in it:

    Terminal window
    dg ticket diff "$ticket_id"

    You see the work on the ticket branch compared with the project’s default branch. Git launches whichever tool diff.tool names in your Git configuration, so there is nothing to set up in Delegator. The command returns once you close the tool.

    ID is optional. With no ID, it will default to the first READY ticket for the project.

    When the agent supports terminal resume, reopen the ticket’s existing session:

    Terminal window
    dg ticket chat "$ticket_id"

    This will resume the session that the agent used to complete the work. This is where you can ask the agent for corrections without needing a new context session.

    When you ask for a change, the ticket goes back to RUNNING while the agent works, then returns to READY once it completes the change. Asking questions without requesting a change leaves the ticket READY.

    ID is optional. With no ID, it will default to the first READY ticket for the project.

    It requires a recorded session, an existing worktree, and a registered resume command; it cannot attach while the ticket is RUNNING.

    Review the new diff and repeat the relevant checks. You can exit the chat session after the revised work is complete.

    When a ready ticket conflicts with the default branch

    Section titled “When a ready ticket conflicts with the default branch”

    While a READY ticket waits for your review, other work can land on the default branch. If the ticket’s commit no longer merges cleanly, the inbox marks its row with conflict, and dg ticket show adds a merge line naming the branch:

    merge conflicts with main

    You don’t need to do anything at this point. Delegator starts a conflict run, which sends the ticket back to RUNNING while the agent merges the default branch into the ticket branch, resolves the conflicts, reruns the project’s checks, and commits the result. The ticket then returns to READY with the new work added on top of what you already saw. The agent merges rather than rebases, so commits you have reviewed stay exactly as they were.

    A few things worth knowing about conflict runs:

    • The agent starts a fresh session in the ticket’s existing worktree.
    • No free slot is needed, since a READY ticket already holds one.
    • A conflict triggers one run. Another only starts if the default branch moves again and still conflicts.
    • Nothing starts while the queue is paused.
    • If the run fails, the ticket becomes FAILED like any other run.

    Each conflict run spends agent tokens. If you would rather handle the merge yourself, turn them off:

    Terminal window
    dg config set resolve_conflicts false

    The inbox still shows conflict, so you know which tickets need attention. Merge the default branch into the ticket branch in its worktree, or ask the agent to do it through dg ticket chat, then record the new commit with dg ticket finish.

    Whoever does the merge, dg ticket finish refuses a commit that still conflicts with the default branch.

    From the primary checkout on the intended receiving branch:

    Terminal window
    git merge "$branch"
    dg ticket accept "$ticket_id"

    Acceptance checks the branch has been incorporated into the project’s current HEAD and refuses to remove a dirty worktree. It then marks the ticket DONE, removes its worktree, and gives eligible queued work a chance to start.

    Terminal window
    dg ticket cancel "$ticket_id"

    Cancellation stops the running agent when necessary and closes the ticket as CANCELLED. It keeps the worktree for inspection if work has started.

    Dependent tickets still need their prerequisites resolved. If you cancel a ticket that blocks others, you will need to remove the dependency for the blocked work to start.

    For a failed run you want to continue, see recovery steps.

    Reference: dg ticket show, dg ticket runs, dg ticket diff, dg ticket chat, dg ticket finish, dg ticket accept.