orca icon indicating copy to clipboard operation
orca copied to clipboard

[Bug]: Claude command catalog silently truncates to 512 entries, hiding valid installed skills

Open davefano opened this issue 2 weeks ago • 1 comments

Where were you using Orca?

Desktop + Orca server

Operating system

macOS. The identified catalog-normalization code is platform-independent; other platforms have not been independently reproduced here.

Orca version

Observed in packaged 1.4.259. The same explicit limit remains in the source tagged v1.4.266; that newer packaged release was not runtime-tested.

Summary

Orca's Claude command catalog silently truncates the provider's reported catalog to 512 distinct names. With a sufficiently large, valid native catalog, installed skills and commands beyond that position disappear from the Orca chat command catalog even though Claude reports them correctly.

This is a mixed command/skill catalog limit, not a limit of 512 skill directories, a count of Claude's built-in commands alone, or evidence that 512 full skill documents have been loaded into model context.

A plugin with many exports consumes the same aggregate budget as personal/project skills and built-in commands. Consequently, installing an unrelated large plugin can make other valid workflows disappear, depending on catalog order.

Observed behavior

An initialize-only comparison, without sending a model prompt or invoking a workflow, found:

  • Claude's native initialization catalog contains more than 512 valid entries.
  • The same account and working directory, queried through Orca's actual Claude chat backend (agentSession.commands), return exactly 512 entries.
  • Valid names present in the native catalog are missing from the Orca response.
  • This is not just a generic filesystem-discovery count or an inference from the rendered menu.
  • A corresponding Codex comparison retained all of its native entries. This report concerns the Claude adapter, not a demonstrated universal installed-skill limit.

The original application has not been modified to produce these observations.

Root cause

src/main/claude/command-catalog/claude-slash-command-catalog.ts at v1.4.266 declares:

const MAX_COMMANDS = 512

Both names() and descriptorCatalog() stop collecting entries once their distinct-name set reaches that number:

if (seen.size >= MAX_COMMANDS) {
  break
}

This affects both paths:

  1. The initialization descriptor catalog consumed by ClaudeSlashCommandCatalog.
  2. Name arrays in stream initialization / commands_changed handling, via readClaudeSlashCommands().

The module separately validates name length, description length and argument hints. It does not document a provider restriction requiring this particular aggregate count. Claude itself demonstrably supplies a larger catalog.

Minimal anonymous reproduction

No real account, machine paths, private skills, credentials or third-party plugin are needed. Use 600 synthetic, valid entries in a test beside the catalog module:

import { expect, it } from 'vitest'
import {
  ClaudeSlashCommandCatalog,
  readClaudeSlashCommands
} from './claude-slash-command-catalog'

const commands = Array.from({ length: 600 }, (_, index) => ({
  name: `demo-${String(index).padStart(4, '0')}`,
  description: 'Synthetic catalog entry'
}))

it('preserves the complete valid initialization catalog', () => {
  const catalog = new ClaudeSlashCommandCatalog(undefined, { commands })
  expect(catalog.commands).toHaveLength(600) // currently 512
  expect(catalog.commands?.some((entry) => entry.name === 'demo-0599')).toBe(true)
})

it('preserves the complete valid stream catalog', () => {
  const entries = readClaudeSlashCommands({
    type: 'system',
    subtype: 'init',
    slash_commands: commands.map((entry) => entry.name),
    skills: commands.map((entry) => entry.name)
  })
  expect(entries).toHaveLength(600) // currently 512
  expect(entries.at(-1)?.name).toBe('demo-0599')
})

The equivalent 600-entry fixture was exercised against the installed build's isolated normalization functions: both descriptor and string-name paths returned 512, ending at demo-0511; demo-0512 onward were dropped. The TypeScript tests above are suggested regression tests, not a claim that the upstream test suite was run.

Expected behavior

All valid entries reported by the provider should remain available to Orca's command/skill discovery and selection. Large catalogs can use search, grouping or pagination in presentation without silently deleting entries from the authoritative catalog.

If an aggregate safety limit is necessary, please make its rationale explicit and handle overflow visibly rather than silently treating a truncated list as complete. Retain appropriate protocol-size bounds, per-field validation and deduplication.

Suggested fix / acceptance checks

  • Address both the descriptor and string-name paths; changing only one allows a later init/reload event to truncate the catalog again.
  • Verify initialization, stream init and commands_changed descriptor/name updates with 511, 512, 513 and larger valid catalogs.
  • Include built-ins, namespaced plugin exports and personal/project skills in the same fixture.
  • Preserve duplicate-name handling, builtin/skill classification, metadata merging and invalid/overlong-name rejection.
  • Verify that a valid skill after position 512 remains discoverable/selectable and that any downstream selection validation uses the complete provider catalog.
  • Exercise the actual chat backend in addition to unit tests; do not equate a filesystem scan with the chat's usable catalog.

Separately, a user's desire to hide a plugin's many entries from the slash picker should not require editing that plugin's skill files. Presentation preferences, provider invocation policy and catalog completeness are distinct concerns. This bug can be fixed independently of adding that optional UI control.

Scope of the claim

The evidence establishes truncation in Orca's command catalog. It does not establish that Claude's underlying model/Skill tool has lost the ability to invoke every omitted skill, nor does it measure full skill bodies loaded into context. No identifying hostnames, local installation paths, machine inventory, private skill names or raw session logs are included.

davefano avatar Nov 20 '26 13:11 davefano

Data point for the follow-up, since #45571 describes itself as a partial fix.

Environment: Orca v1.4.266 (desktop only), macOS arm64, Claude Code 2.1.329.

An initialize-only probe (control_request / initialize, no prompt sent) on my setup returned 1,398 commands, 1,387 of them valid distinct names: 672 user-level/built-in entries plus 19 plugins. The largest single plugin exports 414 commands.

  • With the 512 bound (v1.4.266): 875 entries are dropped, including every plugin command (715), because user-level skills sort first and fill the whole budget.
  • With the 1024 bound from #45571: 363 entries would still be dropped (292 plugin, 71 user-level).

So for plugin-heavy setups the tail of the catalog still disappears from the / picker with no visible sign.

Two things that would help beyond raising the number:

  1. A visible "N more commands not shown" row in the picker when the catalog is cut, so the missing entries are not mistaken for a broken plugin install.
  2. Matching typed text against the full reported name list on the host even when rows beyond the cap are not sent to the client, so a prefix like /ecc: can still surface results.

torisKR avatar Nov 20 '26 17:11 torisKR