Skip to content

fix(orchestrate): spawn a fresh worker for built state - #64

Merged
caelaxie merged 2 commits into
mainfrom
cursor/orchestrate-fresh-worker-brief-45de
Nov 9, 2026
Merged

caelaxie merged 2 commits into
mainfrom
cursor/orchestrate-fresh-worker-brief-45de

Conversation

@caelaxie

@caelaxie caelaxie commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #60

New work that needs a worker's built state spawns a fresh worker and puts that state in its kickoff. The upstream examples and the follow-up sentence stay as written.

Verification

Harness on 8d1691c77708bf2fcf936ec897c6b00ab59b7446 with agy 1.5.3. Proof comment follows.

Open in Web Open in Cursor 

New work that needs a checkout, uncommitted diff, or process goes to a
fresh worker with that state in the brief. send_message stays a
follow-up on the same work.

Co-authored-by: Kaitian Xie <caelaxie@users.noreply.github.com>

@caelaxie caelaxie left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

verdict: changes requested (comment review, since github won't let the author account request changes on its own pr).

  1. minimum changes: the fix rewrites more of the line than agy needs. only upstream's "Fork" has no agy equivalent; "such as its checkout, uncommitted changes, or a running process" and "Message a worker only for a follow-up on the same work." are harness-neutral and should stay verbatim. the reword also leaves "that checkout" with no antecedent and orphans "one" in the next sentence. that wording came from #60's suggested fix, my bad; the inline suggestion is tighter.
  2. proof: body says a proof comment follows, but there's none yet, and Validate plugin is still running on d00fc9a. need agy plugin install + list on this head (or the next one) plus green ci.

linkage (Closes #60), layout, and draft state are fine.

- **A fresh worker for each independent task.** Its kickoff carries everything it needs, including each upstream report it depends on, pasted in full. Workers can't see their siblings. Run workers in an isolated workspace (`Workspace: "branch"`) unless the work needs this machine's own checkout or state (`Workspace: "share"`): a `control-ui` or `control-cli` runtime check, local transcripts under `<appDataDir>/brain/`, a simulator, or auth that exists only here. Pick each subagent's model tier for the job, per the Subagents section.
- **A sub-coordinator only when one area has many parallel workers.** It owns that area's workers and kickoffs and sends you one rollup, never raw worker reports. Stop at three levels: you, sub-coordinators, and workers. Keep about ten workers in flight per coordinator, and start the next one as each finishes instead of waiting on a whole batch.
- **Resume a worker with `send_message` when new work needs that worker's built state,** such as its checkout, uncommitted changes, or a running process. Message a worker only for a follow-up on the same work. Never message one to check on it, because a message restarts an idle agent.
- **When new work needs that checkout, uncommitted diff, or process, spawn a fresh worker with that state in the brief.** Keep `send_message` only for a follow-up on the same work. Never message one to check on it, because a message restarts an idle agent.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

keep upstream's wording and swap only the fork verb:

Suggested change
- **When new work needs that checkout, uncommitted diff, or process, spawn a fresh worker with that state in the brief.** Keep `send_message` only for a follow-up on the same work. Never message one to check on it, because a message restarts an idle agent.
- **Spawn a fresh worker when new work needs a worker's built state,** such as its checkout, uncommitted changes, or a running process, and put that state in its kickoff. Message a worker only for a follow-up on the same work. Never message one to check on it, because a message restarts an idle agent.

upstream (cursor/plugins c742dd6): "Fork when new work needs a worker's built state, such as its checkout, uncommitted changes, or a running process. Message a worker only for a follow-up on the same work. Never message one to check on it, because a message restarts an idle agent."

Keep the upstream examples and the follow-up sentence. A fresh worker
gets the built state in its kickoff.

Co-authored-by: Kaitian Xie <caelaxie@users.noreply.github.com>
@cursor

cursor Bot commented Nov 9, 2026

Copy link
Copy Markdown

Harness proof for head 8d1691c77708bf2fcf936ec897c6b00ab59b7446.

agy 1.5.3 from the linux_amd64 manifest. Tarball sha512 e363e1b17daaac2589f18e6973429c039fd5a5e5c15e9c0852fa349836f3992b10fe84732bc8d8c8208e149f0304f15aba9dec696d12efeed03917492c0580eb verified before install. Commands ran in an isolated HOME.

$ agy plugin validate --strict .
✔ Validation passed
  skills 61 · agents 2 · rules 0 · hooks 0 · mcpServers 0 · sidecars 0
exit:0

$ agy plugin install https://github.com/pstack-ports/agy-pstack/tree/cursor/orchestrate-fresh-worker-brief-45de
  [ok]    pstack
          ✔ skills      : 61 installed
          ✔ agents      : 2 installed (comment-sicko, poteto-agent)
exit:0

$ agy plugin list
Installed plugins:
- pstack (enabled, 0.15.36)
    Source:     antigravity
    Components: 61 skills, 2 agents
exit:0

$ git -C "$HOME/.gemini/config/plugins/pstack" rev-parse HEAD
8d1691c77708bf2fcf936ec897c6b00ab59b7446
exit:0

$ cmp skills/poteto-mode/playbooks/orchestrate.md "$HOME/.gemini/config/plugins/pstack/skills/poteto-mode/playbooks/orchestrate.md"
exit:0

CI structural check: Validated 61 skills, 2 agents, and 23 playbooks.
bun run typecheck and bun run test in skills/poteto-mode/scripts: 62 pass, 0 fail.
bun install and bun run test in skills/statechart/scripts: 267 pass, 0 fail, 67 skipped.

Validate plugin is green on this head: https://github.com/pstack-ports/agy-pstack/actions/runs/42554020266/job/128955614833

@caelaxie caelaxie left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

pass (comment review, same account as author).

8d1691c applies the suggestion verbatim: upstream's line with only the fork verb swapped for a fresh worker plus the state in its kickoff, follow-up and never-message sentences unchanged, per #60. agy 1.5.3 validate --strict + install + list on the exact head, installed rev-parse = head, cmp clean (issuecomment-6731226030). Validate plugin green, Closes #60, not draft. merging.

@caelaxie
caelaxie merged commit e97a368 into main Nov 9, 2026
1 check passed
@caelaxie
caelaxie deleted the cursor/orchestrate-fresh-worker-brief-45de branch November 9, 2026 03:30
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.

orchestrate turns "fork" into send_message, contradicting the next sentence

2 participants