Skip to content

fix(hooks): update auto-spawn to use top-level genie spawn command - #538

Merged
namastex888 merged 1 commit into
devfrom
fix/auto-spawn-hook
Mar 14, 2026
Merged

namastex888 merged 1 commit into
devfrom
fix/auto-spawn-hook

Conversation

@namastex888

Copy link
Copy Markdown
Contributor

Summary

Changes

  • src/hooks/handlers/auto-spawn.ts: Remove 'agent' from spawn args array
  • Update related comments

Test Plan

  • bun run typecheck passes
  • grep -rn '"agent", "spawn"' src/ returns nothing

@coderabbitai

coderabbitai Bot commented Mar 14, 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: 937ca94d-d400-4735-a90f-237b30f26b7e

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
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/auto-spawn-hook
📝 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 addresses a critical issue in the auto-spawn hook by updating the command used to respawn agents. The change ensures that the system correctly utilizes the current genie spawn command, aligning with recent architectural updates that removed the 'agent' namespace. This fix maintains the intended functionality of automatically bringing agents back online when needed.

Highlights

  • Command Update: The auto-spawn hook was updated to use the top-level genie spawn command instead of the deprecated genie agent spawn command, which no longer exists after the v2 redesign.
  • Comment Refinement: Related comments across multiple files were updated to reflect the change from genie agent spawn to genie spawn.
  • Origin of Fix: This issue was identified during a Codex review of PR feat: Genie CLI v2 — Complete Framework Redesign #536.
Changelog
  • src/hooks/handlers/auto-spawn.ts
    • Removed the 'agent' argument from the spawn command array.
    • Updated comments to reflect the change from genie agent spawn to genie spawn.
  • src/hooks/handlers/identity-inject.ts
    • Updated a comment to reflect the change from genie agent spawn to genie spawn.
  • src/hooks/inject.ts
    • Updated comments to reflect the change from genie agent spawn to genie spawn.
Activity
  • No human activity has been recorded on this pull request yet.
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

This pull request correctly updates the auto-spawn hook to use the top-level genie spawn command, replacing the now-defunct genie agent spawn. The changes are straightforward and properly address the issue. I've made one suggestion to improve a comment's clarity regarding synchronous process spawning to prevent future confusion.

}

// Respawn via genie agent spawn (non-blocking fork)
// Respawn via genie spawn (non-blocking fork)

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.

medium

The comment mentions a "non-blocking fork", but spawnSync is used on line 93, which is a synchronous and blocking operation. This is correctly explained in the comment on lines 90-92. To avoid confusion, I suggest updating this comment to reflect that the operation is synchronous.

Suggested change
// Respawn via genie spawn (non-blocking fork)
// Respawn via genie spawn (synchronous fork)

@namastex888
namastex888 merged commit f182a10 into dev Mar 14, 2026
5 checks passed

@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: b51306e2b3

ℹ️ 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".

// Respawn via genie spawn (non-blocking fork)
const { spawnSync } = require('node:child_process') as typeof import('node:child_process');
const args = ['agent', 'spawn', '--provider', template.provider, '--team', template.team];
const args = ['spawn', '--provider', template.provider, '--team', template.team];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Pass required agent name to genie spawn argv

After switching to top-level genie spawn, this argv no longer matches the CLI contract: genie spawn --help shows usage genie spawn [options] <name>, but the constructed args omit <name> and later still append legacy flags like --role/--resume that top-level spawn does not accept. In practice, auto-spawn now exits with parse errors instead of bringing the recipient online whenever this path runs.

Useful? React with 👍 / 👎.

@namastex888
namastex888 deleted the fix/auto-spawn-hook 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