Skip to content

Use session IDs as task IDs for subagents instead of UUIDs #4955

@goose-slackbot

Description

@goose-slackbot

Problem

Currently, subagent task IDs are long UUIDs like 86d44451-ab81-42e9-a79c-244b267498c1. This creates unnecessary verbosity when agents need to reference these tasks, and makes it harder for users to correlate tasks with their underlying sessions.

Proposed Solution

Use session IDs as task IDs for subagents instead of generating separate UUIDs. Session IDs are:

  • Reasonably short (e.g., 20241002_1, 20241002_2)
  • Guaranteed to be unique
  • Already tied to the underlying execution context
  • Human-readable and meaningful

Benefits

  1. Reduced verbosity: Agents can reference tasks more concisely
  2. Better traceability: Users can easily correlate task IDs with session IDs
  3. CLI integration: Users can run goose export --session_id <task_id> --format=markdown to see exactly what happened in a subagent task
  4. Consistency: Task IDs and session IDs become the same concept for subagents

Implementation Notes

This should be a small, focused change separate from the current subagent consolidation work in #4828. The change would be in the dynamic task creation/execution logic where task IDs are currently generated as UUIDs.

Context

Discussion from #goose-dev: https://block.slack.com/archives/C08F3C9D0P5/p1727887782.728409

Metadata

Metadata

Labels

p2Priority 2 - Medium

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions