-
Notifications
You must be signed in to change notification settings - Fork 0
Use "Unknown" as fallback agent type for unidentified sessions #169
Description
When Partio's pre-commit hook runs and Detector.IsRunning() returns false (no agent process found), the current flow still stores the configured agent name (e.g., claude-code) in the session state. Post-commit then creates a checkpoint attributing the work to that agent even though detection failed.
This is misleading: if the agent wasn't detected, the attribution is a guess. The agent field should be "Unknown" when detection fails rather than the configured default.
Change
When IsRunning() returns false, record the agent as "Unknown" in the pre-commit state file (.partio/state/pre-commit.json). The configured agent name should be used only as a detector selector, not as an attribution fallback.
Key files
internal/hooks/precommit.go— change agent field to"Unknown"whenIsRunning()returns falseinternal/hooks/postcommit.go— reads pre-commit state and creates checkpointsinternal/session/state.go— the state struct carrying agent info between hooks
Program
See: .minions/programs/unknown-agent-fallback.md
Inspired by: entireio/cli#838