Skip to content

Add --prompt flag to resume for additional instructions #60

@chanakyav

Description

@chanakyav

Add an optional --prompt flag to autopilot resume so users can inject additional instructions into the fix cycle.

Use Case

You have a PR with preexisting review comments and also need merge conflict resolution or other custom work:

autopilot resume --pr 16173 --prompt "Also fix merge conflicts with main"

Or when resuming a PR where the review comments alone don't capture everything needed:

autopilot resume --pr 42345 --prompt "The reviewer wants us to switch from polling to webhooks"

Current Behavior

resume creates a placeholder prompt "(resumed from PR #N)" that's stored in the DB but never used — the FIX agent only sees the Copilot review comments from PARSE_REVIEW.

Proposed Behavior

  • Add --prompt / -p flag to resume (optional, not required)
  • Store the prompt in the task record
  • In _do_fix, if the task has a non-placeholder prompt, prepend it to the fix prompt as an "Additional Instructions" section
  • If no --prompt given, behavior is unchanged (backward compatible)

What the Agent Would See

## Additional Instructions

Also fix merge conflicts with main

## Copilot Review Feedback to Address

### Inline Comments (3)
...

Implementation

  1. Add --prompt / -p to resume parser in cli.py
  2. Pass it to create_task() instead of the placeholder string
  3. In _do_fix (orchestrator.py), check if self.task["prompt"] is a real prompt (not the placeholder) and pass it to fix_prompt() as additional context
  4. Update fix_prompt() in prompts.py to accept an additional_instructions param

~20 lines of changes + tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions