Skip to content

babysitter-pi does not implement Pi lifecycle hook orchestration #948

Description

@frontendwizard

Summary

@a5c-ai/babysitter-pi@0.1.3 appears to be a thin command-forwarding package only. It registers slash-command aliases, but does not implement Pi lifecycle hook/event integration for automatic orchestration.

Evidence

  • @a5c-ai/babysitter-pi/extensions/index.ts only calls pi.registerCommand(...) and forwards to /skill:<name>.
  • No pi.on("agent_end"), pi.on("session_start"), pi.on("turn_end"), or equivalent loop-driving hook exists in the package.
  • babysitter harness:discover --json reports Pi capabilities as:
    • programmatic
    • session-binding
    • headless-prompt
  • It does not report stop-hook for Pi, while Claude/Codex/Cursor do.
  • The Pi package README says the extension is intentionally thin and “does not implement a custom loop driver”.
  • The doctor skill checks Claude-style hook files (hooks/babysitter-stop-hook.sh, hooks.json), which do not exist in the Pi package. That makes doctor report hook failures even though Pi runs can complete via in-turn npx orchestration.

Expected

For Pi, babysitter should support local hook/event orchestration through Pi extension lifecycle events, likely:

  • session_start for session binding/resume metadata
  • agent_end or turn_end for continuing pending runs after assistant turns
  • possibly tool_call / tool_result for task/effect integration or safety gates

harness:discover should advertise the appropriate Pi hook capability once implemented.

Actual

Pi runs work only when the skill manually drives the orchestration loop in-turn. There is no installed local Pi hook integration to continue runs automatically.

Suggested fix

Implement a real babysitter-pi extension hook layer that:

  1. Binds Pi session identity to babysitter runs.
  2. Detects active runs for the current session/project.
  3. On agent_end/turn_end, calls the SDK loop/stop-hook equivalent.
  4. Avoids infinite loops/runaway iteration.
  5. Updates doctor to check Pi extension event hooks instead of Claude hook files when harness is Pi.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingeffort:mediumMedium implementation efforthooks-muxHarness hooks and session binding integrationplugin-pipluginsPlugin system componentpriority:mediumMedium priority issue with meaningful workflow impactready-for-devTriaged and ready for developmentrisk:mediumMedium implementation risk; requires focused validationsdkSDK package and CLI runtime

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions