Repository navigation
Conversation
There was a problem hiding this comment.
ℹ️ One scope issue worth cleaning up — no functional concerns found.
Reviewed changes
Reviewed the complete diff (117 files) for the custom-agent-profiles feature end to end: the shared profile model and normalization, host-authoritative startup planning in the runtime, the RPC schemas and mixed-version capability gate, the renderer settings/combobox/tab-bar/composer surfaces, and the sleep/resume + paired-tab snapshot persistence.
- Profile model —
derived/genericCustomAgentProfiletypes with bounded string/argv normalization (control-char rejection, 32-profile cap, 16 KB argv budget) and per-shell literal quoting insrc/shared/custom-agent-profile.ts. - Windows
cmdlaunch — a bounded PowerShell bootstrap that ships argv through an encoded one-shot env var (ORCA_CUSTOM_AGENT_WINDOWS_ARGV_V1) and a self-cleaning temp.cmdrunner; covered by real-process corpus tests (metacharacters, Unicode, empty args, spaces, max payload, cleanup). - Host-authoritative startup —
buildCustomAgentStartupPlanbuilds the exact command on the execution host, inheriting base-agent env forderivedprofiles while pinning the literal executable + argv; Windows SSH and stale paired hosts fail closed. - Wire contract — additive
customAgentProfile*RPC fields plus theterminal.custom-agent-launch.v1capability, gated so mixed-version clients/hosts degrade safely. - Surfaces — Agent settings CRUD with serialized deletes and write-failure retention, the agent combobox and tab-bar menus, quick/folder composer threading of
AgentLaunchSelection, and snapshot persistence through the session schema, sleeping-agent records, and paired-tab sync.
ℹ️ Unrelated Wear OS planning document bundled into the PR
docs/wear-os-command-center-plan.md (826 lines) is a Wear OS "command center" planning document that has nothing to do with custom agent profiles. It came in via the merge of the fork's main (d799be7913 docs(wear): plan Expo command center (#1)) rather than being authored here, and it will land in the repository with this PR.
Technical details
# Unrelated file bundled into the diff
## Affected sites
- docs/wear-os-command-center-plan.md — 826-line Wear OS planning doc, unrelated to this feature.
## Required outcome
- Drop the file from this PR (or split it into its own change) so the custom-agent-profiles diff only contains feature code.
## Suggested approach (optional)
- Rebase the branch on the upstream `main` base (the doc was merged into the fork's `main` separately) rather than deleting it in a follow-up commit.DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
a6e23d9 to
a713eb7
Compare
Greptile SummaryThe PR adds persisted custom agent launch profiles and exposes them in the existing-workspace New tab menu.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| src/shared/custom-agent-profile.ts | Defines bounded profile normalization, allowlisted duplicated-provider identity, and shell-safe literal argv construction. |
| src/renderer/src/lib/launch-custom-agent-in-new-tab.ts | Routes custom launches by execution host and platform, rejects unsupported targets, and seeds optional bootstrap identity. |
| src/renderer/src/components/settings/CustomAgentProfilesSection.tsx | Implements profile creation, editing, deletion, normalization, and persistence. |
| src/renderer/src/components/tab-bar/QuickLaunchButton.tsx | Adds custom profiles to direct New tab launches while preserving the intentional prompt-bearing picker boundary. |
| src/main/persistence/loading-store/normalize-loaded-global-settings.ts | Normalizes persisted custom profiles during settings restoration. |
| src/main/persistence/applying-settings/settings-update.ts | Enforces profile normalization at the main-process settings write boundary. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Saved custom profile] --> B[Normalize profile]
B --> C[Select worktree]
C --> D{Execution host}
D -->|Paired runtime| E[Reject unsupported launch]
D -->|Windows SSH| E
D -->|Local, WSL, or Unix SSH| F[Resolve platform and shell]
F --> G[Encode literal argv]
G --> H[Create terminal tab]
H --> I[Queue startup command]
B --> J{Allowlisted duplicated identity?}
J -->|Yes| K[Seed launchAgent]
J -->|No| L[Leave provider unclaimed]
K --> H
L --> H
Reviews (4): Last reviewed commit: "fix(agents): bind identity to executable" | Re-trigger Greptile
|
Thanks for the review. These are deliberate scope boundaries, not accidental omissions:
The concrete use cases covered here are independent |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds validated custom agent profiles with persisted settings, shell-specific launch commands, and profile management UI. Automations can select, store, validate, dispatch, and display custom profiles. Quick launch, keyboard shortcuts, terminal tabs, and background sessions support custom profile execution. Windows-specific argument transport receives dedicated tests and CI coverage. Merge Risk: 🟡 Moderate · up to This PR adds persisted custom launch profiles to terminals and automations, but current behavior can override a template-selected agent, reuse sessions with outdated profile arguments, or exceed Windows launch limits; concurrent settings edits may also lose profile changes. These are bounded but concrete merge-readiness risks that should be fixed or explicitly accepted before merging. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 9.09% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 55 functions across 51 files. (20 skipped: 2 unsupported, 18 over the file limit.)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (1)
src/renderer/src/components/tab-bar/QuickLaunchButton.tsx (1)
253-255: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse a named interpolation placeholder.
Replace
{{value0}}with a semantic placeholder such as{{profileName}}. Update the options object and locale value together.Based on learnings, new user-facing TypeScript and TSX strings must use intent-named localization IDs with named interpolation placeholders.
Source: Learnings
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 783e08ff-2a61-4f56-8d92-bc45382de687
📥 Commits
Reviewing files that changed from the base of the PR and between 75e5c99 and a713eb7fe9c061c5dc23e66db446266a9ad31e39.
📒 Files selected for processing (24)
src/main/persistence-settings-update.test.tssrc/main/persistence/applying-settings/settings-update.tssrc/main/persistence/loading-store/normalize-loaded-global-settings.tssrc/renderer/src/components/agent/AgentSettingsDialog.tsxsrc/renderer/src/components/settings/AgentCatalogRow.tsxsrc/renderer/src/components/settings/AgentsPane.test.tsxsrc/renderer/src/components/settings/AgentsPane.tsxsrc/renderer/src/components/settings/CustomAgentProfileEditor.tsxsrc/renderer/src/components/settings/CustomAgentProfilesSection.test.tsxsrc/renderer/src/components/settings/CustomAgentProfilesSection.tsxsrc/renderer/src/components/settings/custom-agent-profile-draft.test.tssrc/renderer/src/components/settings/custom-agent-profile-draft.tssrc/renderer/src/components/settings/settings-capability-section-renderers.tsxsrc/renderer/src/components/tab-bar/QuickLaunchButton.test.tssrc/renderer/src/components/tab-bar/QuickLaunchButton.tsxsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/lib/launch-custom-agent-in-new-tab.test.tssrc/renderer/src/lib/launch-custom-agent-in-new-tab.tssrc/renderer/src/store/slices/settings.tssrc/shared/custom-agent-profile.test.tssrc/shared/custom-agent-profile.tssrc/shared/custom-agent-profile.win32.test.tssrc/shared/default-global-settings.tssrc/shared/global-settings-types.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the 24-file rewrite of the custom-agent feature against the prior pullfrog review (which covered the superseded 117-file implementation):
- Profile model — a single
CustomAgentProfile(id/name/executable/ordered literalargs) with bounded string normalization, control-character rejection, a 32-profile cap, a 256-arg / 16 KiB argv budget, and reserved built-in name rejection insrc/shared/custom-agent-profile.ts. - Launch path —
launchCustomAgentInNewTabbuilds a shell-quoted command and queues it through the existing terminal route, resolving platform/shell from SSH state, WSL paths, and the project runtime; paired Orca runtimes and Windows SSH fail closed with a toast. - Windows argv transport — a bounded PowerShell bootstrap ships argv via a one-shot base64 env var into a
Get-Command-resolved temp.cmdrunner, with%/!neutralized and exit-code propagation. - Settings surfaces — Agent-settings CRUD with serialized deletes, write-failure retention, and duplicate-as-custom for built-in agents, plus the tab-bar quick-launch menu entry.
- Prior concern resolved — the unrelated Wear OS planning document flagged in the previous review is no longer in the diff.
The Windows quoting corpus test (custom-agent-profile.win32.test.ts) is describe.skip on non-Windows, so it does not run on Linux CI; it is the only part of this feature that requires a Windows host to exercise.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
a713eb7 to
89c6f8c
Compare
|
Reviewed the remaining CodeRabbit interpolation nit: retained |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the delta since the prior pullfrog review (a713eb7):
- Remote-server duplication guard —
AgentsPanenow disables duplicate-as-custom while an active server environment is selected, matching the fact that custom profiles can't launch on paired Orca runtimes. - Stale persistence-error cleanup — cancelling the editor and re-attempting a failed delete now clear the previous write error.
- Launch watchdog for custom agents — the terminal-launch watchdog was extracted into
watchTerminalLaunchand applied to custom-profile launches so they surface the same "terminal did not start" toast. - Windows argv safety — profile normalization gained a Windows env-var length guard, and the decoded argv is now wrapped in
@()so a single-element argv (a profile with no arguments) no longer unwraps to a scalar in the PowerShell bootstrap.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Important
A profile duplicated from a built-in agent keeps its baseAgent tag even after its executable is edited, so a repointed binary still launches with the original agent's launchAgent — firing Codex-specific launch prep for a process that isn't Codex.
Reviewed changes
Reviewed the single new commit 19bb69f ("fix(agents): retain duplicated identity") since the prior pullfrog review at 89c6f8c:
- Added
baseAgentto the profile contract —CustomAgentProfilegains an optionalbaseAgent: TuiAgent, retained bynormalizeCustomAgentProfileonly whenisTuiAgentpasses. - Stamped
launchAgentat launch —launchCustomAgentInNewTabnow forwardsprofile.baseAgentaslaunchAgenton bothcreateTabandqueueTabStartupCommand. - Propagated the tag from duplication —
duplicateBuiltInAgentAsCustomrecordsbaseAgent: agent.id, and the persistence/launch tests were updated to assert the new field.
The duplication happy path (duplicate Codex → tweak a model flag) is correct and restores the provider identity the tab previously dropped. The issue below is the desync when a duplicated profile is later edited.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the single new commit 8a1ed1a ("fix(agents): bind identity to executable") since the prior pullfrog review at 19bb69f:
- Bound duplicated identity to the executable —
CustomAgentProfilegains a persistedbaseAgentExecutable, captured at duplication ascommandTokens[0];normalizeCustomAgentProfilenow retainsbaseAgentonly whenisTuiAgent(baseAgent)andbaseAgentExecutable === executable. - Severed identity on executable edit — an argument-only edit keeps the provider tag, but repointing
executabledrops both identity fields through the editor save path, persistence load/update, and the launch path (all normalize the collection beforelaunchAgentis stamped). - Coverage for the desync — new tests prove argument-only variants retain Codex identity, and that the editor-save, normalization, and launch paths all drop
launchAgentfor a repointed profile.
The prior IMPORTANT finding (a duplicated-then-edited profile launching with a stale baseAgent) is fully addressed; the comparison also re-derives identity from a normalized executable, so stale/imported state cannot reach Codex-specific launch prep.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
Local testing is complete on 0ab4b9b7e: the 69,600-test Linux-native suite, 48-test Windows review-regression lane, typecheck, lint, production/Electron builds, and all three Electron journeys pass. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/renderer/src/components/settings/AgentsPane.test.tsx (1)
179-180: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAssert that each section heading is present before comparing order.
indexOfreturns-1for a missing string. If the "Installed" section disappears,-1 < indexstill passes. If "Custom agents" disappears,-1 < indexOf('Available to install')also passes. Both ordering assertions can then succeed while the layout under test is broken.Assert the indices are non-negative first.
💚 Proposed fix
expect(markup).toContain('Duplicate Claude as custom agent') - expect(markup.indexOf('Installed')).toBeLessThan(markup.indexOf('Custom agents')) - expect(markup.indexOf('Custom agents')).toBeLessThan(markup.indexOf('Available to install')) + const installedIndex = markup.indexOf('Installed') + const customIndex = markup.indexOf('Custom agents') + const availableIndex = markup.indexOf('Available to install') + expect(installedIndex).toBeGreaterThanOrEqual(0) + expect(customIndex).toBeGreaterThanOrEqual(0) + expect(availableIndex).toBeGreaterThanOrEqual(0) + expect(installedIndex).toBeLessThan(customIndex) + expect(customIndex).toBeLessThan(availableIndex)
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: b80fb0e4-d142-42d5-a76a-d84353529888
📥 Commits
Reviewing files that changed from the base of the PR and between 8a1ed1a64dfc46ff0365b6d6ff4c351208ff68c2 and b20d4c144ae223544f7f2dcf76fa935ed047e96f.
📒 Files selected for processing (19)
src/renderer/src/components/Terminal.tsxsrc/renderer/src/components/settings/AgentCatalogRow.tsxsrc/renderer/src/components/settings/AgentDefaultSetting.tsxsrc/renderer/src/components/settings/AgentDetectionCatalog.tsxsrc/renderer/src/components/settings/AgentSettingsRow.tsxsrc/renderer/src/components/settings/AgentsPane.test.tsxsrc/renderer/src/components/settings/AgentsPane.tsxsrc/renderer/src/components/settings/CustomAgentProfileEditor.tsxsrc/renderer/src/components/settings/CustomAgentProfilesSection.test.tsxsrc/renderer/src/components/settings/CustomAgentProfilesSection.tsxsrc/renderer/src/components/settings/custom-agent-profile-draft.tssrc/renderer/src/components/tab-bar/QuickLaunchButton.test.tssrc/renderer/src/components/tab-bar/QuickLaunchButton.tsxsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/lib/launch-custom-agent-in-new-tab.test.tssrc/renderer/src/lib/launch-custom-agent-in-new-tab.tssrc/shared/custom-agent-profile.test.tssrc/shared/custom-agent-profile.tssrc/shared/custom-agent-profile.win32.test.ts
🚧 Files skipped from review as they are similar to previous changes (2)
- src/renderer/src/i18n/locales/en.json
- src/renderer/src/components/settings/CustomAgentProfileEditor.tsx
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the delta since the prior pullfrog review at 8a1ed1a — the single new commit b20d4c1 ("feat(agents): align custom profiles with agent settings"):
- Enabled/default profile state —
CustomAgentProfilegainsenabled/isDefault, withnormalizeCustomAgentProfiledropping the default flag from disabled profiles andnormalizeCustomAgentProfilesenforcing a single default viasetDefaultCustomAgentProfile/getDefaultCustomAgentProfile/isCustomAgentProfileEnabled. - Default-custom launch routing — the
tab.newAgentshortcut and the quick-launch menu now prefer the default custom profile (ordered first, disabled profiles hidden, shortcut badge on the default), while built-in agents suppress their shortcut badge while a custom default is active. - Shared row primitives —
AgentSettingsRow/AgentRowAction/AgentAvailabilityControlextracted intoAgentSettingsRow.tsx, withAgentCatalogRowandCustomAgentProfilesSectionrebuilt on top of them (inline enable/disable and set-default controls). - Non-nullable launch build —
buildCustomAgentLaunchnow returnsCustomAgentLaunch(input is pre-normalized), andlaunchCustomAgentInNewTabrejects disabled profiles with a toast.
The prior IMPORTANT finding (stale baseAgent after an executable edit) was already resolved at 8a1ed1a and remains correctly handled: normalization still binds provider identity to the normalized executable.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
b20d4c1 to
d719bdb
Compare
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the delta since the prior pullfrog review at b20d4c1:
- Shortcut resolution extracted — the inline
tab.newAgentcustom-profile logic was moved out ofTerminal.tsxinto a dedicatedresolveTerminalAgentTabShortcutinterminal-agent-tab-shortcut.ts(returning{ actionId, agent, customAgentProfileId }), andhandleNewCustomAgentTabmoved intouse-terminal-create-actions.ts;terminal-workspace-keydown.tsnow dispatches oncustomAgentProfileIdbeforeagent. - Disabled default fixed —
QuickLaunchButtonnow derivesdefaultCustomAgentfromenabledCustomProfilesrather than all normalized profiles, so a disabled profile carrying a staleisDefaultflag no longer suppresses the built-in agent's shortcut badge or takes the default-first slot; a regression test covers this. - Settings wiring —
AgentSettingsDialognow passesupdateSettingsOrThrowthrough toAgentsPaneso profile persistence failures surface through the existing throw path.
The extraction is faithful: the old inline handler computed resolveDefaultAgentForNewTab twice and the new module computes it once with no behavioral change. Disabled-default handling is now consistent across the shortcut path (getDefaultCustomAgentProfile, which normalizes and strips isDefault from disabled profiles) and the quick-launch menu. Focused tests (custom-agent-profile, terminal-agent-tab-shortcut, QuickLaunchButton) all pass.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
Hey @brennanb2025. This is mostly a problem I solved for myself with Orca. Should be ready for your eyes. Let me know if you would like any changes or if we should proceed another way. |
c02a1f8 to
acac23f
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
ℹ️ No critical issues — one minor coverage gap worth considering.
Reviewed changes
Reviewed the automations delta since the prior pullfrog review at d719bdb (the branch was rebased, so this run's delta is c02a1f8..acac23f):
- Automation model + wire — added
customAgentProfileIdtoAutomation, the create/update input types, the RPC create/update schemas (update usesOptionalNullablePlainStringsonullclears the field), the runtime controller forwarding, andcreateAutomation/updateAutomationpersistence. - Custom startup planning — new
custom-agent-automation-startup.tsreplays the base provider's prompt-injection mode over the profile's literalexecutable+args, preserving the Windows argv transport env and Codexshell-readydelivery;launch-agent-background-session.tsnow routes throughbuildAutomationAgentStartupPlan. - Fail-closed dispatch —
handleAutomationDispatchRequestresolves the profile viafindEnabledCustomAgentProfileand errors when missing/disabled;saveOrcaAutomationblocks custom profiles for runtime-host destinations; the serve-mode headless dispatcher throws. - Editor + list surfaces —
AgentCombobox/AgentComboboxItemlist custom profiles with provider icons; list rows, search, anduse-automation-agent-labelresolve the profile name. - Test infra — registered
custom-agent-profile.win32.test.tsin CI (pr.yml + pr-code-change-scope.mjs) and switched its temp-dir cleanup to the retryingremoveTreeSync.
ℹ️ Session reuse is not profile-aware
An automation with reuseSession: true that carries a custom profile will reuse a prior run's live session keyed only on agentId (the base provider). If the automation's customAgentProfileId is edited between runs, the next dispatch submits the prompt to a session launched with the previous profile's executable/args instead of relaunching with the new ones.
Technical details
# Session reuse ignores customAgentProfileId
## Affected sites
- src/renderer/src/hooks/automation-dispatch-handler.ts:104 — `findReusableAutomationSession({ automationId, agentId, ... })` does not pass `customAgentProfileId`.
- src/renderer/src/lib/automation-session-reuse.ts:69 — `isReusableAgentStatus(entry, agentId)` matches on the base provider only, so a `codex-luna` and a `codex-default` session are indistinguishable.
## Required outcome
- A reuse candidate must not be returned when its launch profile differs from the dispatching automation's current `customAgentProfileId` (including the transition from a profile back to the plain base agent).
## Open questions for the human (optional)
- Is this a deferred follow-up, or should reuse be disabled for custom-profile automations until the match key includes the profile?DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/renderer/src/components/automations/use-automation-editor-actions.ts (1)
97-97: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winClear the custom profile when the template selects an agent.
If
template.agentIdis defined, also setcustomAgentProfileIdtonull. Otherwise, a default custom profile remains selected and overrides the template-selected built-in agent.Proposed fix
dayOfWeek: template.dayOfWeek ?? baseDraft.dayOfWeek, agentId: template.agentId ?? baseDraft.agentId, + customAgentProfileId: + template.agentId === undefined ? baseDraft.customAgentProfileId : null, missedRunGraceMinutes: template.missedRunGraceMinutes ?? baseDraft.missedRunGraceMinutes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: a1a86566-c099-40ca-900e-6bdb84404892
📥 Commits
Reviewing files that changed from the base of the PR and between e5a1e79 and 92cd4606133ee0c6a1dcd2a5f7a4903646947929.
📒 Files selected for processing (70)
.github/workflows/pr.ymlconfig/scripts/pr-code-change-scope.mjssrc/main/automations/service.test.tssrc/main/persistence-settings-update.test.tssrc/main/persistence/applying-settings/settings-update.tssrc/main/persistence/loading-store/normalize-loaded-global-settings.tssrc/main/persistence/scheduling-automations/automation-definition-operations.tssrc/main/runtime/rpc/methods/automation-schemas.tssrc/main/runtime/rpc/methods/automations.test.tssrc/main/runtime/runtime-automation-controller.tssrc/main/startup/main-process-automations.tssrc/renderer/src/components/agent/AgentCombobox.test.tsxsrc/renderer/src/components/agent/AgentCombobox.tsxsrc/renderer/src/components/agent/AgentComboboxItem.tsxsrc/renderer/src/components/agent/AgentSettingsDialog.tsxsrc/renderer/src/components/automations/AutomationDetail.tsxsrc/renderer/src/components/automations/AutomationEditorDialog.tsxsrc/renderer/src/components/automations/AutomationEditorSettingsSidebar.tsxsrc/renderer/src/components/automations/AutomationListLocalRows.tsxsrc/renderer/src/components/automations/AutomationSchedulePicker.render.test.tsxsrc/renderer/src/components/automations/AutomationSchedulePicker.test.tssrc/renderer/src/components/automations/AutomationsPage.create-destination.test.tsxsrc/renderer/src/components/automations/automation-draft-model.tssrc/renderer/src/components/automations/automation-edit-draft.tssrc/renderer/src/components/automations/automation-list-search-rows.test.tssrc/renderer/src/components/automations/automation-list-search-rows.tssrc/renderer/src/components/automations/automation-orca-save.tssrc/renderer/src/components/automations/automation-save-action.tssrc/renderer/src/components/automations/use-automation-agent-label.tssrc/renderer/src/components/automations/use-automation-editor-actions.tssrc/renderer/src/components/automations/use-automation-list-search.tssrc/renderer/src/components/automations/use-automations-page-local-state.tssrc/renderer/src/components/automations/use-automations-page-store-state.tssrc/renderer/src/components/settings/AgentCatalogRow.tsxsrc/renderer/src/components/settings/AgentDefaultSetting.tsxsrc/renderer/src/components/settings/AgentDetectionCatalog.tsxsrc/renderer/src/components/settings/AgentSettingsRow.tsxsrc/renderer/src/components/settings/AgentsPane.test.tsxsrc/renderer/src/components/settings/AgentsPane.tsxsrc/renderer/src/components/settings/CustomAgentProfileEditor.tsxsrc/renderer/src/components/settings/CustomAgentProfilesSection.test.tsxsrc/renderer/src/components/settings/CustomAgentProfilesSection.tsxsrc/renderer/src/components/settings/custom-agent-profile-draft.test.tssrc/renderer/src/components/settings/custom-agent-profile-draft.tssrc/renderer/src/components/settings/settings-capability-section-renderers.tsxsrc/renderer/src/components/tab-bar/QuickLaunchButton.test.tssrc/renderer/src/components/tab-bar/QuickLaunchButton.tsxsrc/renderer/src/components/terminal-agent-tab-shortcut.test.tssrc/renderer/src/components/terminal-agent-tab-shortcut.tssrc/renderer/src/components/terminal-workspace-keydown.tssrc/renderer/src/components/use-terminal-create-actions.tssrc/renderer/src/components/use-terminal-keyboard-shortcuts.tssrc/renderer/src/hooks/automation-dispatch-handler.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/lib/agent-background-session-contract.tssrc/renderer/src/lib/agent-picker-search.tssrc/renderer/src/lib/launch-agent-background-session.test.tssrc/renderer/src/lib/launch-agent-background-session.tssrc/renderer/src/lib/launch-custom-agent-in-new-tab.test.tssrc/renderer/src/lib/launch-custom-agent-in-new-tab.tssrc/renderer/src/store/slices/settings.tssrc/shared/automations-types.tssrc/shared/custom-agent-automation-startup.test.tssrc/shared/custom-agent-automation-startup.tssrc/shared/custom-agent-profile.test.tssrc/shared/custom-agent-profile.tssrc/shared/custom-agent-profile.win32.test.tssrc/shared/default-global-settings.tssrc/shared/global-settings-types.tssrc/shared/pane-agent-identity-inventory.test.ts
🚧 Files skipped from review as they are similar to previous changes (23)
- src/renderer/src/components/tab-bar/QuickLaunchButton.tsx
- src/renderer/src/components/settings/CustomAgentProfilesSection.test.tsx
- src/renderer/src/components/agent/AgentSettingsDialog.tsx
- src/renderer/src/store/slices/settings.ts
- src/main/persistence/loading-store/normalize-loaded-global-settings.ts
- src/shared/global-settings-types.ts
- src/shared/default-global-settings.ts
- src/renderer/src/components/settings/AgentsPane.test.tsx
- src/main/persistence/applying-settings/settings-update.ts
- src/renderer/src/components/tab-bar/QuickLaunchButton.test.ts
- src/renderer/src/components/settings/AgentDefaultSetting.tsx
- src/renderer/src/components/settings/custom-agent-profile-draft.test.ts
- src/renderer/src/components/settings/CustomAgentProfileEditor.tsx
- src/renderer/src/components/settings/AgentSettingsRow.tsx
- src/renderer/src/components/settings/settings-capability-section-renderers.tsx
- src/main/persistence-settings-update.test.ts
- src/renderer/src/components/settings/CustomAgentProfilesSection.tsx
- src/renderer/src/lib/launch-custom-agent-in-new-tab.test.ts
- src/renderer/src/components/settings/AgentsPane.tsx
- src/renderer/src/components/settings/AgentCatalogRow.tsx
- src/renderer/src/components/settings/custom-agent-profile-draft.ts
- src/renderer/src/components/settings/AgentDetectionCatalog.tsx
- src/shared/custom-agent-profile.test.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
92cd460 to
0ab4b9b
Compare
|
Local testing is done on the rebased head. |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the single new commit 0952d1c ("fix(agents): harden Windows custom launch transport") since the prior pullfrog review:
- Dropped
-EncodedCommand/-ExecutionPolicy Bypass— the Windows bootstrap now runspowershell.exe -NoProfile -NonInteractive -Commandwith a plain-text script, removing the EDR-posture signals documented indocs/reference/windows-edr-posture.md. - Moved cmd quoting into the shared layer — the inline PowerShell
Quote-CmdArgumenthelper was replaced byquoteWindowsCmdArgument(a faithful port), so argv is pre-quoted once and shipped as a structured{ executable, runner }payload inORCA_CUSTOM_AGENT_WINDOWS_RUNNER_V1. - Resolved the executable via an env reference — the runner references the exe through
%ORCA_CUSTOM_AGENT_WINDOWS_EXECUTABLE_V1%(resolved byGet-Command), keeping the exe path out of cmd's%-expansion; only args are%-doubled. - Inlined the PowerShell shell case — the
powershellshell now emits the transport script bare (dropping the redundant nestedpowershell.exe), matching the built-inlaunchCommandcontract (buildShellCommandFromArgv→& ...). - Tightened the env-length guard —
fitsWindowsEnvironmentValuenow measures the actual encoded runner payload rather than a base64-size estimate, and the win32 corpus tests were updated to cover the new transport and exit-code propagation.
The quoting logic is a faithful port of the previously-reviewed PowerShell mechanism (verified equivalent to quoteWindowsCmdArgument), and the round-trip corpus — metacharacters, Unicode, empty args, spaces, %VAR%, and exit-code propagation — remains covered by custom-agent-profile.win32.test.ts (run on Windows; describe.skip on non-Windows, as previously noted).
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
0952d1c to
1f4cba1
Compare
Persist the duplicated built-in agent as allowlisted profile metadata. Stamp derived launches with launchAgent while generic commands stay unclaimed.
Retain duplicated provider identity only while its captured executable is unchanged. Normalize stale identity before persistence and launch.
1f4cba1 to
ffa2139
Compare
|
waiting on orca too? |
I think Orca is building this. Until then, I am using this fork of mine for my usecases. Just have to annoyingly rebase this every now and then and rebuild :) |
|
Converted to Draft because I don't think Orca team will proceed with this, as they are building their own version. Will close once their version is live (no pressure). |

