Open
Conversation
Add a pluggable agent registry and implement the Codex CLI detector alongside the existing Claude Code detector. The hooks now resolve the detector from config rather than hardcoding Claude Code. - internal/agent/registry.go: agent name → detector factory registry - internal/agent/codex/: Codex CLI detector (process detection, session dir) - internal/agent/claude/register.go: register claude-code detector - Update pre-commit and post-commit hooks to use registry with fallback - Fix flaky precommit_test timing (5ms → 50ms sleep) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add structured debug and warn logging in the post-commit hook to help users diagnose why commits may not receive Partio-Checkpoint trailers. - Warn-level logging at each early return explaining why no trailer was added (agent inactive, commit already processed, session condensed) - Debug-level logging of commit file paths and session info for diagnosing path mismatch issues (visible with PARTIO_LOG_LEVEL=debug) - Add git.DiffNameOnly helper to extract changed file paths from commits Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
## Objective Update all workflows to use minions v0.0.5. ## Why v0.0.5 fixes the root cause of all "no changes" failures — Claude was unable to write files because bypassPermissions mode was not set. ## How Updated go install version tag in all workflow files. Partio-Checkpoint: 0ecbe84f5950 Partio-Attribution: 100% agent
Upgrade early-exit log messages in the post-commit hook from Debug to Warn level so users running PARTIO_LOG_LEVEL=debug (or default) can immediately see why no Partio-Checkpoint trailer was added to a commit. Each exit path now emits a structured "post-commit: no checkpoint created" warning with the specific reason (no pre-commit state, no active agent, commit already processed, session already condensed) and relevant context (commit hash, session ID, state file path). Also adds a Debug-level log after session lookup showing the resolved session path, helping diagnose path mismatch issues. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Allow overriding the agent name via PARTIO_AGENT env var, completing the documented environment variable support in CLAUDE.md. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
added 8 commits
April 8, 2026 08:29
Partio-Checkpoint: 35c4fbedc789 Partio-Attribution: 100% agent
## Objective Detect any running AI agent automatically instead of requiring PARTIO_AGENT env var to be set to the correct agent name. ## Why Users running Codex, Claude Code, or any other agent shouldn't have to configure PARTIO_AGENT. The hooks should detect whichever agent is active and capture its session. ## How - Added DetectActive() to agent registry that checks IsRunning() on all registered detectors - Pre-commit hook now auto-detects if no explicit agent is configured, or if the configured agent isn't running - Pre-commit state now includes AgentName so post-commit uses the detected agent (not the configured default) - Post-commit reads agent name from state, falls back to config - Fixed codex FindSessionDir test to use temp HOME dir Partio-Checkpoint: 205608af50b1 Partio-Attribution: 100% agent
## Objective Capture Codex CLI session data in checkpoints and auto-detect any running agent without requiring PARTIO_AGENT config. ## Why The Codex integration only detected the process but captured no session data. The hooks had Claude-specific type assertions that skipped all other agents. Users shouldn't have to set an env var to tell Partio which agent they're using. ## How - Added SessionParser interface to agent package — any detector that can provide session data implements FindLatestSession - Implemented Codex JSONL parser (parse_jsonl.go) that extracts session ID, prompt, transcript, token counts from Codex format - Implemented FindLatestSession for Codex that matches sessions to repos by comparing cwd from session_meta - Replaced all detector.(*claude.Detector) type assertions in hooks with detector.(agent.SessionParser) interface checks - Added DetectActive() to registry that checks all registered detectors — hooks auto-detect first, fall back to config - Pre-commit state now carries AgentName for post-commit - Default agent config changed from "claude-code" to "" (auto) - Fixed codex test to use temp HOME dir Partio-Checkpoint: b34e9e44f11a Partio-Attribution: 100% agent
## Objective Stop tracking .partio/sessions/ and .partio/state/ in git. ## Why These files update on every commit (session tracking, processed commits list) and create noise in git status. ## How Added .partio/sessions/ and .partio/state/ to .gitignore and removed them from tracking. Partio-Checkpoint: c01093c0919c Partio-Attribution: 100% agent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
codex) as a supported AI agent alongside Claude Codeinternal/agent/codex/package with process detection, session directory lookup, andDetectorimplementationagent.Register/agent.NewDetector) so hooks select the detector based on theagentconfig settingPARTIO_AGENTenvironment variable support for overriding the agent nameWhy
Codex CLI is a widely used AI coding agent. Without this change, Codex-assisted commits are attributed as 100% human work and no session context is preserved. The
agent.Detectorinterface was already designed to be pluggable — this PR delivers on that design.Test plan
go test ./...passesgolangci-lint runpassesName,IsRunning,FindSessionDir)NewDetectorwith registered and unknown agents)PARTIO_AGENT=codexand verifypartio statusreports codex🤖 Generated with Claude Code