RFC-MACP-0009

RFC-MACP-0009

Multi-Agent Coordination Protocol (MACP) - Task Mode

Document: RFC-MACP-0009 Version: 1.2.0-draft Status: Community Standards Track Updates: RFC-MACP-0002

Changelog — 1.2.0-draft: §5 now names the error code for each assignment-state rejection, as the reference runtime reports them. Rule 3a: a TaskAccept while an assignee is active is INVALID_ENVELOPE. New rule 3d: while an assignee is active, a TaskReject from any other participant is INVALID_ENVELOPE, and so is the active assignee's own TaskReject when policy does not permit reassignment (rule 3b). Rule 4: a TaskUpdate, TaskComplete or TaskFail from anyone but the active assignee (including before any TaskAccept), or after a terminal report has been recorded, is FORBIDDEN (pinned by task_named_assignee.json). Behaviour: rule 3d tightens validation, because a TaskReject from a non-assignee during an active assignment was previously unaddressed; the other changes name codes for rejections the RFC already required. Replay: the codes have no exposure, since a rejected message never enters history. Rule 3d is exposed in principle: a history that accepted such a TaskReject would be rejected by a runtime that re-drives Mode validation. The reference runtime has always rejected it, so its stored histories are unaffected.

Changelog — 1.1.0-draft: §5 gains rule 2a, which defines what a TaskReject does before anyone has accepted. Rule 2 lets any eligible declared participant reject a broadcast task (empty requested_assignee), but rule 3c and allow_reassignment_on_reject cover only the active assignee rejecting, so a pre-assignment reject from a non-assigned participant had no stated effect. A runtime that treated it as a reassignment trigger refused every later first-ever TaskAccept with POLICY_DENIED, so one participant's decline vetoed the whole pool, contrary to rule 3a's "from any eligible participant". Rule 2a makes such a reject record that participant's decline only: it leaves other participants eligible, allow_reassignment_on_reject does not govern it, and the declining participant MUST NOT later send TaskAccept for the task. For a named requested_assignee, the reject leaves no eligible assignee and the Session becomes eligible for a negative Commitment. Behaviour: this relaxes validation in one case (another participant's first TaskAccept after a pre-assignment decline is now accepted) and tightens it in another (a participant that declined can no longer accept later, which a runtime could previously allow under allow_reassignment_on_reject: true). Source: seam-embedder-findings proposal S6, issue #185. Replay: the relaxation has no exposure, because the TaskAccept a runtime used to refuse never entered history. The tightening is exposed: mode_version stays 1.0.0, and RFC-MACP-0003 §1 guarantees identical decisions only under identical validation rules, so a stored history in which a participant declined and later accepted under allow_reassignment_on_reject: true would be rejected by a runtime whose replay re-drives Mode validation under the new rule. Such a runtime needs to apply the old rule to sessions recorded under it, for example by gating it on a per-session semantics revision recorded at SessionStart.

Abstract

This document defines macp.mode.task.v1, the standards-track MACP primitive for bounded task delegation. Task Mode lets an orchestrator assign one task inside one Session, record assignee responses and progress, and terminate with a single authoritative Commitment that binds success or failure.

1. Purpose

Task Mode is the basic delegation primitive for multi-agent execution. It is intended for one bounded task per Session, not for open-ended job queues or workflow graphs.

2. Identifier and participant model

  • Mode identifier: macp.mode.task.v1
  • Participant model: orchestrated

The session initiator or a policy-defined coordinator is the requester and default Commitment authority.

2.1 Authority Matrix

Message TypeAuthorized Sender
TaskRequestSession initiator (requester)
TaskAcceptRequested assignee, or any eligible participant if requested_assignee is empty
TaskRejectRequested assignee, or any eligible participant if requested_assignee is empty
TaskUpdateActive assignee only
TaskCompleteActive assignee only
TaskFailActive assignee only
CommitmentSession initiator (default) or policy-designated authority

Runtimes MUST reject messages from senders not authorized per this matrix.

3. SessionStart requirements

A Task Mode Session MUST bind:

  • participants - requester and eligible assignee participants,
  • mode_version - task-mode semantic profile,
  • configuration_version - execution profile,
  • policy_version — governance or authorization profile (MAY be empty; when empty, the runtime resolves to policy.default per RFC-MACP-0012 Section 5),
  • ttl_ms - task deadline,
  • context_id - optional task context reference (task constraints and other attached data go in extensions).

