Skip to content

Use "Unknown" as fallback agent type for unidentified sessions #169

@jcleira

Description

@jcleira

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" when IsRunning() returns false
  • internal/hooks/postcommit.go — reads pre-commit state and creates checkpoints
  • internal/session/state.go — the state struct carrying agent info between hooks

Program

See: .minions/programs/unknown-agent-fallback.md

Inspired by: entireio/cli#838

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions