com um clique
absurd
// Debug and operate Absurd durable workflows with absurdctl. Use when working with Absurd queues, tasks, runs, events, retries, schema setup, or when a user wants to inspect, spawn, retry, cancel, or wake workflows.
// Debug and operate Absurd durable workflows with absurdctl. Use when working with Absurd queues, tasks, runs, events, retries, schema setup, or when a user wants to inspect, spawn, retry, cancel, or wake workflows.
| name | absurd |
| description | Debug and operate Absurd durable workflows with absurdctl. Use when working with Absurd queues, tasks, runs, events, retries, schema setup, or when a user wants to inspect, spawn, retry, cancel, or wake workflows. |
| license | Apache-2.0 |
Use this skill when the project uses Absurd, the Postgres-native durable workflow engine, or when the user mentions absurdctl, queues, durable tasks, runs, retries, sleeping tasks, or events.
t_, r_, c_, e_, w_).Important distinction:
task_id = the whole workflow across all attemptsrun_id = one specific execution attemptabsurdctl worksIf absurdctl is not on PATH, check whether you are inside a repo checkout and, if so, use:
export PATH="$PWD:$PATH"
Absurd connection precedence is:
--database > ABSURD_DATABASE_URL > PGDATABASE > postgresql://localhost/absurd
For non-URI connections, PGHOST, PGPORT, PGUSER, and PGPASSWORD are also honored.
Prefer absurdctl state inspection before source inspection. Usually you do not need to read application code first.
If the user explicitly asks you to use absurdctl to inspect or fix a workflow, do that first instead of starting with rg / source browsing.
When the user wants to debug a task, start with these commands in order:
absurdctl list-queues
absurdctl list-tasks --queue=default --limit=20
Notes:
list-tasks defaults to 50 rows if --limit is omitted.pending, running, sleeping, completed, failed, cancelled.absurdctl list-tasks --queue=default --status=failed --limit=20
absurdctl list-tasks --queue=default --status=sleeping --limit=20
absurdctl dump-task --task-id=<task-id>
absurdctl dump-task --run-id=<run-id>
dump-task is the most important inspection command. It shows things like:
faileddump-task --task-id=<task-id>--run-id.sleepingdump-task --task-id=<task-id>runningdump-task --task-id=<task-id>Do not assume you need to start or modify a worker.
pending to sleeping, running, or completed, a worker is already active.pending, then investigate whether a worker for that queue is actually running.After you know the task name, search the codebase for its registration.
TypeScript / JavaScript:
rg -n "registerTask\(|name:\s*['\"]<task-name>['\"]" .
Python:
rg -n "register_task\(|@.*register_task|['\"]<task-name>['\"]" .
If the task is waiting for an event, also search for the event name.
Use -P key=value for strings and -P key:=json for typed JSON values.
absurdctl spawn-task my-task -q default -P foo=bar
absurdctl spawn-task my-task -q default -P count:=42 -P enabled:=true
absurdctl spawn-task my-task -q default -P user.name=Alice -P user.age:=30
Use --params when the user already has a JSON object:
absurdctl spawn-task my-task -q default --params '{"foo":"bar","count":42}'
absurdctl retry-task <task-id>
absurdctl retry-task <task-id> --max-attempts 5
absurdctl retry-task -q default <task-id> --spawn-new
Guidance:
retry-task retries the existing task--spawn-new creates a brand-new task with the original inputsabsurdctl cancel-task <task-id>
absurdctl cancel-task -q default <task-id>
absurdctl emit-event order.completed -q default -P orderId=123
absurdctl emit-event approval.granted:42 -q default -P approved:=true
If the event payload should be structured JSON:
absurdctl emit-event shipment.packed:42 -q default --payload '{"trackingNumber":"XYZ"}'
Use these on a blank or controlled database, or when the user explicitly asks:
absurdctl init
absurdctl schema-version
absurdctl migrate
absurdctl create-queue default
Be careful with state-changing commands. Unless the user clearly wants them, avoid running these blindly on a shared or production database:
initmigratecreate-queuedrop-queuecleanupcancel-taskretry-taskemit-eventspawn-taskIf the environment is ambiguous, ask which database / queue is safe to operate on.
defaultabsurdctl list-queues
absurdctl list-tasks --queue=default --status=failed --limit=20
absurdctl dump-task --task-id=<task-id>
absurdctl list-tasks --queue=default --status=sleeping --limit=20
absurdctl dump-task --task-id=<task-id>
absurdctl emit-event <event-name> -q default -P key=value
absurdctl spawn-task my-task -q default -P foo=bar
absurdctl list-tasks --queue=default --task-name=my-task --limit=5
absurdctl dump-task --task-id=<task-id>
Fast path when the user says “spawn a task and debug it”:
absurdctl spawn-task my-task -q default -P foo=bar
absurdctl list-tasks --queue=default --task-name=my-task --limit=5
absurdctl dump-task --task-id=<task-id>
# then either:
absurdctl emit-event <event-name> -q default -P key=value
# or:
absurdctl retry-task <task-id>
absurdctl <command> --help for full options.dump-task --task-id is usually the best starting point once you know the task.