Base Task Mode v1 assumes exactly one task request per Session.

4. Message types

Task Mode defines the following mode-specific message types:

  • TaskRequest - opens the delegated task.
  • TaskAccept - assignee accepts responsibility.
  • TaskReject - assignee declines responsibility.
  • TaskUpdate - non-terminal progress or status update. TaskUpdate does not carry an explicit assignee field. The runtime validates authorship via the Envelope sender, which MUST match the active assignee. This differs from TaskComplete and TaskFail, which redundantly include assignee in the payload for auditability.
  • TaskComplete - assignee reports successful completion.
  • TaskFail - assignee reports a bounded failure.
  • Commitment - authoritative terminal outcome.

5. Validation rules

Implementations MUST enforce the following:

  1. A Task Mode v1 Session MUST accept at most one TaskRequest.
  2. TaskAccept or TaskReject MUST come from the requested assignee, or from an eligible declared participant if requested_assignee is empty. 2a. When requested_assignee is empty, a TaskReject from an eligible participant while no assignee is active records that participant's decline only. It does not change the eligibility of other participants, and allow_reassignment_on_reject does not govern it. A participant that has declined, whether before assignment under this rule or as the active assignee under rule 3c, MUST NOT later send TaskAccept for the same task. When requested_assignee is non-empty, that participant's TaskReject leaves no eligible assignee, and the Session becomes eligible for a negative Commitment.
  3. Only one assignee may become active for the Session in base v1. 3a. The first accepted TaskAccept from any eligible participant designates that participant as the active assignee. Subsequent TaskAccept messages for the same session MUST be rejected with INVALID_ENVELOPE if an active assignee is already designated. 3b. A participant who has sent TaskAccept MUST NOT later send TaskReject for the same task in base v1. TaskAccept is irrevocable unless policy explicitly permits reassignment. 3c. When policy sets allow_reassignment_on_reject: true and the active assignee sends TaskReject, the session returns to the pre-assignment state. Other eligible participants MAY then send TaskAccept for the same task_id. No additional TaskRequest is needed; the original request remains active. 3d. While an assignee is active, a TaskReject from any other participant MUST be rejected with INVALID_ENVELOPE. A TaskReject from the active assignee that rule 3b forbids MUST be rejected with INVALID_ENVELOPE as well (RFC-MACP-0002 §6.1: a non-Commitment rejected by a mode or policy rule is not POLICY_DENIED).
  4. TaskUpdate, TaskComplete, and TaskFail MUST come from the active assignee. One sent by anyone else, including before any TaskAccept has designated an assignee, or sent after a TaskComplete or TaskFail has been accepted, MUST be rejected with FORBIDDEN.
  5. TaskComplete and TaskFail do not resolve the Session on their own. They make the Session eligible for Commitment by the requester or policy authority.

6. Terminal semantics

Task Mode resolves only when an authorized Commitment is accepted.

Implementations SHOULD use CommitmentPayload.action values that make the outcome explicit, for example:

  • task.completed
  • task.failed

The Commitment SHOULD bind the relevant task identifier and the versions that governed execution.

Task Mode allows both positive and negative committed outcomes (task.completed and task.failed). CommitmentPayload.outcome_positive MUST be set explicitly on all Task Mode commitments.

6.1 Governance Policy

Task sessions MAY be governed by declarative policies that constrain assignment rules, completion requirements, and commitment authority. See RFC-MACP-0012 for the governance policy framework and schemas/json/policy/task-rules.schema.json for the Task Mode rule schema.

7. Determinism class

Task Mode claims structural-only determinism by default.

The coordination transcript is replay-safe, but task execution may depend on external tools, mutable inputs, or side effects outside the MACP runtime boundary. A deployment MAY define stricter profiles, but those are not part of base Task Mode v1.

8. Security considerations

Implementations MUST address all of the following:

  • authenticate requester and assignee identities,
  • ensure only authorized assignees accept or complete tasks,
  • protect sensitive task inputs and outputs,
  • define idempotency keys for any external side effects triggered by task execution. The normative idempotency key for task outcomes is task_id + assignee + first_accepted_completion_message_id (where the completion message is TaskComplete or TaskFail). Retransmissions with the same key MUST NOT re-execute side effects.
  • reject forged completions and failures from non-assignees.

9. Canonical schemas and examples

Canonical schemas:

  • schemas/proto/macp/modes/task/v1/task.proto
  • schemas/modes/task.proto

Example transcript:

  • examples/task-mode-session.json