-
Notifications
You must be signed in to change notification settings - Fork 56
fix(hooks): update auto-spawn to use top-level genie spawn command #538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ | |
| * | ||
| * When an agent sends a message to a recipient that doesn't have a live | ||
| * tmux pane, this handler attempts to respawn them from their saved | ||
| * template (created during the original `genie agent spawn`). | ||
| * template (created during the original `genie spawn`). | ||
| * | ||
| * Resolution order (directory-aware): | ||
| * 1. Check worker registry for live pane → skip if alive | ||
|
|
@@ -78,9 +78,9 @@ export async function autoSpawn(payload: HookPayload): Promise<HandlerResult> { | |
| return; | ||
| } | ||
|
|
||
| // Respawn via genie agent spawn (non-blocking fork) | ||
| // 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]; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
After switching to top-level Useful? React with 👍 / 👎. |
||
| if (template.role) args.push('--role', template.role); | ||
| if (template.skill) args.push('--skill', template.skill); | ||
| if (template.cwd) args.push('--cwd', template.cwd); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment mentions a "non-blocking fork", but
spawnSyncis 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.