feat: add debug extension for programmatic process start - #93
Merged
aliou merged 1 commit intoAug 22, 2026
Merged
Conversation
Add a new 'processes-debug' extension that is NOT listed in package.json. Load it alongside the local core extension via: pi -ne -e ~/pi-processes-debug/ -e ~/pi-processes-debug/extensions/processes-debug/index.ts It registers a single /debug:ps:start command that starts a background process through the core extension's protocol channel (new COMMAND_START), so the process is fully visible to the agent's process tool. This enables starting processes during debugging without prompting the agent. Changes to the core extension: - Add COMMAND_START channel and CommandStartPayload type to the shared protocol - Handle COMMAND_START in registerCommandHandlers (calls manager.start + notifications.register with default empty notify config) - Add requestStart client helper in extensions/processes/client.ts
378-kaiabot
Bot
force-pushed
the
debug/programmatic-process-control
branch
from
August 17, 2026 16:48
5ebc97e to
544f2f7
Compare
aliou
marked this pull request as ready for review
August 18, 2026 18:36
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.
Note
Automated pull request by Pi, model
aperture/hf:zai-org/GLM-5.2. Implemented and validated empirically againstaliou/pi-processeson branchfix/intentional-stop-context-notification. See the local run log for the full investigation.Summary
Starting a background process during debugging required prompting the agent to use the
processtool — there was noway to do it programmatically from a slash command. This adds a
processes-debugextension (not listed inpackage.json) that registers/debug:ps:start <name> <command>, which starts a process through the core extension'snew
COMMAND_STARTprotocol channel. The process is fully visible to the agent'sprocesstool (list, output, stop).Verified empirically: loaded the local extensions via
pi -ne -e ~/pi-processes-debug/ -e ~/pi-processes-debug/extensions/processes-debug/index.ts,ran
/debug:ps:start test ./tests/e2e/scripts/continuous-output.sh, confirmed the process appeared in the status bar(
ps: ● test), then prompted the agent to list processes — it foundtest (proc_1b8d)running.Changes
extensions/shared/protocol/channels.ts— addedCOMMAND_STARTchannel alongside existingCOMMAND_KILL/COMMAND_CLEAR.extensions/shared/protocol/commands.ts— addedCommandStartPayloadandCommandStartResulttypes.extensions/shared/protocol/index.ts— exported the new types.extensions/processes/handlers/commands.ts— handleCOMMAND_START: callsmanager.start()andnotifications.register()with a default empty notify config, same path theprocesstool'sexecuteStarttakes.extensions/processes/client.ts— addedrequestStartclient helper that emits on theCOMMAND_STARTchannel and returns a promise.extensions/processes-debug/index.ts— the debug extension: a single/debug:ps:startcommand that parses<name> <command>and callsrequestStart. Not inpackage.json; loaded explicitly via-e.Verification
tsc --noEmit✅biome check✅ (10 files, no fixes applied)vitest run✅ (576 passed, 59 test files)Stacked on #87 — merge that first.
Run host:
golden-hugo-lefevre· Session:01a00fb1-0d78-790a-8fbf-f6abd049c168· Model:aperture/hf:zai-org/GLM-5.2