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
TaskAcceptwhile an assignee is active isINVALID_ENVELOPE. New rule 3d: while an assignee is active, aTaskRejectfrom any other participant isINVALID_ENVELOPE, and so is the active assignee's ownTaskRejectwhen policy does not permit reassignment (rule 3b). Rule 4: aTaskUpdate,TaskCompleteorTaskFailfrom anyone but the active assignee (including before anyTaskAccept), or after a terminal report has been recorded, isFORBIDDEN(pinned bytask_named_assignee.json). Behaviour: rule 3d tightens validation, because aTaskRejectfrom 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 aTaskRejectwould 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
TaskRejectdoes before anyone has accepted. Rule 2 lets any eligible declared participant reject a broadcast task (emptyrequested_assignee), but rule 3c andallow_reassignment_on_rejectcover 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-everTaskAcceptwithPOLICY_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_rejectdoes not govern it, and the declining participant MUST NOT later sendTaskAcceptfor the task. For a namedrequested_assignee, the reject leaves no eligible assignee and the Session becomes eligible for a negativeCommitment. Behaviour: this relaxes validation in one case (another participant's firstTaskAcceptafter 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 underallow_reassignment_on_reject: true). Source: seam-embedder-findings proposal S6, issue #185. Replay: the relaxation has no exposure, because theTaskAccepta runtime used to refuse never entered history. The tightening is exposed:mode_versionstays1.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 underallow_reassignment_on_reject: truewould 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 atSessionStart.
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 Type | Authorized Sender |
|---|---|
TaskRequest | Session initiator (requester) |
TaskAccept | Requested assignee, or any eligible participant if requested_assignee is empty |
TaskReject | Requested assignee, or any eligible participant if requested_assignee is empty |
TaskUpdate | Active assignee only |
TaskComplete | Active assignee only |
TaskFail | Active assignee only |
Commitment | Session 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 topolicy.defaultper RFC-MACP-0012 Section 5),ttl_ms- task deadline,context_id- optional task context reference (task constraints and other attached data go inextensions).
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.
TaskUpdatedoes not carry an explicitassigneefield. The runtime validates authorship via the Envelopesender, which MUST match the active assignee. This differs fromTaskCompleteandTaskFail, which redundantly includeassigneein 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:
- A Task Mode v1 Session MUST accept at most one
TaskRequest. TaskAcceptorTaskRejectMUST come from the requested assignee, or from an eligible declared participant ifrequested_assigneeis empty. 2a. Whenrequested_assigneeis empty, aTaskRejectfrom an eligible participant while no assignee is active records that participant's decline only. It does not change the eligibility of other participants, andallow_reassignment_on_rejectdoes 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 sendTaskAcceptfor the same task. Whenrequested_assigneeis non-empty, that participant'sTaskRejectleaves no eligible assignee, and the Session becomes eligible for a negativeCommitment.- Only one assignee may become active for the Session in base v1.
3a. The first accepted
TaskAcceptfrom any eligible participant designates that participant as the active assignee. SubsequentTaskAcceptmessages for the same session MUST be rejected withINVALID_ENVELOPEif an active assignee is already designated. 3b. A participant who has sentTaskAcceptMUST NOT later sendTaskRejectfor the same task in base v1.TaskAcceptis irrevocable unless policy explicitly permits reassignment. 3c. When policy setsallow_reassignment_on_reject: trueand the active assignee sendsTaskReject, the session returns to the pre-assignment state. Other eligible participants MAY then sendTaskAcceptfor the sametask_id. No additionalTaskRequestis needed; the original request remains active. 3d. While an assignee is active, aTaskRejectfrom any other participant MUST be rejected withINVALID_ENVELOPE. ATaskRejectfrom the active assignee that rule 3b forbids MUST be rejected withINVALID_ENVELOPEas well (RFC-MACP-0002 §6.1: a non-Commitmentrejected by a mode or policy rule is notPOLICY_DENIED). TaskUpdate,TaskComplete, andTaskFailMUST come from the active assignee. One sent by anyone else, including before anyTaskAccepthas designated an assignee, or sent after aTaskCompleteorTaskFailhas been accepted, MUST be rejected withFORBIDDEN.TaskCompleteandTaskFaildo not resolve the Session on their own. They make the Session eligible forCommitmentby 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.completedtask.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 isTaskCompleteorTaskFail). 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.protoschemas/modes/task.proto
Example transcript:
examples/task-mode-session.json