Skip to content

Bug: tasks assigned by agent name instead of agent ID are never picked up by serve/run #7

Closed

Description

@oxgeneral

Summary

When an autonomous agent creates subtasks and assigns them using agent names (e.g. Sam Altman) instead of agent IDs (e.g. agt_4zj89Oi), the orchestrator accepts the assignment but never picks up these tasks for execution. They remain in todo indefinitely.

Steps to Reproduce

  1. Create agents with human-readable names:

    orch agent add "Sam Altman" --adapter claude ...  # → agt_4zj89Oi
    orch agent add "Elon Musk" --adapter claude ...   # → agt_qyK6kA0
  2. Create a lead agent in autonomous mode that creates subtasks via orch task add with --assignee "Sam Altman" (using name, not ID)

  3. Run orch serve or orch run --watch

  4. Observe: the subtasks stay in todo forever. The orchestrator does not resolve agent names to IDs.

Expected Behavior

Either:

  • Option A (preferred): orch task add --assignee "Sam Altman" resolves the name to agt_4zj89Oi at creation time (fuzzy match like other CLI commands)
  • Option B: orch serve scheduler resolves assignee names to agent IDs when matching tasks to agents
  • Option C: orch task add rejects the assignment with a clear error: "Sam Altman" is not a valid agent ID. Did you mean agt_4zj89Oi (Sam Altman)?

Actual Behavior

  • orch task add --assignee "Sam Altman" succeeds silently
  • Task is created with assignee: "Sam Altman" (raw string, not an ID)
  • orch task list displays Sam Altman in the AGENT column (looks correct)
  • orch serve / orch run --all skip the task — no error, no warning
  • Task stays in todo indefinitely

Workaround

Manually reassign using agent IDs:

orch task assign tsk_XXX agt_4zj89Oi

Impact

High — this breaks the autonomous agent workflow. When a lead agent creates subtasks for team members, it naturally uses their names (which it knows from context), not internal IDs. This means autonomous goal decomposition silently fails for multi-agent teams.

Environment

  • orch version: latest (npm)
  • OS: macOS Darwin 25.2.0
  • Node: v20.19.5

Activity

  1. oxgeneral commented on Apr 9, 2026

    @oxgeneral
    OwnerAuthor

    Fixed in v1.0.21 🎉

    What was done:

    • TaskService.resolveAssignee() now normalizes agent names to IDs at both creation (task add --assignee) and assignment (task assign) time
    • findBestAgent() also matches by name as a fallback for legacy data
    • Unknown agent names/IDs now produce clear error messages instead of silent failures

    Example:

    orch task add "Build feature" --assignee "Sam Altman"  # ✓ resolves to agt_xxx
    orch task assign tsk_abc "Sam Altman"                  # ✓ resolves to agt_xxx
    orch task add "Task" --assignee "Ghost"                # ✕ Unknown agent: "Ghost"

    15 new tests added covering all resolution paths.

    Thanks for the detailed bug report — the steps to reproduce and expected/actual behavior breakdown made this straightforward to diagnose and fix! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions