Skip to content

[Bug]: Adds a request each time background process pings the agent. Not friendly to copilot pricing. #34

@mutharibayub

Description

@mutharibayub

Description

Github Copilot follows a request based subscription instead of token based. Normally, a request is deducted with every user message. With this plugin, I've noticed it gets deducted every time the background process calls pings the agent to get its attention.

Reproduction Steps

Steps to reproduce the behavior:

  1. Configure plugin in opencode.json
  2. Run opencode
  3. Activate model with copilot provider
  4. Ask the model to run a process with the pty_* extension and say "hello" after it's done running.
  5. The agent will stop itself after launching background process, activate again when it pings on completion, and then say hello
  6. You will get 2 requests deducted from copilot subscription.

Expected Behavior

Single request should have been deducted for a single user message. The pty_spawn is a tool call and normally these calls don't cause extra request deduction.

Actual Behavior

A single user message can deducts number_of_pty_calls + 1 requests.

Environment

  • OS: Windows 10
  • OpenCode Version: 1.4.3
  • Plugin Version: 0.3.2
  • Bun Version: 1.3.12

OpenCode Configuration

opencode.json (sanitized)

Debug Logs

Click to expand debug logs

Additional Context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions