A2A Delegation & Group Chat: Outside the Work Model¶
Evidence Level: F (directly proven by source code)
Analysis Baseline:4f843556
TL;DR¶
A2A delegation and group chat handoff create runs with run_kind="delegated", bypassing the Focus work-item model and OKR system. They also do not write to AgentActivityLog, producing un-auditable ghost work.
1. The Special Identity of Delegated Execution¶
A2A delegation (backend/app/services/agent_runtime/a2a_runtime.py:664) and group chat handoff (group_handoff.py:759) both create runs with:
This is not an ordinary foreground run. It is a special marker meaning "this was delegated by someone else, not my own work."
2. Bypassing the Focus Work-Item Model¶
Clawith's Agents manage their task lists through Focus work items (the focus_items table). But delegated execution does not create AgentFocusItem records and does not touch the OKR tables.
After completing a delegated task, the Agent sees no trace of it in its Focus view—it "did something, but doesn't know it did something."
3. System Prompts Avoid Tracking¶
a2a_runtime.py:704,711-713:
prefix = "Complete this delegated task and return a usable result"
# ...
"The verified final answer is returned to the source Run automatically."
The Agent is instructed to "complete and return the result," not "record as a work item." This is intentional—but the cost is that delegated tasks are invisible in the Agent's work history.
4. Missing Audit Logs¶
The AgentActivityLog action_type enum (activity_log.py:28-31) includes:
"chat_reply", "tool_call", "feishu_msg_sent", "agent_msg_sent",
"web_msg_sent", "task_created", "task_updated", "file_written",
"error", "schedule_run", "heartbeat", "plaza_post"
There is no task_delegate, a2a_delegate, or group_handoff.
Neither a2a_runtime.py nor group_handoff.py calls log_activity().
5. The Work Model Split¶
| Entry Point | run_kind | Creates Focus? | Writes ActivityLog? | Auditable? |
|---|---|---|---|---|
| Human conversation | foreground |
✅ | ✅ | ✅ |
| A2A delegation | delegated |
❌ | ❌ | ❌ |
| Group chat handoff | delegated |
❌ | ❌ | ❌ |
| Scheduled task | background |
❌ | ✅ (schedule_run) | Partial |
6. Systemic Consequences¶
- Agents cannot report their work: A delegated Agent completes a task but sees no record in its Focus
- Managers cannot audit: Cannot answer "How many times was Agent X delegated yesterday? What did it complete?"
- Performance tracking is impossible: If digital employees are to be evaluated, delegated tasks are completely invisible
- Ghost work accumulates: Delegated execution results are only visible in the caller's Run context and cannot be retrieved later
7. Relationship to AI Coding¶
This is the classic "each entry point developed independently" pattern: - The human conversation entry point was fully implemented (Focus + ActivityLog + message records) - The A2A and group chat entry points were simplified to RPC calls—"just return the result" - The three entry points have no shared model of "what is work"—suggesting they were generated by different prompts/tasks, with no one doing a global consistency review