paperclipai/paperclip · error

Paperclip Runner currently supports Codex only with codexPer

Error message

Paperclip Runner currently supports Codex only with codexPermissionMode set to never. Select Full auto (never ask) before saving.

What it means

buildPaperclipRunnerConfig() validates adapter configuration before saving a company/adapter config. Paperclip Runner only supports the Codex adapter with codexPermissionMode 'never' (Full auto, never ask); any other explicitly configured mode is rejected at config-build time. The error tells the user to change the permission mode in the UI before saving.

Source

Thrown at packages/adapters/codex-local/src/ui/build-config.ts:168

    300,
    300,
    "AWS AgentCore timeoutSeconds",
  );
  const lifecycleCandidate = v.paperclipRunnerLifecycleMode ?? schemaValues.lifecycleMode;
  const lifecycleMode = lifecycleCandidate === "warm" ? "warm" : "per_turn";
  const configuredIdleTimeoutMs =
    v.paperclipRunnerIdleTimeoutMs ?? schemaValues.idleTimeoutMs;
  const idleTimeoutMs = resolvePaperclipRunnerIdleTimeoutMs(
    configuredIdleTimeoutMs,
  );
  const configuredCodexPermissionMode =
    v.adapterSchemaValues?.codexPermissionMode ?? v.codexPermissionMode;
  if (
    provider === "codex"
    && configuredCodexPermissionMode !== undefined
    && configuredCodexPermissionMode !== "never"
  ) {
    throw new Error(
      "Paperclip Runner currently supports Codex only with codexPermissionMode set to never. Select Full auto (never ask) before saving.",
    );
  }
  for (const normalizedKey of [
    "provider",
    "model",
    "acpxAgent",
    "codexPermissionMode",
    "opencodePermissionMode",
    "acpxPermissionMode",
    "managedProfileId",
    "managedAgentsRetentionAcknowledged",
    "maxSessionListCostUsd",
    "anthropicAgentId",
    "agentVersion",
    "anthropicEnvironmentId",
    "agentCoreProfileId",
    "agentCoreRetentionAcknowledged",

View on GitHub (pinned to 01ad858492)

Solutions

  1. Set codexPermissionMode to "never" (Full auto / never ask) in the adapter settings, then save again.
  2. If editing config directly, remove the codexPermissionMode key so the default ('never') applies.
  3. If you need interactive permission prompts, use a different runner/adapter that supports them instead of the Paperclip Runner Codex path.

Example fix

// before
{ "provider": "codex", "model": "gpt-5", "codexPermissionMode": "on-request" }
// after
{ "provider": "codex", "model": "gpt-5", "codexPermissionMode": "never" }
Defensive patterns

Strategy: validation

Validate before calling

function validateCodexRunnerConfig(cfg: { provider: string; codexPermissionMode?: string }): string | null {
  if (cfg.provider === "codex" && cfg.codexPermissionMode !== undefined && cfg.codexPermissionMode !== "never") {
    return `codexPermissionMode must be "never" for Paperclip Runner, got "${cfg.codexPermissionMode}"`;
  }
  return null;
}

Try / catch

try {
  const runnerConfig = buildPaperclipRunnerConfig(values);
  saveAdapterConfig(runnerConfig);
} catch (err) {
  if (err instanceof Error && err.message.includes("codexPermissionMode")) {
    showUiToast("Switch Codex permission mode to Full auto (never ask) before saving.");
    return;
  }
  throw err;
}

Prevention

When it happens

Trigger: Building a Paperclip Runner config with provider 'codex' and codexPermissionMode set to anything other than 'never' (e.g. 'on-request', 'on-failure', 'untrusted'), whether typed by hand in config JSON or selected in the UI form.

Common situations: User picked a non-'never' permission mode in the adapter settings form; config copied from a Codex CLI setup that used a different permission mode; older saved config with a now-unsupported mode being re-validated on upgrade.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


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