#8487·omnigent

[Feature] Curate the new-session picker: config / settings to hide seeded harnesses and agents

Author: jsonmp-k8Created Sep 28, 2026Updated Oct 1, 2026
LabelsFeaturehelp wantedcomp:servercomp:web-uiP2-mediumtriagedDNB

Problem or use case

The new-session picker always offers the full seeded roster, and a deployment has no way to curate it.

Opening the composer dropdown shows a Harnesses group (Claude Code, Cursor, Codex, then Other...) and an Agents group (Polly, Debby, then Other...). On a deployment that only ever runs one or two in-house agents, most of those rows are noise — and a user's own custom agents are the ones buried behind Other....

Two concrete cases:

  1. A team that standardises on custom agents. They want their own bundles to be the picker. Today the seeded rows stay pinned to the main list and the custom ones fold into a submenu — exactly backwards for them.
  2. A locked-down deployment. An operator who deliberately doesn't provision Cursor or Codex still has those rows rendered with a "needs setup" warning, inviting users down a path that won't work.

The existing controls don't cover either:

  • Settings › Appearance › "Hide unconfigured harnesses" (web/src/lib/harnessVisibilityPreferences.ts:12) only drops rows that can't launch on the selected host. A harness that's installed and authenticated — Claude Code on most hosts — always stays. It also does nothing for the Agents group, so Polly and Debby are unaffected.
  • OMNIGENT_BUILTIN_AGENT_DIRS (omnigent/server/app.py:922) is purely additive: it promotes your agent into the built-in group, but the packaged ones stay.
  • Deleting the rows doesn't stick. _ensure_default_agents (omnigent/server/app.py:890) re-seeds _ensure_default_native_agents / _ensure_default_acp_agents / _ensure_default_debby_agent / _ensure_default_polly_agent on every lifespan startup, and /v1/agents is read-only (omnigent/server/routes/builtin_agents.py:143, GET only, no DELETE). Any row an operator removes comes back on the next boot.

So today the only way to get a custom-only dropdown is to patch the source.

Related: #2423 (closed, completed) added the host-readiness filter that became the "Hide unconfigured harnesses" toggle. This asks for the orthogonal axis — curating by operator/user choice rather than by host readiness.

Proposed solution

A. Server-side seeding gate (operator). An env var / server config to skip the packaged built-ins, leaving _ensure_extra_builtin_agents to run:

bash
OMNIGENT_SEED_DEFAULT_AGENTS=0
OMNIGENT_BUILTIN_AGENT_DIRS="/opt/agents/my-agent.yaml:/opt/agents/my-bundle"

The four _ensure_default_* calls at omnigent/server/app.py:908-911 are already factored apart, so this is a gate around three of them. _ensure_extra_builtin_agents must stay outside the gate — otherwise turning the flag on empties the picker entirely.

An allowlist would be more precise than a boolean, e.g. OMNIGENT_SEEDED_AGENTS="claude-native-ui,polly", letting an operator keep Claude Code while dropping the rest. Either shape works; the allowlist is strictly more expressive and the same amount of code at the seeding call site.

B. Per-user visibility (user). Extend the Appearance section beyond the single "hide unconfigured" boolean to a per-entry show/hide list, covering the Agents group as well as Harnesses — device-local in localStorage, alongside the existing pref. This is what a user on a shared server needs, since they can't change server env.

C. Make the primary list data-driven. web/src/shell/NewChatDialog.tsx:1679 hardcodes ["claude", "cursor", "codex"] as the primary harnesses, with everything else demoted behind Other.... Whatever curation lands in A or B, this array should follow it rather than pinning three vendors regardless of what the deployment actually runs.

Notes for whoever picks this up:

  • partitionAgentsByKind (web/src/lib/agentGrouping.ts:124) splits on the server's builtin flag, so a seeding-level gate (A) flows through to the UI grouping for free.
  • The picker reads the existing pref with useMemo(() => readHideUnconfiguredHarnesses(), []) — empty deps (NewChatDialog.tsx:1675), so today the toggle needs a page reload to take effect. A per-entry list (B) will be changed far more often than a one-time boolean, so it should be reactive rather than read-once.
  • Empty-state: with everything gated off and no custom agent registered, both groups render empty. That path needs a deliberate message rather than a blank menu.

Alternatives considered

  • Patch the source. Gate app.py:908-911 locally. Works, but is a fork to carry across upgrades.
  • Turn on "Hide unconfigured harnesses" and leave the unwanted harnesses unprovisioned. Partly works for the Harnesses group, but it's an accident of provisioning rather than a stated preference — installing the CLI for any other reason makes the row reappear. Does nothing for Polly/Debby.
  • Delete the rows from the agent store directly. Broken by design: _ensure_default_agents re-seeds on the next server start.
  • A project-level default agent (ProjectSettingsDialog) only changes what's preselected, not what the dropdown contains.

Harness

Not applicable

Platform or device

Not platform-specific

Harness mode

Not applicable

Expected reach

Some users

Authentication type

Not authentication-related


Generated by Claude Code