tx

tx done

Mark a task as complete

Purpose

tx done marks a task as complete by setting its status to done. This is the primary way to signal that work on a task is finished.

When a task is completed, any tasks that were waiting on it may become unblocked. The command reports which tasks are newly unblocked.

Usage

tx done <id> [options]
# Mark a task as complete
tx done tx-abc123

# Complete a task and get JSON response
tx done tx-abc123 --json
import { TxClient } from '@jamesaphoenix/tx-agent-sdk'

const tx = new TxClient({ apiUrl: 'http://localhost:3456' })

const { task, nowReady } = await tx.tasks.done('tx-abc123')
// task: SerializedTaskWithDeps (the completed task)
// nowReady: SerializedTaskWithDeps[] (tasks that became ready after completion)

Tool name: tx_done

Arguments:

ArgTypeRequiredDescription
idstringYesTask ID to mark as complete

Example request:

{
  "name": "tx_done",
  "arguments": {
    "id": "tx-abc123"
  }
}
POST /api/tasks/:id/done

Path parameters:

ParamTypeRequiredDescription
idstringYesTask ID to mark as complete

Example:

curl -X POST http://localhost:3456/api/tasks/tx-abc123/done

Arguments

ArgumentRequiredDescription
<id>YesTask ID (e.g., tx-a1b2c3d4)

Options

OptionDescription
--jsonOutput as JSON (includes task and newly unblocked task IDs)
--helpShow help

Output

Text Output

Task tx-abc123 marked as done.

Newly unblocked tasks:
  tx-def456  Add login page
  tx-ghi789  Write integration tests

JSON Output

{
  "task": {
    "id": "tx-abc123",
    "title": "Implement authentication",
    "status": "done",
    "score": 800,
    "blockedBy": [],
    "blocks": ["tx-def456", "tx-ghi789"],
    "children": [],
    "isReady": false
  },
  "unblocked": ["tx-def456", "tx-ghi789"]
}

Cascade Unblocking

When you complete a task, tx automatically checks which tasks were waiting on it:

Before tx done tx-auth:

  tx-auth [done]
      | blocks
  tx-login [blocked]
      | blocks
  tx-dashboard [blocked]

After tx done tx-auth:

  tx-auth [done]
      | blocks
  tx-login [ready]     <-- Newly unblocked!
      | blocks
  tx-dashboard [blocked]  <-- Still blocked by tx-login

Agent Workflow

#!/bin/bash
# Complete a task and immediately start the next one

# Finish current task
tx done tx-abc123

# Get next ready task
NEXT=$(tx ready --json --limit 1 | jq -r '.[0].id // empty')

if [ -n "$NEXT" ]; then
  echo "Next task: $NEXT"
  tx show "$NEXT"
fi

Idempotency

Calling tx done on an already-completed task is a no-op. The task remains in done status and no error is raised.

tx done tx-abc123  # First call: marks as done
tx done tx-abc123  # Second call: no-op, already done
  • tx ready - List tasks that are ready to work on
  • tx block - Add dependencies between tasks
  • tx reset - Reset a task back to ready status

On this page