Repository navigation
fix: adapt before_agent_start prompt extraction and child process detection for modern Pi - #42
Merged
Merged
Conversation
…ctory with 2 updates Bumps the development-minor-patch group with 2 updates in the / directory: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [typebox](https://github.com/sinclairzx81/typebox). Updates `@types/node` from 22.20.2 to 22.20.5 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `typebox` from 1.3.31 to 1.3.34 - [Commits](sinclairzx81/typebox@1.3.31...1.3.34) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 22.20.5 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-minor-patch - dependency-name: typebox dependency-version: 1.3.34 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-minor-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps the actions-minor-patch group with 3 updates: [actions/setup-node](https://github.com/actions/setup-node), [actions/upload-artifact](https://github.com/actions/upload-artifact) and [actions/download-artifact](https://github.com/actions/download-artifact). Updates `actions/setup-node` from 7.0.0 to 7.1.0 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](actions/setup-node@8207627...949feb2) Updates `actions/upload-artifact` from 7.0.1 to 7.0.2 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@043fb46...cf430e0) Updates `actions/download-artifact` from 8.0.1 to 8.0.2 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@3e5f45b...9000827) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: 7.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions-minor-patch - dependency-name: actions/upload-artifact dependency-version: 7.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions-minor-patch - dependency-name: actions/download-artifact dependency-version: 8.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions-minor-patch ... Signed-off-by: dependabot[bot] <support@github.com>
…ection for modern Pi
…ne lastRecall timing
This was referenced Oct 23, 2026
Closed
btnalit
pushed a commit
that referenced
this pull request
Oct 23, 2026
🤖 I have created a release *beep* *boop* --- ## [0.4.3](v0.4.2...v0.4.3) (2026-10-23) ### Bug Fixes * adapt before_agent_start prompt extraction and child process detection for modern Pi ([#42](#42)) ([4d78bcd](4d78bcd)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Summary
This PR improves compatibility with modern Pi (v1.x) runtimes and resolves upstream CI security audit failures:
Defensive prompt extraction in
before_agent_start:BeforeAgentStartEventis a union where custom messages (e.g. subagents, autonomous turn triggers) omitevent.prompt, or prompt may arrive as an array of content blocks.TypeError.lastRecallstate only after verifying a valid prompt is present, preventing non-prompt turns from marking recall as failed.Expanded child subagent detection:
pi-subagentsstandard environment variables (PI_SUBAGENT_CHILD=1andPI_SUBAGENT_RUNNER_PID) alongside legacyPI_SUBAGENT_AGENT_IDto ensure subagents do not instantiate duplicate memory stores.CI Security Audit Overrides:
package.jsondependency overrides forbrace-expansion(^5.0.12) andundici(^8.10.2) to resolve high-severity audit advisories in dev dependencies (GHSA-q2hr-2g5m-vwhr, GHSA-3wwx-pv8p-q78v) that were failing CI. Both overrides remain on the same major versions used by@earendil-works/pi-coding-agent@0.85.1.Testing:
before_agent_startedge cases.