ELI5
Orca can save Codex Luna (
codex --model luna) without changing normalCodex, then use that profile for new terminals and automations. It can also save
an unsupported CLI as a custom terminal agent.
What changed
installed agent and edit the copy.
and expandable row controls.
launches with its own command and arguments.
built-in provider identity separately from the custom profile.
editing the executable removes that identity.
Windows SSH fail closed where custom arguments cannot be carried safely.
Why
Built-in launch arguments are global. Named profiles keep variants such as
Codex Luna independent while leaving the built-in Codex launch unchanged.
Related issue
Related to #18249. This PR covers local launch profiles; plugin-contributed
agent definitions remain outside its scope.
Visual proof
Before — Agent settings
Stability AI
mainhas no Custom agents section.After — Agent settings
Codex Luna appears directly below Installed and reuses its row controls.
After — New terminal in a worktree
Codex Luna is selectable from the existing New tab menu.
After — New automation
Codex Luna is selectable in the existing automation agent picker.
Testing
Full local verification before sync for exact head
0952d1cbf, rebased ontoStability AI
mainat67e22345d:pnpm tcpnpm buildpnpm run check:code-quality:changed -- stability/main: no code-quality,type-aware, or React Doctor findings across 69 changed source files.
git diff --check stability/main...HEAD.settings row, worktree terminal selection, and automation selection plus
persisted
agentId/customAgentProfileIdidentity.Post-sync verification for exact head
ffa21396e, rebased onto Stability AImainat9aa0f7e77:pnpm run check:code-quality:changed -- stability/main: no code-quality,type-aware, or React Doctor findings across 69 changed source files.
git diff --check stability/main...HEAD.The full cross-platform repository matrix remains delegated to CI.
AI disclosure
OpenAI Codex assisted implementation, testing, review, and PR preparation.
Review
credentials. Windows carries launch data outside the process command line and
uses no execution-policy bypass or encoded PowerShell command.
SSH use existing execution routing. Paired runtimes and Windows SSH fail
closed where the existing contract cannot carry custom launch behavior.
customAgentProfileIdis optional; old definitions remain valid,and client-local custom profiles are not sent to paired hosts.
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies ormechanically translates no upstream skill-installer source, tests, fixtures,
registry entries, path tables, comments, or documentation.
Checklist
N/Awithreason
pnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CIwill cover; local preferred)