Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go
17.8 KB
Raw Blame

Mentions and delegation

What a mention link DOES. WHETHER to mention at all — loop avoidance, staying silent on acknowledgements — is in your runtime brief's Mentions section; follow that and do not re-derive it here.

A mention link is built from a real UUID

The backend recognizes a mention only through this Markdown shape:

[@Label](mention://<type>/<id>)

The parser accepts exactly four <type> values plus the all sentinel, and the <id> group accepts only hex characters and dashes, OR the literal string all:

(member|agent|squad|issue|all)/([0-9a-fA-F-]+|all)

So the link target is a real entity UUID (or all), never a display name. The label between the brackets must contain visible text. Put the human-readable name there. The @ prefix is optional; issue references commonly omit it:

[MUL-123](mention://issue/<uuid>)

Only canonical inline links with visible label text count as mentions. Empty or invisible labels, reference links, images, autolinks, titles, and angle-bracket destinations are not mention triggers. Use the shape above. Text removed by HTML sanitization, such as script contents, and inert template contents do not make a label visible; neither does an @ prefix on its own.

Code examples are inert as mentions. This includes inline code, multiline code spans, indented code, and backtick or tilde fenced blocks inside lists, blockquotes, or <details>. A fenced diff of agent instructions cannot invoke its mention targets. Copy the mention syntax out of code and paste it into ordinary prose to trigger it. Prose mentions in blockquotes still count.

Two mention:// forms deliberately sit OUTSIDE this parser. The first is [Label](mention://project/<uuid>). project is absent from the type group above, so the backend never parses it and it can enqueue nothing — it is a render-only link every client makes navigable (a chip on web and desktop, an ordinary link that opens the project on tap on mobile). That is the whole point: a project reference should never be able to start a run. Use it freely to point at a project.

The second is [Doc Title](mention://doc/<doc-id>): doc is not in the type group either, so a doc link is render-only and enqueues nothing. Read the doc it points at with multica doc get <doc-id>.

Everything else in this document is about the four types (plus all) the parser does recognize.

Step 1 — look up the UUID

A name is not a UUID. Look the UUID up first, from the matching list command:

  • a person → multica workspace member list --output json → use user_id
  • an agent → multica agent list --output json → use id
  • a squad → multica squad list --output json → use id

For a person the mention id is the user_id, NOT the membership-row id — the backend's own roster formatter uses user_id for member mentions. Match by display name. If the name is ambiguous or absent, do not guess — say so in your comment instead of emitting a broken link.

Step 2 — the four types and what each enqueues

Format: [@Name](mention://<type>/<uuid>). The <type> and the id source must match, or the link resolves to the wrong entity (or to nothing).

To… type uuid from What the backend does
trigger an agent agent agent.id enqueues a run for that agent
hand work to a squad squad squad.id resolves the squad's leader_id and enqueues a run for the LEADER agent
link a person member member.user_id renders a link; enqueues NOTHING — no agent run
reference an issue issue issue.id renders a link; enqueues NOTHING — always safe

The backend computes the trigger set from two types only: the squad branch resolves the squad and adds its leader to the set; everything that is not agent after that is skipped, then the agent branch adds that agent. A member or issue mention reaches neither branch, so it enqueues no task.

A member mention therefore does NOT make a person "run", and no notification is delivered through the comment path. What IS guaranteed is the contract above: only agent and squad mentions enqueue work.

Preview and per-comment suppression

Newer clients can call POST /api/issues/{id}/comments/trigger-preview before creating or editing a comment. The preview endpoint runs the same trigger computation as create and edit re-triggering, so the displayed agent chips come from backend rules, not from a client-side reimplementation.

When previewing an edit, clients may send editing_comment_id. The server validates that the comment belongs to the same workspace and issue, derives or checks the edit's parent comment context, and excludes only pending tasks whose trigger_comment_id is that same comment. Pending tasks from any other comment on the issue still dedupe the preview.

When creating or editing a comment, clients may send an optional suppress_agent_ids array. The server still computes the full trigger set first, then removes those agent IDs as a post-filter. A missing or empty field preserves the old behavior. A valid UUID that is not in the computed trigger set is a no-op; a malformed UUID is rejected at the request boundary.

@all is the broadcast type

@all uses the literal all, never a UUID:

[@all](mention://all/all)

It notifies every human member of the workspace except the author, not just people on this issue; notification preferences and private-project access still apply. The mention itself does NOT make any specific agent run.

For MEMBER-authored comments, @all (or a member mention) SUPPRESSES the issue assignee's automatic on-comment trigger and the other implicit routing fallbacks — thread parent / conversation owner. Members can use @all to announce without requesting work from the assignee.

For AGENT-authored comments, member mentions and @all do NOT suppress the squad leader fallback, with one exception: when a member of a squad in direct handoff mode comments on that squad's issue and mentions a person but no agent, nobody is woken (see references/squads.md, Handoff mode). Otherwise a worker's result on a squad-assigned issue still returns to the assigned leader; in a guest squad's delegation thread, it still returns to the guest leader. People receive notifications as usual, and the existing leader self-trigger protection and pending-run dedup still apply.

For any author, an EXPLICIT @agent / @squad mention in the same comment still fires normally: a comment reading [@all](mention://all/all) heads up — [@Preflight](mention://agent/<uuid>) please take this enqueues Preflight and nobody else. The explicit-mention branch is evaluated BEFORE the member-only suppression, so explicit mentions win and there is no additional squad leader fallback.

What does NOT happen

None of these start a fresh run, and none produce an error response — but they are three different things, and the response tells you which. A mention that never parsed is a truly silent no-op. One that parsed and was refused comes back in trigger_outcomes as status: "blocked" with a reason_code. One whose target has a queued task in the same comment thread can come back coalesced. A claim race can return deferred: the input is recorded for a follow-up run, not injected into an already running prompt. Different threads queue independently. Read that array after posting — it is the only place any of this shows up.

  • A name where a UUID belongs. mention://member/Alice is dead. The id group accepts only hex+dashes or all; the non-hex letters in a typical name make the whole pattern fail to match, so the parser returns nothing.
  • A hex-ish but wrong UUID. A well-formed-looking UUID that no entity owns DOES parse, then no-ops at lookup: the workspace-scoped query finds no agent and the mention is reported blocked with invocation_not_allowed. That code is deliberately ambiguous — a typo'd UUID and a genuine permission denial look identical on purpose, because the id you typed could name a private agent in another workspace and the reason must not confirm that it exists. So when you see invocation_not_allowed, check the UUID against the live roster BEFORE you touch any visibility or invocation setting; multica squad member list <squad-id> --output json returns the member_id to build the mention from. An id that matches the pattern but is NOT a valid UUID at all (mention://agent/-) is rejected by the id parser and blocked with target_unavailable instead — a non-UUID names no entity anywhere, so it conceals nothing. Neither case is ever an error response.
  • An already-pending task. Even a correct @agent/@squad starts no second run when the same target has a mergeable queued task in the same thread (the root comment and all descendants), with the same reviewed head. The outcome is coalesced; all covered instructions are delivered together. Different root threads and assignment-triggered runs have separate queue slots. Inputs received after execution starts belong to a successor run; deferred means a claim race durably recorded the follow-up obligation. Agent concurrency limits still apply, and runs for the same issue and agent execute serially. Stopping or retrying one thread does not cancel another thread's queue. Do not re-post a successfully queued/coalesced/deferred input. Edit preview is the only exception: editing_comment_id ignores pending tasks from the same comment being edited, because save cancels those old tasks before it re-computes triggers. It is still comment-scoped, not an agent-wide bypass.
  • A hand-off to the issue assignee because your target is busy. A reply already routed to an agent stays with that agent; an offline or queued target is waited for, never swapped for the issue assignee. Mention whoever else you need by hand.
  • An archived agent, or one with no runtime bound (likewise a squad whose leader is): blocked with target_unavailable and runtime_offline respectively. Both are checked only AFTER the invoke gate, so a caller who may not invoke the target never learns its state.
  • A private agent you cannot invoke: blocked — the mention path applies the invoke gate to both @agent and @squad. That is the run gate, not the see gate: a workspace admin who can open a private agent in the UI still may not trigger it, so being able to view the target says nothing about being able to mention it. (The squad assignment/promote path has its own gate; the child-done wake is ungated.)

Who the invoke gate judges

A chain that crosses issues keeps its human. The agent-to-agent gate judges the human at the top of your chain, and that human travels on the comment you write: the comment records the run that authored it, so the run it wakes inherits your originator. This holds when you comment on a DIFFERENT issue than the one you are running on — the ordinary "create issue Y, then coordinate there" flow — so a delegation that works on your own issue keeps working on the issue you just created. It does not go the other way: nothing ever substitutes a different human (your agent's owner, or the target issue's originator), so if your chain has no human at its top, member-scoped allow-lists stay closed no matter which issue you move to.

One nuance for automation: when an UNATTRIBUTED autopilot run (a schedule/webhook dispatch has no human originator, so the gate has no human to key on) delegates by @mention while working on the issue that autopilot created, the invoke gate falls back to the autopilot creator as the effective invoking user — the same principal that admitted the first dispatch. So a mid-run @agent / @squad delegation fires exactly when the autopilot creator could invoke that target (owner / public_to match), and stays skipped otherwise. It is authorization only — the enqueued run's originator/attribution is unchanged.

This fallback is bound to verified task lineage: it applies only when the delegating run's own task is the one working on that autopilot issue (author == task agent, task.issue_id == this issue), so a run doing work elsewhere can never borrow another autopilot creator's authority by commenting on its issue. The same authority carries the plain assigned-squad-leader wake (a worker's result comment on the autopilot issue can still wake the leader), and it survives a busy target: if the mentioned agent is already running, the delegation is replayed at that run's completion under the same authority, so it is never lost.

Editing or deleting input cancels active runs that contain that comment and re-evaluates surviving inputs. These cancelled runs expose cancelled_by_comment_change: true in task responses. Unstarted runs without replies remain in execution history but do not create cancelled comment blocks; manual cancellations and runs that already executed remain visible.

Deleting removes only that comment, never its replies. A deleted comment that still has replies stays in comment list output as a placeholder — deleted_at set, content empty, no attachments — so the replies keep their parent_id. It carries no input: it never triggers a run, and there is nothing in it to answer. It can still be the --parent of a reply that continues its thread. Against a server that predates this, comment delete refuses instead of deleting the replies too.

An edit is treated as a fresh action — it re-derives the comment's lineage from the editing action. Only the agent author editing its OWN comment re-stamps the lineage to the editing task; any other editor — including a workspace owner/admin editing an agent's comment — CLEARS it. So editing an old autopilot comment from an unrelated issue, or an admin editing an agent's comment (manage rights, not invoke rights), fails closed at the deferred completion-reconcile instead of reusing the original run's authority.

Steering another agent's running turn

A comment to an agent that is already running reaches it only after that run ends. You can put the comment into the run instead:

multica issue comment add <issue-id> --parent <your trigger comment> \
  --content-file ./note.md --steer <run-id>
multica issue comment add <issue-id> --parent <your trigger comment> \
  --content-file ./note.md --steer-active

--steer takes a run id from multica issue runs <issue-id> --active (repeatable; short prefixes resolve on this issue). --steer-active steers every running run on the issue that reports can_supplement: true for you, plus any other recipient of the comment that is running when it is posted. The CLI mentions each steered agent in the comment.

Steer when the other agent is mid-task and your input changes what it is doing now: a correction, a missing fact, a narrower scope. Delegate new work, and reply to finished work, the normal way.

Rules:

  • you can steer an agent exactly when your mention could start it (same invoke check, judged on the human who started your chain);
  • never your own run;
  • at most 3 of your messages per run, and 10 from all agents; past that the comment takes its normal trigger;
  • only runs that are running now and accept additional messages (can_supplement: true in multica issue runs <issue-id> --active --output json);
  • no attachments. The CLI refuses --steer with --attachment.
  • a CLI that answers unknown flag: --steer predates steering: post the comment without the flag.

The CLI prints one line per run on stderr. Steered run … means the comment was added to the running turn. If that turn ends before reading it, the comment is handled in a follow-up run, so do not re-post it. queued, coalesced, deferred or blocked means the comment went through the normal mention path.

The other agent sees your message labelled as coming from an agent, not a human. A run on an older daemon, which cannot show that label, does not read it mid-run; it gets the comment in a follow-up run instead. It cannot cancel or replace that agent's objective or override a human's instructions, so write it as input, not as a command.

Incorrect to correct

Incorrect: @alice please review → plain text, no link, parses to nothing, nobody is reached.

Incorrect: [@Alice](mention://member/Alice) please review → "Alice" is not a UUID; the id group rejects the non-hex letters, the pattern does not match, the link is silently dead.

Correct:

  1. multica workspace member list --output json → Alice's user_id = 7f3a…
  2. [@Alice](mention://member/7f3a…) please review → a real user_id parses; the link renders and resolves to Alice.

@all broadcast: [@all](mention://all/all) heads up — notifies human workspace members and runs no specific agent by itself. It suppresses the assignee auto-trigger only for member authors; worker-agent comments still return to the assigned or guest squad leader as described above, except a person handoff in a direct-mode squad.

Using the wrong type for a real UUID still parses — it just resolves to the wrong entity, or to nothing. That is why the type must match the id source.