paperclipai/paperclip · error

Unsupported OpenCode proxy method ${message.method}

Error message

Unsupported OpenCode proxy method ${message.method}

What it means

The OpenCode proxy implements a fixed set of JSON-RPC methods (initialize, thread/start, thread/resume, collaborationMode/list, turn/start, turn/interrupt, thread/read). Any other method falls into the default case and throws this error, since the proxy cannot translate unknown requests to the underlying driver.

Source

Thrown at packages/paperclip-runner/src/cli/opencode-app-server-proxy.ts:395

        turnId: text(params.turnId, activeTurnId ?? ""),
      });
      result = true;
      break;
    case "thread/read":
      if (!session) throw new Error("OpenCode thread is not open");
      result = {
        thread: {
          id: session.ids().driverSessionId,
          cwd,
          turns: activeTurnId
            ? [{ id: activeTurnId, status: "inProgress" }]
            : [],
        },
        transcript: await session.read?.(),
      };
      break;
    default:
      throw new Error(`Unsupported OpenCode proxy method ${message.method}`);
  }
  send({ id: message.id, result });
}

let pendingInput = Promise.resolve();
let bootstrapFailure: Error | null = null;
input.on("line", (line) => {
  if (!line.trim()) return;
  let message: RpcMessage;
  try {
    message = JSON.parse(line) as RpcMessage;
  } catch (error) {
    process.stderr.write(`Invalid JSON-RPC input: ${String(error)}\n`);
    return;
  }
  pendingInput = enqueueOpenCodeProxyInput(
    pendingInput,
    async () => {

View on GitHub (pinned to 01ad858492)

Solutions

  1. Use only the supported methods: initialize, thread/start, thread/resume, collaborationMode/list, turn/start, turn/interrupt, thread/read.
  2. Fix the method-name typo or casing in the client request.
  3. Align client protocol version with the proxy (serverInfo reports version 1.18.29 semantics).
  4. If a new method is genuinely needed, add a case to the switch in opencode-app-server-proxy.ts.

Example fix

// before
await rpc({ method: 'session/prompt', params });
// after
await rpc({ method: 'turn/start', params: { input: [{ text }] } });
Defensive patterns

Strategy: validation

Validate before calling

const SUPPORTED = ['initialize','thread/start','thread/resume','collaborationMode/list','turn/start','turn/interrupt','thread/read'];
if (!SUPPORTED.includes(method)) throw new Error(`method ${method} not supported by opencode proxy`);

Try / catch

try {
  return await rpc({ method, params });
} catch (e) {
  if (String(e.message).startsWith('Unsupported OpenCode proxy method')) {
    throw new Error(`check protocol version / method name: ${method}`);
  }
  throw e;
}

Prevention

When it happens

Trigger: Sending a JSON-RPC request whose `method` is not one of the seven supported methods, including typos ('turn/Start'), version drift ('session/prompt' from an older protocol), or extensions the proxy does not know.

Common situations: Client and proxy protocol versions mismatch; a client built against the real OpenCode app-server API sends methods the shim does not implement; typo in method name during development.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-09-10). Data as JSON: /api/errors/9afc028a3305b686. Report an issue: GitHub.