You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(agenthook): report Pi sessions so hosts can resume them - #161
A Pi conversation now comes back after a restart. Tools that install agenthook hooks, such as Forge, get Pi's session ID and reopen it with pi --session <id>. Pi has no command-hook config, so install writes one extension module, extensions/agenthook.js, that runs every application's commands without a shell. It needs Pi 0.80.4 or later.
The module reports only from Pi's terminal UI, and only after Pi saves the session file, so each reported ID resumes from the project it started in. SessionEnd fires only when another session replaces the current one, so quitting leaves the session resumable. A root index.ts, index.js or package.json extension list stops Pi loading the module.
agenthook/script.go:34: Install writes agenthook.js and reports success when the Pi extensions directory has a root index.ts, index.js, or package.json pi.extensions configuration that prevents discovery of agenthook.js. This documented limitation leaves installed hooks silently inactive because installation does not check for these blockers.
Fix: Detect directory entry points and manifest configuration that prevent discovery before installing, and return an actionable error. Add behavioral tests confirming blocked installations leave files unchanged.
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
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.
A Pi conversation now comes back after a restart. Tools that install agenthook hooks, such as Forge, get Pi's session ID and reopen it with
pi --session <id>. Pi has no command-hook config, so install writes one extension module,extensions/agenthook.js, that runs every application's commands without a shell. It needs Pi 0.80.4 or later.The module reports only from Pi's terminal UI, and only after Pi saves the session file, so each reported ID resumes from the project it started in. SessionEnd fires only when another session replaces the current one, so quitting leaves the session resumable. A root
index.ts,index.jsorpackage.jsonextension list stops Pi loading the module.Refs kenn-io/forge#1282, slice 11 (Resume Pi agents)