aiworkhub_task_amend_pending
Amend a pending, never-launched card to fix its validation, scope, objective or required outputs instead of archiving and re-creating it, with refusals for any card already launched or claimed.
Instructions
MANAGER WRITE: amend a pending card that no request was ever launched for.
Use this to widen a card's scope or fix its validation before its first
launch, instead of archiving and re-creating it. allowed_writes and
read_first are ADD-ONLY (deduplicated; the existing entries stay);
validation REPLACES the whole list, with validation_roles aligned
one-to-one (omitted roles default to generic, which a bugfix/refactor/...
card's work_kind role gate refuses exactly as aiworkhub_task_create does). Paths and
commands obey the same rules as aiworkhub_task_create and
aiworkhub_task_reject_review's amendments, with the same refusal codes.
Only a never-launched pending card qualifies: a launched, claimed,
archived or non-pending card is refused with
task_amend_pending_refused:<card_already_launched|card_claimed| card_archived|card_not_pending:<state>|task_not_found>. The amendment is
recorded as a card_amended_pending event in the card history (the card
stays launchable) and the reply carries the new card_sha256.
cancel_live_launch=true (NF-2026-02311) is the manager path for a
claimed/processing auto-rework that cannot pass without the amendment: a
card refused card_claimed, card_already_launched or
card_not_pending:processing has its launch_request_id cancelled first
(reason manager_cancel_for_amend). Only a terminal cancel state proceeds,
else task_amend_pending_refused:cancel_not_terminal:<state> with the
card unchanged; the card then returns to pending/unclaimed with
cancelled_launch recorded, the amendment runs in the same call and the
reply carries cancelled_request_id. An archived card stays refused.
objective / required_outputs (NF-2026-01022) fix a typo in the
contract itself without archive + re-create under a new id: both REPLACE
the card's value, the card id and NF links stay unchanged, and the change
is recorded in the card history. They are accepted ONLY on a pending card
that was never launched (no launch_request_id, started_at, reject/
supersede/cancel record or request-bearing history entry); any launch
history refuses with task_amend_pending_refused:amend_contract_after_launch.
Every required_outputs entry must be an exact entry of the card's
allowed_writes (including this call's additions), else
task_amend_pending_refused:required_output_outside_allowed_writes:<path>.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"task_id": "<task_id>"
},
"name": "aiworkhub_task_amend_pending"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| runner | No | Replacement runner (folded like task_create); refused as runner_reserved:<r> for the manager identity or runner_route_absent:<r> without a workforce route. Reply carries runner_before/runner_after. | |
| task_id | Yes | Id of the pending, never-launched card to amend. | |
| objective | No | Replacement objective (task_create's bound); only on a never-launched card, else amend_contract_after_launch. Omit to keep it. | |
| read_first | No | Existing repo files (optional :N or :N-M suffix) to ADD to read_first; omit to leave them. | |
| validation | No | Shell-free commands that REPLACE the card's validation list; omit to keep it. | |
| allowed_writes | No | Repo-relative paths or globs to ADD to allowed_writes; omit to leave them. | |
| required_outputs | No | Replacement required_outputs list, each an exact allowed_writes entry; only on a never-launched card, else amend_contract_after_launch. Omit to keep it. | |
| validation_roles | No | One role per validation command; only with validation. Omit for generic roles. | |
| cancel_live_launch | No | True to cancel a claimed/live launch to a terminal state and return the card to pending before amending; default false keeps every refusal unchanged. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||