Support request sanitized

SDK subagent.complete rejects inside a service plugin — request for supported diagnosis

Environment

  • Installed OpenClaw: 2026.10.5, verified from installed package metadata.
  • Linux x64; Node.js v24.21.0.
  • Custom service plugin version 0.1.3. Plugin identifier and configured agent name below are placeholders.

Observed behavior

A custom signed loopback broker calls the documented tool-free, sessionless completion SDK from a registered service (apiVersion: 2). The target agent is fixed server-side; provider and model are omitted so the configured agent owns selection. No business data was queried.

The service was loaded and responding. All eight installed plugin files matched the reviewed package. A later native health check reported the plugin loaded, with no plugin errors or unavailable entries. This establishes readiness only, not SDK completion success.

One signed synthetic request reached the completion call and failed. Our custom broker returned HTTP 503 / PLANNER_UNAVAILABLE after 47 ms. This status is generated by our broker, not a direct Gateway HTTP response. No typed plan was returned; effective provider/model execution remains unproved. Latency does not identify the cause.

Sanitized call shape

Schematic extraction of the actual invocation fields; synthetic content and agent placeholder replace deployment-specific values. This is not a standalone reproduction:

const complete = p => api.runtime.subagent.complete(p);
const controller = new AbortController();
const result = await complete({
  agentId: "sales-agent",
  message: JSON.stringify({ task: "Return synthetic JSON only." }),
  extraSystemPrompt: "Synthetic planner only; no tools.",
  timeoutMs: 12000,
  signal: controller.signal,
});

The real caller validates a bounded JSON plan from result.text. Property invocation is preserved. Installed SDK source reinstates plugin scope and applies lifecycle/admission checks; we have not established whether our service lifecycle usage is correct.

Available diagnostic evidence

The caught exception was reduced to a sanitized record: category DIAGNOSTIC_UNCLASSIFIED_ERROR; one OTHER-class object; own string name/message; no code, status, detail or represented nested cause. Original name/message/stack were not retained. Existing logs cannot recover that discarded identity.

An offline fixture using the actual exported PluginInstanceUnavailableError produces the same structural shape. This does not identify the live exception or prove a lifecycle failure. Root cause could be our plugin usage or the runtime; no core defect is asserted.

Questions

  1. What supported local facility can identify this caught exception class and package-relative module:line without exposing raw messages, prompts or credentials, or weakening permissions?
  2. Is invoking subagent.complete from a service callback through the retained api facade supported, and what instance/lifecycle handling is required?
  3. What minimal isolated synthetic fixture should maintainers use to distinguish service misuse from runtime admission failure? No portable live reproduction or private credentials are supplied.

Expected: configured-agent tool-free completion yielding result.text containing the requested synthetic JSON. Please advise the supported diagnostic path before further instrumentation installs or permission/model changes.

No raw logs, private proof files, credentials, business records or deployment configuration are attached.

Official issue chooser: Sign in to GitHub · GitHub

Hi Arik welcome to the community! I checked the source and docs for OpenClaw 2026.10.5. Your call matches the documented subagent.complete arguments, and leaving out model lets the configured agent choose it.

Since the original exception details were discarded, the next useful step would be to classify a fresh failure from one isolated synthetic request. You can add this around your existing call without logging the error message, stack, prompt or credentials.

In this example, params is the same object you already pass to complete; it isn’t a standalone reproduction:

isn’t a standalone reproduction:

try {
  const result = await api.runtime.subagent.complete(params);
  return result;
} catch (error) {
  const name =
    error && typeof error === "object"
      ? Object.getOwnPropertyDescriptor(error, "name")?.value
      : undefined;

  const category =
    name === "PluginInstanceUnavailableError" ? "plugin-instance-unavailable" :
    name === "AbortError" ? "aborted" :
    name === "TimeoutError" ? "timeout" :
    "other";

  api.logger.warn(
    `synthetic completion: category=${category}, ` +
    `lifecycleAborted=${api.lifecycle?.signal?.aborted ?? "unavailable"}, ` +
    `requestAborted=${params.signal?.aborted ?? "unavailable"}`
  );

  throw error; // Preserve your existing broker error handling.
}

Make sure the broker’s existing error handler doesn’t log the raw exception after it is rethrown. Remember to run this in an isolated test with synthetic inputs. You can then share just the three diagnostic fields.

If the category is plugin-instance-unavailable, compare the request time with the service’s start/stop and plugin-reload events, and check whether the broker callback belongs to the current service instance. If it is other, the category alone won’t identify the cause.

One caveat: lifecycleAborted=false doesn’t prove the instance was still accepting calls. The documented signal aborts when disposal reaches explicit cleanup, so an earlier retirement stage could still be relevant.