-
Notifications
You must be signed in to change notification settings - Fork 106
Agent integration: Pi coding agent #232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| return &agent.SessionMetadata{ | ||
| SessionID: sessionID, | ||
| }, nil | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PiAgent methods don't match the Agent interface
High Severity
PiAgent's method signatures don't match the Agent interface defined in agent.go. Name() returns string instead of AgentName; Detect(ctx, repoRoot) should be DetectPresence() (bool, error); ReadSession takes (ctx, sessionID) and returns *agent.SessionMetadata (which doesn't exist) instead of taking *HookInput and returning *AgentSession; InstallHooks/UninstallHooks have wrong signatures. Many required interface methods (Type(), Description(), GetHookConfigPath(), SupportsHooks(), etc.) are entirely missing. The agent also lacks the init() registration call that other agents use to register with the agent system.
| // Pi usually has a ~/.pi directory or project local .pi | ||
| // Simplified detection for skeleton | ||
| return true, nil | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Detect unconditionally returns true for all repos
Medium Severity
The Detect method (intended as DetectPresence) always returns true, nil regardless of whether the Pi agent is actually installed. The comment mentions checking for ~/.pi or .pi directories, but no such check is performed. In the Detect() function in registry.go, all registered agents are iterated and the first one whose DetectPresence returns true is selected — so an always-true implementation would cause Pi to be incorrectly auto-detected as the active agent in every repository.
|
A feature-complete version is available here: #233 The implementation in #233 includes:
Happy to collaborate if you'd like to merge efforts! |
|
@hjanuschka Thanks for the reach out! Your implementation in #233 is clearly more comprehensive. I'm closing this skeleton PR in favor of yours. Happy to help test or review #233 to get it landed! |


Implementing native Pi coding agent integration. This PR adds the initial skeleton for the Pi agent provider. Closes #221.
Note
Medium Risk
Adds a new agent implementation that appears incomplete/stubbed (e.g., always-positive detection and no-op hooks), which could affect auto-detection or fail compilation if wired into the registry.
Overview
Introduces a new
cmd/entire/cli/agent/pi/pi.gowith an initialPiAgenttype and constructor to begin Pi agent integration.The implementation is currently a skeleton:
Detectunconditionally returns true, hook install/uninstall are no-ops, andReadSessionreturns minimalSessionMetadatabased only on the provided session ID.Written by Cursor Bugbot for commit 3fdfbfa. This will update automatically on new commits. Configure here.