delegate-task
Delegate a task from one agent to another via the async inbox queue
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Delegate a task from one agent to another via the async inbox queue
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Show the project's `.aweek/config.json` knobs (plus the hardcoded scheduler/lock constants the dashboard surfaces) and edit the config-backed fields with a confirmation gate
Edit an agent's free-form planning markdown and adjust weekly tasks from a single entry point
Manage Google-Calendar-style recurring tasks per agent — daily/weekly/biweekly/monthly rules that expand into occurrences on the calendar and execute through the heartbeat loop
Agent → CEO report. Send a status report or question to the user (CEO) on behalf of an agent. Notifies the dashboard inbox and, when a Slack `ceoChannel` is configured, pushes a Slack message.
Bootstrap an aweek-branded Slack app and persist its credentials so the embedded SlackAdapter inside `aweek serve` can chat with the project's Claude through Slack
Set up an aweek project — create the data directory and optionally install the scheduled heartbeat (launchd on macOS, crontab elsewhere)
| name | delegate-task |
| description | Delegate a task from one agent to another via the async inbox queue |
| trigger | delegate task, send task, assign task, aweek delegate task, inter-agent task |
Delegate a task from one agent to another. The task is placed in the recipient's async inbox queue and will be picked up on the next heartbeat. This enables inter-agent collaboration without synchronous cross-agent sessions.
You MUST follow this exact workflow when this skill is invoked. Use the project's Node.js modules in src/skills/delegate-task.js — never write inbox JSON files directly.
List all available agents so the user can choose sender and recipient:
echo '{"dataDir":".aweek/agents"}' \
| aweek exec agent-helpers listAllAgents --input-json -
The response is an array of { config } records. Project each entry to
{ id: config.id, name: config.identity?.name, role: config.identity?.role }
for display. Treat fewer than 2 entries as the "need more agents" case.
Ask the user using AskUserQuestion: "Which agent is delegating the task? (select by number or name)"
Ask the user using AskUserQuestion: "Which agent should receive the task? (select by number or name)"
Ask the user for the task details:
Task Description (required): Ask using AskUserQuestion: "Describe the task to delegate (max 2000 characters):"
Priority (optional): Ask using AskUserQuestion: "Priority level? (critical / high / medium / low) — default: medium"
critical, high, medium, lowmedium if the user skips or enters empty.Context (optional): Ask using AskUserQuestion: "Any additional context for the recipient? (press Enter to skip)"
Source Task ID (optional): Ask using AskUserQuestion: "Source task ID for traceability? (press Enter to skip)"
Display a summary of the delegation before executing:
--- Delegation Summary ---
From: <SENDER_NAME> (<SENDER_ID>)
To: <RECIPIENT_NAME> (<RECIPIENT_ID>)
Task: <TASK_DESCRIPTION>
Priority: <PRIORITY>
Context: <CONTEXT or "none">
Source Task: <SOURCE_TASK_ID or "none">
Ask using AskUserQuestion: "Proceed with this delegation? (yes/no)"
If the user confirms, execute:
echo '{
"fromAgentId": "<FROM_AGENT_ID>",
"toAgentId": "<TO_AGENT_ID>",
"taskDescription": "<TASK_DESCRIPTION>",
"options": {
"priority": "<PRIORITY>",
"context": "<CONTEXT_OR_OMIT>",
"sourceTaskId": "<SOURCE_TASK_ID_OR_OMIT>"
}
}' | aweek exec delegate-task delegateTask --input-json -
The response JSON is the inbox message record — highlight result.id as
the message identifier. To render the formatted summary the user sees,
pipe that response back through the formatter:
# $MESSAGE is the JSON payload from the previous call
echo "$MESSAGE" | aweek exec delegate-task formatDelegationResult \
--input-json - --format text
Replace placeholders with actual values, properly JSON-escaped. Omit
context and sourceTaskId from the options object if the user skipped
them.
If the user declines, inform them: "Delegation cancelled. No changes were made."
Show the formatted delegation result. Highlight:
.aweek/agents/critical, high, medium, low (default: medium)/aweek:create-agentEach delegation creates a unique message with a generated ID. Re-enqueuing the exact same message object (by ID) is a no-op — the inbox store deduplicates by message ID. This ensures heartbeat retries never produce duplicate inbox entries.
.aweek/agents/<agent-id>.inbox.json)status field: pending -> in-progress -> completed / failedfrom, to, sourceTaskId, and timestampsAgents are stored in .aweek/agents/<agent-id>.json relative to the project root.
Inbox queues are stored in .aweek/agents/<agent-id>.inbox.json relative to the project root.