Skip to content

audit: review all Pi engine stub replacements for ChannelBridge compatibility #2089

@alexey-pelykh

Description

@alexey-pelykh

Summary

When the Pi embedded engine was removed in b27cecc795 (#76/#77), all call sites for Pi-specific functions were replaced with literal stubs:

  • isEmbeddedPiRunActive(sessionId)false
  • getActiveEmbeddedRunCount()0
  • queueEmbeddedPiMessage(...) → removed
  • waitForEmbeddedPiRunEnd(...) → removed
  • abortEmbeddedPiRun(...) → removed

These replacements were correct for the immediate goal of removing the Pi engine. However, some of these functions had behavioral significance — they answered questions like "is an agent currently running in this session?" that the ChannelBridge architecture still needs to answer, just through different mechanisms.

Known Regression

The announce queue path in subagent-announce.ts:667 (const isActive = false) makes the queue/steer mechanism dead code. Announces always go through sendSubagentAnnounceDirectly instead of being batched into a running agent turn. See #2088 for details.

Audit Scope

Review all production files changed in b27cecc795 for similar regressions:

File Stub Replacement Needs ChannelBridge Equivalent?
src/agents/subagent-announce.ts isActive = false YES#2088
src/agents/tools/subagents-tool.ts Pi references removed TBD
src/auto-reply/reply/abort.ts Abort logic simplified TBD
src/auto-reply/reply/agent-runner.ts Pi runner removed TBD
src/auto-reply/reply/commands-compact.ts Compaction removed TBD
src/auto-reply/reply/commands-session.ts Session cleanup simplified TBD
src/auto-reply/reply/commands-subagents/action-kill.ts Kill simplified TBD
src/auto-reply/reply/commands-subagents/action-send.ts Send removed TBD
src/auto-reply/reply/get-reply-run.ts Run detection simplified TBD
src/auto-reply/reply/queue/cleanup.ts Cleanup simplified TBD
src/gateway/server-methods/sessions.ts Session ops simplified TBD
src/gateway/server-reload-handlers.ts Reload simplified TBD
extensions/llm-task/src/llm-task-tool.ts Task tool simplified TBD

For each: determine whether the removed behavior had semantic significance that the ChannelBridge architecture needs to replicate.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions