shekohex / shekohex/opencode-pty

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

Open
#34 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
582
Forks
59
Avg merge
13h 20m
Merged PRs (30d)
2

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue using opencode.json, the Copilot provider, and the pty_* extension described in the steps. Trace the background-process completion ping and verify that one user message results in one request rather than one request per pty call.

Written by the indexing model from the issue text.

Assessment

Tech stack
bun, typescript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.