Skip to main content
Glama

aiworkhub_task_reject_review

Reject a reviewed task with exact feedback and set its disposition to pending rework, blocked, archived, or superseded, with optional write, read-first, validation, and relaunch adjustments.

Instructions

Write-gated Codex action: reject a reviewed task with exact feedback and an explicit disposition. to = pending (rework, default) | blocked | archived | superseded -- so a task whose real next step is a dependency- gated replacement is not silently requeued to pending.

predecessor_request_id selects an exact retained review request as the rework workspace authority. Omitted (None) defaults to the current review request. An empty string fails closed.

failure_category is a verified-manager escape hatch for a mechanical review failure. It is accepted only with to=blocked and only from the closed infrastructure taxonomy, so it cannot relabel candidate code.

allowed_writes_amendment (a list of repo-relative paths) widens the card's allowed_writes add-only and is accepted only with to=pending.

read_first_amendment (a list of existing repo files, each optionally suffixed :N or :N-M) appends to the card's read_first add-only and is accepted only with to=pending.

reason is capped at 8000 UTF-8 bytes after strip; over it the call is refused with reject_reason_too_large:<bytes>><cap> and nothing changes.

Replies with a receipt (aiworkhub.reject_review_receipt.v1): task_id, to, status, request_id, claim_epoch, prior_episode, failure_category, reason_identity (sha256 + bytes, never the text), predecessor changed-path and residual counts, rework_delta_recovery, reviewer_finalization, learning_commit_owed, card_sha256/card_bytes. The reason and the argv are never echoed; include_card = none (default) | summary | full.

A base_drift or validation_environment reject -- or any to=pending reject with validation_only true (NF-2026-01107) -- also starts one provider-free replay of the retained candidate and adds automatic_validation_replay {attempted, succeeded, reason, request_id}; a replay that cannot start leaves the reject and the card as they were, and no other reject has the key. A validation_environment replay runs at most once per candidate and failure signature: a repeat is skipped with attempted false and reason environment_failure_repeated:validation_environment. After the replay the receipt's status/worker_status/card identity are re-read from the live card (the same view as aiworkhub_task_show); the status the reject itself left is kept under status_at_reject when it differs.

lesson_candidate / no_new_lesson_reason -- both unset by default, and the reply is then exactly as before -- close this decision's learning out in the same call, AFTER the reject landed. lesson_candidate (with optional promote_ai_memory and extra_evidence_ids) runs aiworkhub_manager_learning_commit for the rejected request and returns its reply under learning_commit; no_new_lesson_reason (one of learning_commit_store.NO_NEW_LESSON_REASONS) records that disposition and returns it under learning_disposition. Both together (learning_inline_conflict), an unknown reason, or promote_ai_memory without a lesson are refused before anything changes. A failed close-out never undoes the reject: ok stays true, the failure is reported under its own key, and learning_commit_owed stays in the reply. None of these parameters reaches the core rejection call.

relaunch (default false, and the reply is then unchanged) launches the card's retry after the reject landed and returns the launch reply under relaunch. A failed or raising launch never undoes the reject: ok stays true and the failure is reported under relaunch. At the reject depth cap (NF-2026-02368) the refused launch is followed in the same call by the capped continuation aiworkhub_task_supersede(continue_capped=true) performs, with the stored reject reason as the successor's feedback, and the successor <task_id>-c<N> is launched with the same adapter: relaunch then carries continued_capped {predecessor_task_id, successor_task_id, delta_digest} plus the successor's launch reply (ok true only when it launched). A refused continuation reports ok false, the refusal under error and next_action naming that supersede call. Without relaunch a to=pending reject that leaves the counted rejects at the cap (NF-2026-01111) adds continuation_next {reject_count, reject_cap, next_action} naming that same supersede call.

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>",
      "reason": "<reason>"
    },
    "name": "aiworkhub_task_reject_review"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoDisposition after the reject: pending (rework, default), blocked, archived or superseded; anything else is refused as an invalid reject-review disposition.pending
