Repository navigation
perf(subagents): stop retained child Git polling - #216
Merged
Merged
Conversation
agnitum2009
pushed a commit
to agnitum2009/openpi
that referenced
this pull request
Aug 28, 2026
Co-authored-by: tt-a1i <[email protected]>
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.
Problem
Retained Direct and Workflow child sessions load OpenPI's interactive
git-infoextension even though headless children cannot use its dashboard or slash commands. Each loaded instance refreshes every five seconds and starts four Git subprocesses (one repository probe plus branch, head, and status reads), so idle work scales the polling load with the retained child count.Closes #182.
Value
Headless children no longer create recurring Git work while they are retained. The structural subprocess count per refresh interval changes from 4/32/256 for 1/8/64 retained children to 0/0/0, without removing child model tools, skills, or ordinary OpenPI extensions. Parent sessions keep the interactive Git dashboard unchanged.
Approach
extensions/git-info/index.tsbefore extension import for npm, Git, and local OpenPI package sources.createChildResources, the shared Pi-native resource seam used by both Direct and Workflow children.Validation
git-infopoller.node --test --experimental-strip-types tests/extensions/shared/child-session.test.ts tests/extensions/git-info/index.test.ts tests/extensions/subagents/pi-backend.test.ts— 20 passed.bun run check— passed; the 12 reported Effect diagnostics are pre-existing and tracked by file-search: 修复 Effect failure channel 与多次 provide 诊断 #170.bun run test— 917 Node tests and 30 Vitest tests passed.+includes, covering direct extension sources, preventing nested-package false positives, and adding non-vacuous parent/pre-load controls.Impact
git-infoprovides commands and UI handlers, not child model tools.git-infoextension; all other child resources retain existing behavior./lg,/pr, and Git dashboard handlers are absent, but these interactive surfaces are not usable in print-mode headless children. Exact package identity and canonical-path checks preserve unrelated extensions, including same-relative-path nested packages.