Skip to content

feat: add --resume-id <threadId> option to task command #230

@hirotomoyamada

Description

@hirotomoyamada

Summary

The task command currently supports --resume-last (boolean) and --resume (boolean alias) to resume the latest thread, but there is no way to resume a specific thread by ID.

This is needed for workflows that manage multiple concurrent threads (e.g., parallel PR reviews) where --resume-last would pick the wrong thread.

Proposed Change

Add a new --resume-id <threadId> value option:

  • --resume-id <threadId> — resume the specified thread
  • --resume / --resume-last — resume the latest thread (existing behavior, unchanged)

Using --resume-id instead of overloading --resume preserves backward compatibility with the existing boolean --resume flag used by the rescue command routing.

This aligns with the @cursor/agent-plugin-cc companion which already supports --resume-id <threadId>.

Affected Files

  • plugins/codex/scripts/codex-companion.mjs
    • handleTask(): add --resume-id as a value option
    • buildTaskRequest(): pass resumeId through
    • executeTaskRun(): use resumeId directly when provided, fall back to resolveLatestTrackedTaskThread() for --resume-last

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions