deepseek-ai/deepseek-harness · error · Error

the host offers no /permission command

Error message

the host offers no /permission command

What it means

After live.command('/permission <id>') succeeds at the RPC layer, result.value.matched === false means the line was delivered but the host has no registered /permission command: the client-side presets decoration assumes a capability the host build does not provide. This is the deliberate loud failure for that capability mismatch.

Source

Thrown at packages/client/ui-permission-presets/src/client/index.ts:154

  ctx.effect(() => command.decorate({
    name: 'permission',
    // The picker exists exactly while the projection does: a permission-less
    // host serves no key and the bare invocation falls through to the host
    // command (which is absent too — the line simply misses).
    available: session => selectOf(sessionFor(session)) !== undefined,
    ui: {
      kind: 'popupSelect',
      options: (session) => {
        const value = selectOf(sessionFor(session))
        if (value === undefined) throw new Error('permission presets are not available on this host')
        return Promise.resolve(optionsOf(value, t))
      },
      onSelect: async (option, session) => {
        const live = sessionFor(session)
        if (live === undefined) throw new Error('this session is not materialized yet')
        const result = await live.command(`/permission ${option.id}`)
        if (!result.ok) throw new Error(`permission switch failed: ${result.error.code}: ${result.error.message}`)
        if (!result.value.matched) throw new Error('the host offers no /permission command')
      },
    },
  }), 'ui-permission: /permission decoration')
}

View on GitHub (pinned to b150a551b8)

Solutions

  1. Upgrade the host to a build that registers the /permission command
  2. Or remove/hide the presets decoration in compositions targeting hosts without it
  3. Feature-detect before rendering the control: probe the command directory for 'permission'
Defensive patterns

Strategy: validation

Validate before calling

const known = directory.resolve(sessionId, 'permission')
if (known === undefined) hidePermissionDecoration(sessionId)

Try / catch

try {
  await applyPreset(option.id)
} catch (error) {
  if (error instanceof Error && error.message === 'the host offers no /permission command') {
    hidePermissionDecoration(sessionId) // capability gap, not a transient failure
    return
  }
  throw error
}

Prevention

When it happens

Trigger: A web client with ui-permission-presets talking to an older or smaller host build whose command registry lacks /permission; a custom host profile assembled without the permission command plugin; a partially upgraded deployment.

Common situations: Version skew between the client bundle and the host; trimmed host profiles; staging environments running mismatched halves.

Related errors


AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24). Data as JSON: /api/errors/b7275c339f218c87. Report an issue: GitHub.