diegosouzapw/OmniRoute · error

Cursor Cloud Agents run autonomously and do not support…

Error message

Cursor Cloud Agents run autonomously and do not support plan approval

What it means

Deliberate capability guard: CursorAgent.approvePlan always throws because Cursor Cloud Agents run autonomously and have no plan-approval workflow. Callers invoking the generic approvePlan surface method on this agent hit an unsupported operation, not a transient failure.

Solutions

  1. Check agent capabilities before calling approvePlan
  2. Hide/disable plan-approval UI for cursor-cloud agents
  3. Return an explicit unsupported-capability result instead of catching
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/lib/cloudAgent/agents/cursor.ts:148 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25). Data as JSON: /api/errors/77c34e2708ca3a7a. Report an issue: GitHub.

Appendix: source

Thrown at src/lib/cloudAgent/agents/cursor.ts:148

    if (status === CLOUD_AGENT_STATUS.COMPLETED) {
      const target = (data.target as Record<string, unknown>) || {};
      result = {
        prUrl: (target.prUrl as string) || (target.url as string) || undefined,
        summary: typeof data.summary === "string" ? data.summary : undefined,
      };
    }

    return {
      status,
      externalId,
      result,
      activities,
      error: typeof data.error === "string" ? data.error : undefined,
    };
  }

  async approvePlan(_externalId: string, _credentials: AgentCredentials): Promise<void> {
    throw new Error("Cursor Cloud Agents run autonomously and do not support plan approval");
  }

  async sendMessage(
    externalId: string,
    message: string,
    credentials: AgentCredentials
  ): Promise<CloudAgentActivity> {
    const response = await fetch(
      `${this.resolveBaseUrl(credentials)}/agents/${encodeURIComponent(externalId)}/followup`,
      {
        method: "POST",
        headers: this.authHeaders(credentials, true),
        body: JSON.stringify({ prompt: { text: message } }),
      }
    );

    if (!response.ok) {
      const error = await response.text();

View on GitHub (pinned to a179ffed5b)