reasonYesExact feedback for the rework, at most 8000 UTF-8 bytes after trimming (longer is refused with reject_reason_too_large); it is never echoed back.
task_idYesId of the reviewed task card to reject.
relaunchNoSet true to launch the rework worker for this card in the same call, after the reject has landed (the same launch aiworkhub_agent_launch_task would do with the card's own runner and topic); only with to=pending (else refused with relaunch_requires_pending) and not with failure_category base_drift or validation_environment, which start their own automatic validation replay (refused with relaunch_conflicts_with_automatic_replay). At the reject depth cap the card is continued as aiworkhub_task_supersede(continue_capped=true) would, reusing this reason as the successor's feedback, and the successor is launched; relaunch then carries continued_capped {predecessor_task_id, successor_task_id, delta_digest}, or next_action naming that supersede call when the continuation is refused. Default false.
request_idNoOptional identity assertion: the review request you are rejecting. It must equal the card's current review request, else the call is refused with request_id_mismatch (or request_id_unverifiable when the card names none) and nothing changes; omit to skip the check.
include_cardNoCard view to attach to the receipt: none (default), summary (baselines and evidence folded) or full (the exact post-transition card).none
validation_onlyNoSet true to re-validate the same retained candidate after a canonical/base fix, without picking a failure_category: once the reject lands it starts the provider-free validation-only replay a base_drift or validation_environment reject starts, whatever the category, reported under automatic_validation_replay (with validation_only true on the receipt); only with to=pending (else refused with validation_only_requires_pending) and not with relaunch (refused with validation_only_conflicts_with_relaunch), both before anything changes. Default false.
failure_categoryNoInfrastructure cause when the review machinery failed rather than the candidate code (validation_environment, provider_runtime, dependency_or_route, cancellation_or_timeout or base_drift); used with to=blocked, and to=pending is also accepted. base_drift means canonical main moved under a sound candidate (rebase needed): it is accepted only when git proves the card's recorded base oid is an ancestor of HEAD and a path the candidate changed differs between them, else refused with base_drift_unproven; it never counts toward the reject-depth cap.
lesson_candidateNoLesson text to commit for this decision in the same call, after the reject lands; omit to commit the lesson separately.
promote_ai_memoryNoSet true together with lesson_candidate to also promote the lesson to AI memory; refused without a lesson. Default false.
extra_evidence_idsNoAdditional evidence ids to cite with the lesson; only used together with lesson_candidate.
relaunch_adapter_idNoAdapter for the relaunch; empty (default) derives it from the card's runner. Only used with relaunch=true.
residual_identitiesNoResidual artifact items that remain in scope for the rework, 1-256 objects like {"path": "data/residual.json", "pointer": "/rows/7"} (path = repo-relative file inside the card's allowed_writes, pointer = JSON pointer starting with /); only with to=pending.
no_new_lesson_reasonNoInstead of a lesson, record why none is owed: duplicate_of_recorded_lesson, no_generalizable_cause, mechanical_change_only, evidence_insufficient or decision_not_about_code; refused together with lesson_candidate.
read_first_amendmentNoExisting repo files, each optionally suffixed :N or :N-M, to add to the card's read_first (add-only, deduplicated); only with to=pending, otherwise refused with read_first_amendment_requires_pending; an absolute, .., .git, .aiworkhub/runtime or missing path is refused with read_first_amendment_invalid.
validation_amendmentNoValidation commands to amend the reworked card with, checked by the same rules as validation on aiworkhub_task_create, e.g. pytest -q tests/test_target.py; omit for no amendment.
predecessor_request_idNoExact retained review request to use as the rework workspace authority; omit to use the current review request. An empty string fails closed.
allowed_writes_amendmentNoRepo-relative paths to add to the card's allowed_writes (add-only); only with to=pending, otherwise refused with allowed_writes_amendment_requires_pending.
validation_amendment_modeNoHow validation_amendment changes the card's validation: append (default, add new deduplicated commands), replace (the amendment becomes the whole list) or remove (drop each listed command, which must exactly equal an existing one, else validation_amendment_remove_unknown, plus its role); replace and remove only with to=pending (else validation_amendment_mode_requires_pending), and the result must keep the work_kind role gate (e.g. bugfix needs reproduction and regression) and not be empty; anything else is refused with validation_amendment_mode_invalid.append
validation_roles_amendmentNoRoles for a replace, one per validation_amendment command in the same order (each a quality_evidence validation role such as reproduction, regression or generic); required when the card carries validation_roles and refused with validation_amendment_roles_invalid outside replace or when misaligned.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.13.28
    • addedInput schema / properties / validation_only
      Added value: +{
      +  "default": false,
      +  "description": "Set true to re-validate the same retained candidate after a canonical/base fix, without picking a failure_category: once the reject lands it starts the provider-free validation-only replay a base_drift or validation_environment reject starts, whatever the category, reported under automatic_validation_replay (with validation_only true on the receipt); only with to=pending (else refused with validation_only_requires_pending) and not with relaunch (refused with validation_only_conflicts_with_relaunch), both before anything changes. Default false.",
      +  "title": "Validation Only",
      +  "type": "boolean"
      +}
  2. Changed1 schema field changedv0.13.11
    • changedInput schema / properties / relaunch / description
      Previous value: -"Set true to launch the rework worker for this card in the same call, after the reject has landed (the same launch aiworkhub_agent_launch_task would do with the card's own runner and topic); only with to=pending (else refused with relaunch_requires_pending) and not with failure_category base_drift or validation_environment, which start their own automatic validation replay (refused with relaunch_conflicts_with_automatic_replay). Default false."New value: +"Set true to launch the rework worker for this card in the same call, after the reject has landed (the same launch aiworkhub_agent_launch_task would do with the card's own runner and topic); only with to=pending (else refused with relaunch_requires_pending) and not with failure_category base_drift or validation_environment, which start their own automatic validation replay (refused with relaunch_conflicts_with_automatic_replay). At the reject depth cap the card is continued as aiworkhub_task_supersede(continue_capped=true) would, reusing this reason as the successor's feedback, and the successor is launched; relaunch then carries continued_capped {predecessor_task_id, successor_task_id, delta_digest}, or next_action naming that supersede call when the continuation is refused. Default false."
  3. Changed2 schema fields changedv0.12.96
    • addedInput schema / properties / relaunch
      Added value: +{
      +  "default": false,
      +  "description": "Set true to launch the rework worker for this card in the same call, after the reject has landed (the same launch aiworkhub_agent_launch_task would do with the card's own runner and topic); only with to=pending (else refused with relaunch_requires_pending) and not with failure_category base_drift or validation_environment, which start their own automatic validation replay (refused with relaunch_conflicts_with_automatic_replay). Default false.",
      +  "title": "Relaunch",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / relaunch_adapter_id
      Added value: +{
      +  "default": "",
      +  "description": "Adapter for the relaunch; empty (default) derives it from the card's runner. Only used with relaunch=true.",
      +  "title": "Relaunch Adapter Id",
      +  "type": "string"
      +}
  4. Changed1 schema field changedv0.12.87
    • addedInput schema / properties / request_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Optional identity assertion: the review request you are rejecting. It must equal the card's current review request, else the call is refused with request_id_mismatch (or request_id_unverifiable when the card names none) and nothing changes; omit to skip the check.",
      +  "title": "Request Id"
      +}
  5. Changed2 schema fields changedv0.12.85
    • addedInput schema / properties / validation_amendment_mode
      Added value: +{
      +  "default": "append",
      +  "description": "How validation_amendment changes the card's validation: append (default, add new deduplicated commands), replace (the amendment becomes the whole list) or remove (drop each listed command, which must exactly equal an existing one, else validation_amendment_remove_unknown, plus its role); replace and remove only with to=pending (else validation_amendment_mode_requires_pending), and the result must keep the work_kind role gate (e.g. bugfix needs reproduction and regression) and not be empty; anything else is refused with validation_amendment_mode_invalid.",
      +  "title": "Validation Amendment Mode",
      +  "type": "string"
      +}
    • addedInput schema / properties / validation_roles_amendment
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Roles for a replace, one per validation_amendment command in the same order (each a quality_evidence validation role such as reproduction, regression or generic); required when the card carries validation_roles and refused with validation_amendment_roles_invalid outside replace or when misaligned.",
      +  "title": "Validation Roles Amendment"
      +}
  6. Changed2 schema fields changedv0.12.80
    • changedInput schema / properties / failure_category / anyOf
      Previous value: -[
      -  {
      -    "enum": [
      -      "validation_environment",
      -      "provider_runtime",
      -      "dependency_or_route",
      -      "cancellation_or_timeout"
      -    ],
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "enum": [
      +      "validation_environment",
      +      "provider_runtime",
      +      "dependency_or_route",
      +      "cancellation_or_timeout",
      +      "base_drift"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / failure_category / description
      Previous value: -"Infrastructure cause when the review machinery failed rather than the candidate code (validation_environment, provider_runtime, dependency_or_route or cancellation_or_timeout); used with to=blocked, and to=pending is also accepted."New value: +"Infrastructure cause when the review machinery failed rather than the candidate code (validation_environment, provider_runtime, dependency_or_route, cancellation_or_timeout or base_drift); used with to=blocked, and to=pending is also accepted. base_drift means canonical main moved under a sound candidate (rebase needed): it is accepted only when git proves the card's recorded base oid is an ancestor of HEAD and a path the candidate changed differs between them, else refused with base_drift_unproven; it never counts toward the reject-depth cap."
  7. Changed1 schema field changedv0.12.68
    • addedInput schema / properties / read_first_amendment
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Existing repo files, each optionally suffixed :N or :N-M, to add to the card's read_first (add-only, deduplicated); only with to=pending, otherwise refused with read_first_amendment_requires_pending; an absolute, .., .git, .aiworkhub/runtime or missing path is refused with read_first_amendment_invalid.",
      +  "title": "Read First Amendment"
      +}
  8. Changed13 schema fields changedv0.12.67
    • addedInput schema / properties / allowed_writes_amendment
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Repo-relative paths to add to the card's allowed_writes (add-only); only with to=pending, otherwise refused with allowed_writes_amendment_requires_pending.",
      +  "title": "Allowed Writes Amendment"
      +}
    • addedInput schema / properties / extra_evidence_ids
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Additional evidence ids to cite with the lesson; only used together with lesson_candidate.",
      +  "title": "Extra Evidence Ids"
      +}
    • addedInput schema / properties / failure_category / description
      Added value: +"Infrastructure cause when the review machinery failed rather than the candidate code (validation_environment, provider_runtime, dependency_or_route or cancellation_or_timeout); used with to=blocked, and to=pending is also accepted."
    • addedInput schema / properties / include_card / description
      Added value: +"Card view to attach to the receipt: none (default), summary (baselines and evidence folded) or full (the exact post-transition card)."
    • addedInput schema / properties / lesson_candidate
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Lesson text to commit for this decision in the same call, after the reject lands; omit to commit the lesson separately.",
      +  "title": "Lesson Candidate"
      +}
    • addedInput schema / properties / no_new_lesson_reason
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Instead of a lesson, record why none is owed: duplicate_of_recorded_lesson, no_generalizable_cause, mechanical_change_only, evidence_insufficient or decision_not_about_code; refused together with lesson_candidate.",
      +  "title": "No New Lesson Reason"
      +}
    • addedInput schema / properties / predecessor_request_id / description
      Added value: +"Exact retained review request to use as the rework workspace authority; omit to use the current review request. An empty string fails closed."
    • addedInput schema / properties / promote_ai_memory
      Added value: +{
      +  "default": false,
      +  "description": "Set true together with lesson_candidate to also promote the lesson to AI memory; refused without a lesson. Default false.",
      +  "title": "Promote Ai Memory",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / reason / description
      Added value: +"Exact feedback for the rework, at most 8000 UTF-8 bytes after trimming (longer is refused with reject_reason_too_large); it is never echoed back."
    • addedInput schema / properties / residual_identities / description
      Added value: +"Residual artifact items that remain in scope for the rework, 1-256 objects like {\"path\": \"data/residual.json\", \"pointer\": \"/rows/7\"} (path = repo-relative file inside the card's allowed_writes, pointer = JSON pointer starting with /); only with to=pending."
    • addedInput schema / properties / task_id / description
      Added value: +"Id of the reviewed task card to reject."
    • addedInput schema / properties / to / description
      Added value: +"Disposition after the reject: pending (rework, default), blocked, archived or superseded; anything else is refused as an invalid reject-review disposition."
    • addedInput schema / properties / validation_amendment / description
      Added value: +"Validation commands to amend the reworked card with, checked by the same rules as validation on aiworkhub_task_create, e.g. pytest -q tests/test_target.py; omit for no amendment."
  9. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations cover only safety hints (readOnlyHint=false, destructiveHint=false), yet the description discloses far more: fail-closed semantics, that refusals change nothing, that a failed learning close-out or relaunch never undoes the landed reject, the reason byte cap and its error token, replay-once-per-signature behavior, and the depth-cap continuation. It also explains that the reason text is never echoed and is returned only as a sha256 identity.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded, but the body is a wall of dense backticked prose that largely restates the parameter descriptions already present in the schema, and it spends substantial space describing receipt fields that the output schema already covers. It is organized by parameter but not sized to what is marginal.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 20-parameter, multi-side-effect mutation with a depth cap, replay logic, and inline learning close-out, the description covers the failure modes, atomicity guarantees, and the exact follow-up call when continuation is refused. Nothing an agent needs in order to invoke it safely is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description earns above that by adding cross-parameter semantics the schema states only per-parameter, notably the predecessor_request_id authority default, the add-only nature of both amendments, the conflict rules between learning parameters, and which parameters never reach the core reject call.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a precise verb (reject), resource (a reviewed task), and the two required inputs (exact feedback, explicit disposition), and immediately enumerates the disposition set. An agent can distinguish this from accept_review or supersede without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states rich conditional usage rules: failure_category only with to=blocked, amendments only with to=pending, validation_only not with relaunch, and it names aiworkhub_task_supersede(continue_capped=true) as the path at the depth cap. It does not explicitly say when to reject instead of calling accept_review or recover_blocked_rework, so it stops short of full alternatives routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools