TaskGet should support returning full task metadata
Summary
TaskUpdate accepts arbitrary metadata via the metadata parameter (e.g., structured handoff data, workflow state, calibration records), but TaskGet only returns a summary projection: subject, status, description, blocks, and blockedBy. There's no way to read back the metadata through the Task API.
Current behavior
TaskUpdate(taskId="1", metadata={"handoff": {"produced": [...], "decisions": [...]}})
# writes successfully
TaskGet(taskId="1")
# returns: subject, status, description, blocks, blockedBy
# metadata is NOT included
Expected behavior
TaskGet should support returning the full task JSON, including metadata and owner fields. Either:
- Option A: Always include
metadataandownerinTaskGetoutput - Option B: Add an optional parameter like
include_metadata: trueto opt into the full response
Workaround
Currently the only way to read task metadata is to read the raw JSON file from disk:
cat ~/.claude/tasks/{team_name}/{task_id}.json | python3 -c "import json,sys; print(json.dumps(json.load(sys.stdin).get('metadata',{})))"
This works but bypasses the Task API abstraction and requires knowing the file path convention.
Use case
In multi-agent workflows, agents store structured handoff data in task metadata (produced files, key decisions, areas of uncertainty). Downstream agents and the orchestrator need to read this metadata to inform subsequent phases. The TaskGet summary view is insufficient for this — the metadata contains the substantive work product.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