Skip to content

fix: improve agent detection heuristics#1

Open
monperrus wants to merge 1 commit intolabri-progress:mainfrom
monperrus:fix-heuristics
Open

fix: improve agent detection heuristics#1
monperrus wants to merge 1 commit intolabri-progress:mainfrom
monperrus:fix-heuristics

Conversation

@monperrus
Copy link

working with @tdegueul at Bellairs.

Found and fixed this bug.

# BEFORE
$ python script/detect-agents.py data/steipete-2025-12.json
Commits: 2908  |  with file cache: 1802  |  agents loaded: 44

Agent Detection — steipete-2025-12
=======================================================
  Commits with ≥1 agent signal : 65 / 2908  (2%)
  Commits with >1 agent signal : 6

Agents detected  (n=2908 commits)
─────────────────────────────────
  codex                     █████████████████████████████████████ 2%         54
  amp                       ███████ 0%                                       13
  claude_code               ██ 0%                                             3
  gemini                    █ 0%                                              1

# AFTER
$ python script/detect-agents.py data/steipete-2025-12.json
Commits: 2908  |  cached: 2808  |  full message: 0  |  agents: 44
  tip: run analyze-commit-quality.py first to fetch full messages

Agent Detection — steipete-2025-12
=======================================================
  Commits with ≥1 agent signal : 102 / 2908  (4%)
  Commits with >1 agent signal : 6

Agents detected  (n=2908 commits)
─────────────────────────────────
  codex                     █████████████████████████████████████ 3%         78
  amp                       ██████████ 1%                                    26
  claude_code               ██ 0%                                             3
  gemini                    █ 0%                                              1

really unclear why it's really hard to identify the agents used in @steipete commits. He probably prompts to remove the default commits/branches idiosyncrasies.

…monperrus at work)

When deserializing a Heuristic from JSON, if `period_start` is missing or invalid, default it to `datetime.min`. This ensures that heuristics with incomplete or malformed start dates are treated as active from the earliest possible point.
@rrobbes
Copy link
Contributor

rrobbes commented Mar 3, 2026

Thanks! I think he might be using the pi agent, which does not have obvious commit level markers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants