Skip to content

fix(dispatch): add initialPrompt to all dispatch commands - #619

Merged
namastex888 merged 1 commit into
devfrom
fix/dispatch-initial-prompt
Mar 17, 2026
Merged

namastex888 merged 1 commit into
devfrom
fix/dispatch-initial-prompt

Conversation

@namastex888

Copy link
Copy Markdown
Contributor

Summary

All four dispatch commands (genie work, genie brainstorm, genie wish, genie review) spawned agents with context in the system prompt but no initial user message. Claude Code needs a user turn to start working, so agents sat idle at the > prompt forever.

Added initialPrompt to all handleWorkerSpawn calls — agents now start executing immediately on spawn.

What was broken

genie work engineer slug#1
→ Engineer spawns
→ Gets system prompt with wish context
→ Sits at blank > prompt
→ Does nothing until someone manually sends "Start"

What's fixed

genie work engineer slug#1
→ Engineer spawns
→ Gets system prompt + initial message: "Execute Group 1 of wish..."
→ Starts working immediately

Test plan

  • typecheck + lint clean
  • genie work engineer <slug>#<group> — engineer starts immediately
  • genie brainstorm <agent> <slug> — agent starts brainstorming
  • genie wish <agent> <slug> — agent starts writing wish
  • genie review <agent> <ref> — reviewer starts reviewing

genie work/brainstorm/wish/review spawned agents with context in the
system prompt but no initial user message. Claude Code needs a user
turn to start working, so agents sat idle at the > prompt.

Added initialPrompt to all four handleWorkerSpawn calls so agents
start executing immediately on spawn.

Closes #583 (partially — engineers now receive work automatically)
@coderabbitai

coderabbitai Bot commented Mar 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 57770b8a-fc30-42a2-bbac-284bdb199eb8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/dispatch-initial-prompt
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request resolves an issue where AI agents, when dispatched via genie commands, would not automatically begin their tasks. By introducing an initialPrompt to the agent spawning mechanism, the change ensures that agents receive an immediate user message, prompting them to start execution without requiring manual intervention. This significantly streamlines the agent workflow for all genie commands.

Highlights

  • Agent Idling Fix: Previously, agents spawned by genie dispatch commands (work, brainstorm, wish, review) would remain idle after receiving their system prompt, awaiting a manual user input to begin execution.
  • Initial Prompt Implementation: An initialPrompt parameter has been added to all handleWorkerSpawn calls within the dispatch.ts file, providing agents with an immediate starting message.
  • Enhanced Agent Autonomy: With the addition of initial prompts, agents now automatically begin their assigned tasks upon spawn, improving workflow efficiency and reducing manual intervention.
Changelog
  • src/term-commands/dispatch.ts
    • Added initialPrompt to the brainstormCommand function call to initiate brainstorming immediately.
    • Added initialPrompt to the wishCommand function call to prompt the agent to create a wish.
    • Added initialPrompt to the workDispatchCommand function call to instruct the agent to execute a specific wish group.
    • Added initialPrompt to the reviewCommand function call to guide the agent in performing a review.
Activity
  • The author has completed typechecking and linting, ensuring code quality.
  • A comprehensive test plan has been outlined to verify the immediate execution of agents for all genie dispatch commands (work, brainstorm, wish, review).
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

The pull request adds specific initialPrompt configurations to various AI agent commands (brainstormCommand, wishCommand, workDispatchCommand, reviewCommand) to provide clearer initial instructions and context for each task.

@namastex888
namastex888 merged commit 390241f into dev Mar 17, 2026
6 checks passed
@namastex888
namastex888 deleted the fix/dispatch-initial-prompt branch March 29, 2026 22:10
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.

1 participant