You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(workspace): add an optional initial agent prompt - #41649
You can tell an agent what to do while creating a workspace. Orca opens the workspace and starts the agent with that first message.
What Changed
Before: Create workspace lets you pick an agent, then you type the task after the new workspace opens.
After: An optional multiline Initial prompt field appears below the agent picker. It works with Git worktrees and folder workspaces. Blank Terminal hides the field. Leaving it empty uses the existing launch flow.
The composer sends typed text through the existing native-chat or terminal launch path. Terminal launches paste and submit after readiness, which keeps multiline text out of shell arguments. The prompt survives the existing reopen recovery paths. A blank workspace name still uses Orca's existing first-message auto-rename behavior when enabled.
Why
This lets users create a workspace and give the agent its first task in one step. The existing dialog and launch machinery cover the request without a new setting or composer mode.
The screenshots show the Agent section of the Create workspace dialog rendered using Orca's component fixture runner on Linux.
Before
After
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Rendered and inspected before and after fixtures in light and dark mode using headless Chromium on Linux.
All 29 non-test checks in pnpm check:changed passed, including type checks, lint, and localization. The broader related-test selection was stopped after five minutes. It reported five failures in server-hook-session-binding.test.ts. An isolated run reproduced the same five failures on both the PR branch and the upstream base (f895b716d3).
Seven focused Vitest files passed with 24 tests. The new cases cover multiline text, linked work items, and Windows cmd startup planning. The existing suites cover folder launches and native-chat admission and fallback.
To reproduce in the desktop app, open Create workspace, choose Codex or Claude, enter two lines, and click Create workspace. Check the first message in Chat UI and Terminal. Repeat with a folder project, an empty prompt, and Blank Terminal.
Live Windows, macOS, and SSH sessions were not exercised locally. The full build and suite were not run locally.
Risk
The main risk is a terminal startup or Chat-to-Terminal fallback dropping the first message. The change reuses the existing readiness-aware delivery and launch-token deduplication. It adds no setting, persistence format, or RPC schema. A plain revert removes the field and restores the previous launch flow.
Level: Low
AI Disclosure
OpenAI Codex (GPT-6) implemented the change, ran checks, and prepared the visual evidence. Two independent review passes examined repository standards and feature behavior.
Review
The first pass corrected field placement and moved typed prompts out of shell arguments. The second pass checked Git and folder routes and found Chat-to-Terminal fallback cases that now retain the delivery mode.
Cross-platform and remote: The feature uses the target host's existing launch configuration and readiness-aware delivery. Windows cmd behavior is covered in a startup test. Local, paired, and SSH fallback paths were reviewed in source.
Agents and integrations: The text is passed through the existing agent launcher. Linked work-item context keeps its existing behavior when the field is empty. When text is entered, only the explicit prompt is submitted.
Performance and UI: The dialog gains one conditional textarea using Orca's UI primitive. Blank Terminal hides it, and headless light and dark fixtures cover placement.
Security: Typed text is submitted to the agent rather than interpolated into a shell command. No new permissions are needed.
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Mobile has its own workspace screen and is outside this desktop change. Full platform validation is pending CI.
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
I stated the risk: what could break, for whom, and how to back it out
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
No actionable comments were generated in the recent review.
Walkthrough
The composer now accepts an optional initial prompt and restores it when the composer reopens. Quick and folder workspace creation pass prompt text and delivery modes into startup planning. Worktree creation supports submit-after-ready, including terminal submission after startup. Folder workspace creation adds a prompt-after-ready field and checks the required runtime capability for environment targets.
Merge Risk: Low · up to 8669e
The change adds an optional initial prompt to workspace creation and leaves behavior unchanged when the prompt is empty. A small delivery uncertainty remains on one terminal path, and platform validation is still pending in CI. The risk is low, and the owner should confirm CI before merging.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "feat(workspace): add an optional initial agent prompt" matches the main change. The PR adds an optional multiline Initial prompt field to the Create workspace dialog, and the code changes w…
Description check
The description follows the repository template closely. It covers ELI5, What Changed, Why, Linked Issue (Fixes #19555), Visual Proof with before and after images, Testing with a checklist and reprodu…
Linked Issues check
Directly linked issue #19555 has one coding objective group. Requirements: (1) Add one optional multiline field to the Create worktree dialog. (2) Send the typed text to the selected agent as the firs…
Out of Scope Changes check
Each changed file supports the Initial prompt feature or its delivery path: - Dialog UI and props: NewWorkspaceComposerAgentSection, new-workspace-composer-card-props, composer-modal-data, NewWorkspac…
Full details: Title check
Explanation
The title "feat(workspace): add an optional initial agent prompt" matches the main change. The PR adds an optional multiline Initial prompt field to the Create workspace dialog, and the code changes wire that prompt through the workspace creation and launch paths. The title is specific, concise, and follows a conventional commit style.
Full details: Description check
Explanation
The description follows the repository template closely. It covers ELI5, What Changed, Why, Linked Issue (Fixes #19555), Visual Proof with before and after images, Testing with a checklist and reproduction steps, Risk with a level and revert guidance, AI Disclosure, Review, the upstream boundary checkbox, Notes, and the Checklist. It explains the before and after behavior, the launch mechanism, and the reason for the approach. Some items are unverified: the author reports manual testing was not performed on Windows, macOS, or SSH, and the manual-test checkbox is unchecked. The author states these gaps, and the template allows that. The AI Disclosure section is filled in, which the template only asks for outside contributors. That is acceptable.
Full details: Linked Issues check
Explanation
Directly linked issue #19555 has one coding objective group. Requirements:
(1) Add one optional multiline field to the Create worktree dialog.
(2) Send the typed text to the selected agent as the first prompt through the existing path.
(3) When the field has text and Name is blank, keep the existing #2888 auto-rename behavior.
(4) When the field is empty, keep current behavior.
(5) Add no new setting, no cross-harness abstraction, and no ticket-linked prompt.
Evidence from the whole-PR summary (merge base to head):
Field: NewWorkspaceComposerAgentSection renders an optional two-row initial-prompt textarea when an agent is selected and advanced settings are not locked. Blank Terminal hides it. Values flow through NewWorkspaceComposerCardProps (agentPrompt, onAgentPromptChange) and ComposerModalData (initialAgentPrompt).
Worktree delivery: useQuickCreationExecution passes the prompt to resolveQuickCreateLinkedWorkItemPrompt. A nonblank typed prompt is returned verbatim with draftPrompt null. Delivery mode is submit-after-ready.
Folder delivery: submitFolderWorkspaceCreate uses the trimmed typed prompt ahead of note. Pending rename detection checks the selected prompt, so the #2888 naming path applies.
Empty prompt: linked-work-item draft handling and auto-submit delivery are unchanged.
No new user setting is added. submit-after-ready is a mode inside the existing launch and readiness path.
Tests named in the summary cover multiline preservation and linked-work-item precedence (linked-work-item-context.test.ts), Windows cmd startup planning (host-agent-launch-preferences-source.test.tsx), and paired folder delivery (folder-workspace-composer-submit-host-platform.test.ts).
The changes since the previous review add remote folder prompt-after-ready support. This support uses the same delivery path. This assessment relies on the supplied summaries and the test descriptions; no additional repository inspection was run. Live Windows, macOS, and SSH behavior is not verified locally. That gap does not change the coding-requirement result.
Full details: Out of Scope Changes check
Explanation
Each changed file supports the Initial prompt feature or its delivery path:
Dialog UI and props: NewWorkspaceComposerAgentSection, new-workspace-composer-card-props, composer-modal-data, NewWorkspaceComposerModal, en.json label.
Delivery mode and handoff: pending-worktree-creation, worktree-creation-flow-startup, worktree-creation-background-mount, worktree-creation-host-agent-launch.
Remote folder support for the new mode: folder-workspace-create, folder-workspace-params, worktree-runtime-capabilities, folder-workspace-creation, runtime-group-folder-setup. The capability gate applies only when startupPromptAfterReady is set and the target is remote. It prevents a remote host without the capability from receiving a prompt it cannot process.
Tests: the added and updated test files cover the new behavior.
The PR does not change mobile code. The summaries show no unrelated refactor or unrelated feature. No repository inspection was run for this pass, so the judgment relies on the supplied summaries.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Files skipped from review as they are similar to previous changes: 1
src/renderer/src/i18n/locales/en.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Hi @brennanb2025, I synced this PR with main and GitHub shows the conflicts are cleared. It adds the optional Initial prompt field to the existing Create workspace dialog for #19555. The PR includes before/after screenshots, and 23 focused tests passed locally, including multiline prompt delivery for folder workspaces.
GitHub Actions shows PR Checks and several other workflows as Action required on the current commit. Could you approve the runs and take a look when you have a chance? Thanks!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
You can tell an agent what to do while creating a workspace. Orca opens the workspace and starts the agent with that first message.
What Changed
Before: Create workspace lets you pick an agent, then you type the task after the new workspace opens.
After: An optional multiline Initial prompt field appears below the agent picker. It works with Git worktrees and folder workspaces. Blank Terminal hides the field. Leaving it empty uses the existing launch flow.
The composer sends typed text through the existing native-chat or terminal launch path. Terminal launches paste and submit after readiness, which keeps multiline text out of shell arguments. The prompt survives the existing reopen recovery paths. A blank workspace name still uses Orca's existing first-message auto-rename behavior when enabled.
Why
This lets users create a workspace and give the agent its first task in one step. The existing dialog and launch machinery cover the request without a new setting or composer mode.
Linked Issue
Fixes #19555
Visual Proof
The screenshots show the Agent section of the Create workspace dialog rendered using Orca's component fixture runner on Linux.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Rendered and inspected before and after fixtures in light and dark mode using headless Chromium on Linux.
All 29 non-test checks in
pnpm check:changedpassed, including type checks, lint, and localization. The broader related-test selection was stopped after five minutes. It reported five failures inserver-hook-session-binding.test.ts. An isolated run reproduced the same five failures on both the PR branch and the upstream base (f895b716d3).Seven focused Vitest files passed with 24 tests. The new cases cover multiline text, linked work items, and Windows cmd startup planning. The existing suites cover folder launches and native-chat admission and fallback.
To reproduce in the desktop app, open Create workspace, choose Codex or Claude, enter two lines, and click Create workspace. Check the first message in Chat UI and Terminal. Repeat with a folder project, an empty prompt, and Blank Terminal.
Live Windows, macOS, and SSH sessions were not exercised locally. The full build and suite were not run locally.
Risk
The main risk is a terminal startup or Chat-to-Terminal fallback dropping the first message. The change reuses the existing readiness-aware delivery and launch-token deduplication. It adds no setting, persistence format, or RPC schema. A plain revert removes the field and restores the previous launch flow.
Level: Low
AI Disclosure
OpenAI Codex (GPT-6) implemented the change, ran checks, and prepared the visual evidence. Two independent review passes examined repository standards and feature behavior.
Review
Agent skill upstream boundary
Notes
Mobile has its own workspace screen and is outside this desktop change. Full platform validation is pending CI.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)