New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

oc-endless-gpt-plugin

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

oc-endless-gpt-plugin

Endless-style continuous interaction for OpenCode sessions using OpenAI models.

latest
npmnpm
Version
0.1.3
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

oc-endless-gpt-plugin

oc-endless-gpt-plugin adds Endless-style continuous interaction to OpenCode sessions using the OpenAI provider. After the agent finishes a request, it waits inside the same OpenCode agent run. The next normal message in the OpenCode prompt is delivered through OpenCode's native session steering and wakes the wait.

Inspired by maria-rcks/endless, implemented independently using OpenCode's native plugin and session APIs.

What It Does

  • Enables continuous mode for provider ID openai by default.
  • Adds the native wait_for_user_input custom tool.
  • Automatically prompts the model to enter the wait after an otherwise idle response.
  • Keeps the native wait pending without polling, timers, or network requests.
  • Lets OpenCode's normal prompt, steer, queue, permissions, tools, MCP, and session persistence remain in control.
  • Resolves only a small sentinel result. The user's text remains the normal OpenCode user/steer message and is never copied into the tool result.

This preserves one continuous OpenCode agent interaction, not one physical OpenAI HTTP request. The runner may make multiple provider calls as tool results and steering messages are processed.

Installation

Install the package with the OpenCode plugin manager or add it to the OpenCode configuration:

{
  "plugin": [["oc-endless-gpt-plugin", { "enabled": true }]]
}

OpenCode loads the plugin in the server process. No Codex CLI, separate session, OpenAI client, or credential configuration is required.

Configuration

Defaults are:

{
  "enabled": true,
  "providers": ["openai"],
  "debug": false
}

For example, to opt in another provider ID explicitly:

{
  "plugin": [
    [
      "oc-endless-gpt-plugin",
      {
        "enabled": true,
        "providers": ["openai", "my-openai-compatible-provider"],
        "debug": false
      }
    ]
  ]
}

Provider identity is read from OpenCode's actual model.providerID, not inferred from a model name. OpenAI API-key and ChatGPT/OpenAI OAuth authentication are supported when configured by OpenCode; this plugin does not inspect or manage credentials.

Usage

Use OpenCode normally:

Fix the tests.

After the work is complete, the plugin keeps the session open and enters the wait state. Then enter another normal prompt:

Also update the README.
Now commit it.

The messages go through OpenCode's existing steer/queue delivery. Rapid messages are not stored in a second conversation history and are not executed twice. If the model does not call the wait tool itself, the plugin submits a synthetic continuation prompt after the response completes so the session can enter the wait automatically.

The wait ends cleanly when the tool abort signal fires, the session is deleted or errors, the provider changes to an unsupported provider, the plugin is disposed, or OpenCode exits. Ctrl-C therefore uses OpenCode's normal interruption path.

Requirements

  • OpenCode 1.18.21 or newer.
  • Node.js 22 or newer for the plugin runtime.
  • An OpenCode session using the openai provider ID, authenticated by OpenCode.
  • Bun is required for development; end users use OpenCode's normal plugin installation flow.

Troubleshooting

  • The agent stops after one answer: confirm the session model's provider ID is exactly openai, and that the plugin is loaded in the active OpenCode configuration.
  • Another provider is used: continuous mode is intentionally disabled unless its provider ID is listed in providers.
  • The tool is not called: the system transform is additive, but the model may still choose not to follow instructions. Ask it to complete the request and call wait_for_user_input only after finishing.
  • Debugging: set debug to true. Logs contain session lifecycle events only and never credentials or full prompts.

Limitations

The plugin depends on OpenCode's current public plugin hook and runner behavior. A provider switch while a wait is pending ends continuous mode for that session rather than trying to transfer an OpenAI-only run to another provider. OpenCode may still create multiple underlying provider requests, perform compaction, or interrupt a run according to its normal limits.

Development

bun install
bun run typecheck
bun run check
bun run format:check
bun run test
bun run build

Keywords

agent

FAQs

Package last updated on 22 Aug 2026

Related posts