Skip to content

Bug: OMO internal prompts can be labeled user-initiated in Copilot, causing extra premium request usage #1949

@maximharizanov

Description

@maximharizanov

🐞 Bug Description

Some internally generated OMO prompts/messages are being attributed as user-initiated in GitHub Copilot contexts, instead of agent-initiated.

This appears to affect flows where OMO injects prompts into the main session (continuation/recovery/background notifications/babysitter patterns). As a result, Copilot users may see unexpected premium request consumption.

✅ Expected Behavior

OMO-internal/system-generated prompts should be attributed as agent-initiated (or otherwise avoid being counted as user-origin prompts), while real user prompts remain user-initiated.

❌ Actual Behavior

At least some OMO-generated prompts are treated as user-initiated by downstream Copilot attribution heuristics, increasing premium usage for Copilot users.

🔁 Reproduction (high-level)

  1. Use OpenCode + GitHub Copilot provider with OMO enabled.
  2. Trigger OMO internal prompt flows (e.g. background-task notifications, continuation injections, recovery flows).
  3. Observe that some of these prompts are classified as user-initiated (and can contribute to premium request counting).

📌 Notes / Context

  • This is similar in nature to the 2026 opencode-dynamic-context-pruning Copilot misattribution incident/fixes.
  • OMO currently emits many internal prompts via session.promptAsync(...) in main sessions, which can hit user-role boundary heuristics.
  • We should keep OMO messages model-visible where needed (not blanket-ignore them), while preventing misattribution.

💡 Suggested direction (minimal)

  • Add an OMO chat.headers safeguard (Copilot-only) to force x-initiator=agent for clearly OMO-internal emissions.
  • Mark OMO-internal injected prompts with a stable internal marker + synthetic metadata so override conditions are explicit and narrow.
  • Preserve normal user prompt attribution and existing noReply behavior semantics for background notifications.

Environment

  • OMO: current main
  • OpenCode: current versions where Copilot plugin applies role/content heuristics for initiator
  • Provider: GitHub Copilot

Related

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