Skip to content

fix(desktop): surface why Add agent fails on create - #258

Merged
cursor[bot] merged 4 commits into
mainfrom
cursor/fix-add-agent-submit-feedback-3bc7
Aug 21, 2026
Merged

fix(desktop): surface why Add agent fails on create#258
cursor[bot] merged 4 commits into
mainfrom
cursor/fix-add-agent-submit-feedback-3bc7

Conversation

@oscarlehuu

@oscarlehuu oscarlehuu commented Aug 20, 2026

Copy link
Copy Markdown

Summary

Fixes silent / unexplained failures when adding a custom agent from the Add agent catalog modal — including Hermes and other runtimes.

Root causes found while investigating “Add agent does nothing for any runtime”:

  1. Feedback surface bug — create submit cleared errors onto the library toast surface while the catalog modal was open, so failures (e.g. harness not installed) never appeared in the dialog.
  2. Silent disable for preferred Hermes / defaults — when the preferred harness is Hermes (or any profile-owned runtime), Customize tabs and the harness picker are hidden; an unavailable runtime still blocked Add agent with no visible warning.
  3. Missing inline error wiring — early create failures only set personaErrorMessage, not definitionError, so the red error line inside the form stayed empty.
  4. Discard / dirty tracking — embedded create Cancel cleared fields before the discard prompt, and name/instructions never marked the catalog shell dirty (broke Keep editing).

Also extracts identity fields into AgentDefinitionIdentityFields so AgentDefinitionDialog stays under the desktop file-size ratchet.

Related issue

None found matching this exact Add-agent / any-runtime failure (closest Hermes work is #51 / profile-binding UX).

Testing

  • node --test desktop/src/features/agents/ui/personaSubmitFeedback.test.mjs (6 passing)
  • node desktop/scripts/check-file-sizes.mjs (AgentDefinitionDialog ~982 lines)
  • biome check on touched desktop agent UI files

Manual checklist for reviewers:

  1. Open Add agent → Create agent with Hermes preferred but CLI missing → expect yellow persona-runtime-unavailable banner and disabled Add.
  2. With a runtime installed, submit a create that fails → expect toast on the catalog dialog and the inline red error in the form.
  3. Edit name/instructions, Cancel → Keep editing should preserve the draft.
  4. Customize mode still shows the harness-field warning (no duplicate banner).
Open in Web Open in Cursor 

cursoragent and others added 2 commits August 20, 2026 14:33
Catalog create was clearing feedback onto the library surface, so submit
errors never toasted inside the open Add agent modal. Hermes/defaults
create also hid the harness picker, so an unavailable runtime disabled
Add agent with no visible warning.

Route create feedback to the catalog surface when that dialog is open,
show a standalone unavailable-runtime banner outside Customize mode, and
pass persona submit errors into the definition dialog.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: oscarlehuu <oscarlehuu@users.noreply.github.com>
AgentDefinitionDialog grew past the over-limit ratchet while adding the
unavailable-runtime banner. Move name/instructions/warning UI into
AgentDefinitionIdentityFields so Desktop Fast can pass again.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: oscarlehuu <oscarlehuu@users.noreply.github.com>
@oscarlehuu
oscarlehuu marked this pull request as ready for review August 21, 2026 00:29
cursoragent and others added 2 commits August 21, 2026 01:02
Co-authored-by: oscarlehuu <oscarlehuu@users.noreply.github.com>
Embedded Add agent Cancel wiped the form before the discard prompt, and
name/instructions edits never marked the catalog shell dirty. Propagate
hasUserChanges via onDirtyChange and defer embedded field reset until
the parent actually closes.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: oscarlehuu <oscarlehuu@users.noreply.github.com>
@cursor
cursor Bot merged commit 7971da4 into main Aug 21, 2026
8 of 14 checks passed
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