Skip to content

Allow hiding agent harness options#2588

Open
klopez4212 wants to merge 15 commits into
mainfrom
kennylopez-agent-harness-toggles
Open

Allow hiding agent harness options#2588
klopez4212 wants to merge 15 commits into
mainfrom
kennylopez-agent-harness-toggles

Conversation

@klopez4212

@klopez4212 klopez4212 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Let installed harnesses be turned off in Settings and persist that visibility on this device.
  • Remove hidden harnesses from new-agent, defaults, and implicit provisioning choices without uninstalling them or disrupting existing pinned agents.
  • Keep fallback selection and backend pinning consistent across dialogs, templates, quick drops, and mention-created agents.

Testing

  • pnpm check
  • pnpm test (3,480 tests)
  • Desktop Tauri tests (1,624 tests passed; 14 keychain-only tests ignored)
  • Root unit suites and mobile tests via the pre-push gate

@klopez4212
klopez4212 marked this pull request as ready for review July 23, 2026 20:08
@klopez4212
klopez4212 requested a review from a team as a code owner July 23, 2026 20:08

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4b365349c4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src/features/agents/ui/AgentDefaultsEditor.tsx
@klopez4212
klopez4212 requested a review from wpfleger96 July 23, 2026 20:31

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b16014102a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src/features/agents/lib/runtimeVisibilityPreference.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4a049a3383

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src/features/agents/lib/runtimeVisibilityPreference.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b48a8c2af1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src/features/agents/ui/useManagedAgentActions.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c0f26020cc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src-tauri/src/managed_agents/global_config/mod.rs
Comment thread desktop/src/features/agents/ui/AddTeamToChannelDialog.tsx

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d2de493809

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src/features/agents/useGlobalAgentConfig.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 33d285e543

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src/features/agents/lib/instanceInputForDefinition.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4e82da3615

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src/features/agents/ui/AgentDefinitionDialog.tsx
Comment thread desktop/src/features/agents/ui/agentConfigOptions.tsx Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 93cf670e77

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src/features/agents/lib/resolvePersonaRuntime.ts Outdated
Comment thread desktop/src/features/agents/ui/AgentDefinitionDialog.tsx

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d9b164fbf4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src/features/agents/lib/resolvePersonaRuntime.ts
Comment thread desktop/src/features/agents/ui/AgentDefinitionDialog.tsx

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 642fedcff0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src/features/channels/ui/AddChannelBotDialog.tsx Outdated
Comment thread desktop/src/features/channel-templates/useApplyTemplate.ts
@wpfleger96

Copy link
Copy Markdown
Member

hey @klopez4212 — consolidated review feedback as of 642fedcff. One important item, the rest are minor/nits (flagging everything for completeness, so weigh accordingly). The iteration on this branch has been good — the resolveVisibleDefaultRuntime fallback-order fix and the ?? bypass removal in 642fedcff both resolved things I'd drafted against earlier heads.

1. (important) Four implicit create surfaces still hand off an unpinned fallback, so the hidden harness can spawn anyway. resolvePersonaRuntime now resolves a visible fallback correctly, but for a runtime-less persona that selection doesn't survive the backend handoff:

  • AddChannelBotDialog.tsx sends harnessOverride: false explicitly
  • useApplyTemplate.ts (both loops), useQuickBotDrop.ts, and useMentionSendFlow.ts omit it, which defaults to false in channelAgents.ts

With harness_override: false and a linked persona, create_time_agent_command_override (discovery/overrides.rs) returns None — the visible runtime the UI chose is discarded, and spawn falls through record_agent_commanddefault_agent_command(), i.e. buzz-agent, which may be exactly the harness the user hid. AddTeamToChannelDialog and buildInstanceInputForDefinition already handle this via shouldPinSelectedRuntimeForDefinition; I think the other four surfaces need the same treatment (or ideally all persona-backed creates route through one shared input builder). A cross-boundary regression test would help too — runtime-less persona + hidden buzz-agent → the agent persists and spawns on the fallback from each surface. Resolver unit tests can't catch this since the bug lives in the frontend/backend handoff.

2. (minor) global_model_provider_for_record compares runtimes with std::ptr::eq — it works because both sides come from the static KNOWN_ACP_RUNTIMES table, but preferred.id == selected.id is equally cheap and won't silently break if a KnownAcpRuntime is ever constructed outside the table.

3. (minor) The relay-mesh hide policy now lives in two places: getPersonaHiddenProviderIds (agentConfigOptions.tsx) and the inline memo in AgentConfigFields.tsx, with subtly different inputs (selectable-set + preserveCurrentRuntime vs. bare selectedRuntimeId !== "buzz-agent"). The doc comment says "one source of truth" but there are two — worth collapsing.

4. (minor) When a pinned runtime is filtered out of the dropdown, the edit dialogs push `${id} (current)` using the raw id — "goose (current)" instead of "Goose (current)". The label is available in the unfiltered runtimes list.

5. (minor) useQuickBotDrop and useMentionSendFlow seed their fallback with runtimes[0], and resolveVisibleDefaultRuntime only applies the buzz-agent-first ordering when that seed is hidden — a visible runtimes[0] is returned as-is. Pre-existing behavior, but now inconsistent with the deliberate preference ordering elsewhere in this PR.

6. (nit) The PR description could use a refresh from the final state — the architecture evolved a lot over the nine commits (central resolvePersonaRuntime visibility boundary, the create-vs-edit configScope split, getPersonaHiddenProviderIds, create-mode seed replacement) and the current description doesn't cover it all.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 616e9d7625

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src/features/agents/ui/agentConfigOptions.tsx Outdated
Comment thread desktop/src/features/agents/lib/resolvePersonaRuntime.ts
…ess-toggles

# Conflicts:
#	desktop/src/features/agents/AGENTS.md
#	desktop/src/features/agents/ui/AgentDefaultsEditor.tsx
#	desktop/src/features/agents/ui/AgentDefinitionDialog.tsx
#	desktop/src/features/agents/ui/AgentInstanceEditDialog.tsx

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b8d8fb2848

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src/features/agents/lib/instanceInputForDefinition.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants