Skip to content

Copying file annotations includes unexpected plan rejection message #1107

Closed

Description

@ZBQtesla

Summary

In file annotate sessions, Send Feedback and Copy produce different agent-facing payloads. Copy always wraps annotations with the plan-deny preamble (YOUR PLAN WAS NOT APPROVED.), even when a custom prompts.annotate.fileFeedback template is configured.

Steps to reproduce

  1. Configure ~/.plannotator/config.json:
{
  "prompts": {
    "annotate": {
      "fileFeedback": "{{feedback}}\n\n---\n\nIf the feedback requests changes, make the corresponding revisions. If the feedback asks a question, answer it directly in the conversation."
    }
  }
}
  1. Run annotate on a Markdown file, e.g. via Pi:
/plannotator-annotate path/to/file.md
  1. Add annotations in the UI.
  2. Click Send Feedback — payload uses annotate.fileFeedback as expected.
  3. Open the annotations export view and click Copy.

Expected

Copy should use the same annotate feedback wrapper as Send Feedback (including custom prompts.annotate.fileFeedback when configured), not plan-review denial framing.

Actual

Copied text is wrapped with the plan rejection template:

YOUR PLAN WAS NOT APPROVED.

Root cause

Copy paths always call wrapFeedbackForAgent() → planDenyFeedback():

  • packages/ui/components/ExportModal.tsx (handleCopyAnnotations)
  • packages/editor/App.tsx (onQuickCopy)
  • packages/ui/utils/parser.ts (wrapFeedbackForAgent)

Send Feedback posts raw annotation text; the host (e.g. Pi) wraps it with getAnnotateFileFeedbackPrompt(), which respects config.

Suggested fix

  • Make clipboard wrapping mode-aware: annotate sessions should use annotateFileFeedback / annotateMessageFeedback (or the configured template), not planDenyFeedback.
  • Ideally align Copy with Send Feedback, including config-driven templates (may require shipping the resolved template via /api/plan or a server-side wrap endpoint, since the browser bundle cannot read ~/.plannotator/config.json).

Impact

Affects annotate export/copy for all agents (not Pi-only). Preview and Download currently show the unwrapped body; only Copy applies the plan-deny wrapper.

Activity

  1. added a commit that references this issue on Jul 22, 2026
    3f3b351
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