Skip to content

fix(coding-agent): report custom queues and require extension code restarts - #9

Merged
fitchmultz merged 2 commits into
mainfrom
fix/native-extension-reload
Sep 6, 2026
Merged

fix(coding-agent): report custom queues and require extension code restarts#9
fitchmultz merged 2 commits into
mainfrom
fix/native-extension-reload

Conversation

@fitchmultz

Copy link
Copy Markdown
Owner

Summary

  • Fix ctx.hasPendingMessages() missing custom steering/follow-up messages because it checked the UI's user-text count. Extension contexts and interactive shortcuts now use Agent.hasQueuedMessages(). The UI count stays user-text-only; nextTurn and context-only asides remain excluded from the pending-work predicate.
  • Reinitialize cached extension factories on fresh runtimes during /reload instead of clearing the factory cache. Settings and non-code resources still reload; discovery, extension path/enable-disable changes, and shutdown/start lifecycle handling remain intact.
  • Require a full Pi process restart after changing extension code or dependencies. Clearing Pi's factory cache did not reliably refresh native module code. TUI/RPC reload notices, help, SDK docs, and the example now state the restart requirement; /new and session switching are not substitutes. No Jiti fork, dependency changes, or lockfile changes.

Validation

All results are for acf4c2d98ec44de2108f16a47bf59de5193341a7:

  • macOS arm64, Node 24.20.0: npm run check and ./test.sh passed. Credential-dependent provider tests were intentionally skipped.
  • Linux arm64, Node 24.19.0 and 22.19.0: isolated offline builds, checks, 148 targeted tests across 10 files, source/bundled CLI version/help, and real RPC reload/restart probes passed.
  • Regressions cover custom queues retained after abort, clearQueue, excluded asides, cached factory reruns, JS/TS entrypoint/schema changes requiring restart, refreshed prompts, and TUI/RPC notices.
  • Source, unbundled SDK, and bundled SDK probes retained old code/schema through reload and loaded updates after a fresh process. The bundled macOS TUI displayed the restart warning.

Full Linux suites, Linux x86-64/interactive TUI, real provider calls, Bun standalone binaries, and actual Node SEA binaries were not tested. The Node SEA loader configuration regression passed.

Compatibility

The package version remains 0.85.1; that version alone does not identify this behavior. The native revision boundary is acf4c2d98ec44de2108f16a47bf59de5193341a7. Companion pi-subagents changes will depend on this commit. After installing this revision, fully restart running Pi processes to acquire the native queue fix and updated extension code.

@fitchmultz
fitchmultz merged commit 8f971f8 into main Sep 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants