Repository navigation
fix: wake pi crewmates after each turn - #12
Merged
Merged
Conversation
vipentti
pushed a commit
to vipentti/firstmate
that referenced
this pull request
Aug 5, 2026
* fix(spawn): fire pi turn-end on turn_end, not agent_end * no-mistakes(document): Document pi turn-end event
3 of 4 tasks
This was referenced Aug 7, 2026
Closed
Closed
This was referenced Aug 10, 2026
This was referenced Oct 2, 2026
Closed
Closed
Closed
Closed
Contributor
|
Superseded by https://github.com/jazz127/relationship-intelligence/pull/16, which carries the same work merged with dev and has landed. |
This was referenced Oct 7, 2026
jroethel
referenced
this pull request
in jroethel/firstmate
Oct 9, 2026
… stng-lcars (#12) Co-authored-by: Jeremy Roethel <jjrdar@rit.edu>
Live validation after the rebase onto mainHead tested: The pipeline's sandbox has no Windows interop, so I ran the Studio fixtures from my own session. I followed the shared-slot rule: took the
The console showed no errors in either session. Local checks on the same tree:
Not covered by any fixture:
|
This was referenced Oct 22, 2026
fritznoff
pushed a commit
to fritznoff/starship
that referenced
this pull request
Nov 2, 2026
…rotation (kunchenguid#12) * feat(primary): add optional quota-aware orchestrator handoff Automate primary rotation when provider quota crosses a threshold, with an atomic session-lock transfer that never allows two live holders, and keep the feature inert unless config/primary-handoff is enabled. Co-authored-by: Cursor <cursoragent@cursor.com> * no-mistakes(review): fix float threshold, release-stale race, docs, cleanup helper * no-mistakes(test): fix jq-1.6 cmux liveness probe and test fixtures * docs: list primary-handoff state files in AGENTS.md state inventory Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * no-mistakes: apply CI fixes * no-mistakes(ci): make fm-status-bar.test.sh executable CI runs test scripts directly; the file was committed with mode 100644, so the Behavior tests job failed with exit 126 (Permission denied). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
fritznoff
pushed a commit
to fritznoff/starship
that referenced
this pull request
Nov 2, 2026
…h public Starship (kunchenguid#12) * feat(bin): refuse new names and customer data shapes before they reach public Starship * no-mistakes(review): Check commit messages, branch words, Dutch phones; drop fallbacks * no-mistakes(review): Skip unborn caller checkouts; share one deadline across hook calls * no-mistakes(document): Align leak guard header and hook doc with new checks
ghazni101
pushed a commit
to ghazni101/firstmate-dsh
that referenced
this pull request
Nov 19, 2026
…dular spawn' (kunchenguid#12) from fm/spawn-task-copy-acquisition into main
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Intent
Fix firstmate's pi crewmate turn-end hook. fm-spawn's generated pi extension listened on pi's 'agent_end' event, which (per pi 0.79.1 type docs) fires only once when the whole agent run exits - so the turn-end backstop never fired at per-turn boundaries for pi crewmates, leaving firstmate reliant on crewmate status appends alone and blind to an idle crewmate that stopped without writing status. Change the hook to 'turn_end', which fires after each turn the agent finishes, matching how the claude/codex/opencode adapters behave. One-line change to the pi-ext template in bin/fm-spawn.sh plus an explanatory comment; no other behavior change.
What Changed
bin/fm-spawn.shto listen forturn_endinstead ofagent_end, so firstmate receives a turn-ended signal after each completed pi turn rather than only when the whole agent run exits.turn_endfor per-turn idle detection.AGENTS.mdso future harness changes preserve the same watcher behavior.Risk Assessment
✅ Low: The branch is a narrow one-line event-name correction plus explanatory generated-code comments, with no broader control-flow or API surface changes.
Testing
Baseline bootstrap could not run due missing local firstmate config state, but the focused end-to-end spawn path was exercised:
fm-spawn.shgenerated and launched a pi extension usingturn_end; live pi execution stopped at the trust prompt, which I did not accept because it would change user-level trust outside the worktree boundary, so I supplemented it with a mocked extension event simulation proving the generated hook would touch the turn-ended sentinel. All focused checks passed and temporary worktree test scaffolding was removed.Evidence: Generated pi extension evidence
The emitted extension registerspi.on("turn_end", ...)and touchesstate/pi-hook-e2e.turn-ended; it contains nopi.on("agent_end", ...)registration.Evidence: Pi spawn pane transcript
Shows the real spawn command launchingpi -e /Users/kunchen/.no-mistakes/worktrees/016d88035d58/01KV18PMDX505TN87957JNNXTT/state/pi-hook-e2e.pi-ext.ts ...before pi displayed its project trust prompt.Evidence: Generated extension event simulation
registered_event=turn_end execFile_command=touch execFile_arg=/Users/kunchen/.no-mistakes/worktrees/016d88035d58/01KV18PMDX505TN87957JNNXTT/state/pi-hook-e2e.turn-endedPipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
bin/fm-bootstrap.sh- attempted baseline bootstrap; it failed because this isolated worktree lacksconfig/crew-harnessparent state, so validation continued without creating persistent config.Created temporarydata/pi-hook-e2e/brief.mdandstate/, then ranbin/fm-spawn.sh pi-hook-e2e . pi --scoutto exercise the real pi spawn path.Capturedstate/pi-hook-e2e.pi-ext.tsand the tmux pane transcript into/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KV18PMDX505TN87957JNNXTT.node -e '...'asserted the generated pi extension containspi.on("turn_end"...)and does not registerpi.on("agent_end"...).node -e '...'asserted the captured spawn transcript launchedpi -e .../state/pi-hook-e2e.pi-ext.ts.node <<'NODE' ... NODEloaded the generated extension text with a mocked pi event emitter and verified triggering the registered callback callstouchonstate/pi-hook-e2e.turn-ended.bin/fm-teardown.sh pi-hook-e2etore down the spawned scout task;git status --shortconfirmed no temporary worktree scaffolding remained.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.