Skip to content

feat: add Pi agent support#71

Open
boxp wants to merge 1 commit into
mainfrom
support/pi-agent
Open

feat: add Pi agent support#71
boxp wants to merge 1 commit into
mainfrom
support/pi-agent

Conversation

@boxp

@boxp boxp commented Jun 27, 2026

Copy link
Copy Markdown
Owner

What's Changed

  • Add :pi agent type to filter cycle, view badge ([Pi]), and capture detection
  • Add capture-based state detection for Pi (Working... indicator, spinner, prompt)
  • Add process tree detection for pi agent (word-boundary pi pattern)
  • Add handler support for pi agent (hook fallback)
  • Add tests for all new functionality

Changes

Source

  • src/ceeker/tmux/pane.clj - Add pi pattern to agent-pattern
  • src/ceeker/tmux/capture.clj - Add detect-pi-state with spinner/Working... detection
  • src/ceeker/hook/handler.clj - Add normalize-pi-event handler
  • src/ceeker/tui/filter.clj - Add pi to agent filter cycle
  • src/ceeker/tui/view.clj - Add [Pi] badge display

Tests

  • test/ceeker/tmux/capture_test.clj - Pi state detection tests
  • test/ceeker/hook/handler_test.clj - Pi handler test
  • test/ceeker/tui/filter_test.clj - Updated filter cycle expectations
  • test/ceeker/tui/app_test.clj - Updated filter cycle expectations

CI

make ci  # ✅ format-check + lint + test (203 tests, 470 assertions)

- Add :pi agent type to filter cycle, view badge ([Pi]), and capture detection
- Add capture-based state detection for Pi (Working... indicator, spinner, prompt)
- Add process tree detection for pi agent (word-boundary pi pattern)
- Add handler support for pi agent (hook fallback)
- Add tests for all new functionality
@boxp boxp force-pushed the support/pi-agent branch from eb37a13 to d06f916 Compare June 27, 2026 18:30
@boxp

boxp commented Jun 27, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d06f916c13

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/ceeker/tmux/pane.clj
(case agent-type
:claude-code #"(?i)claude"
:codex #"(?i)codex"
:pi #"(?i)\\bpi\\b"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Fix Pi liveness regex word boundaries

For Pi sessions in tmux, this pattern never matches a normal pi command line because Clojure regex literals already pass backslashes through to java.util.regex.Pattern; \b here is interpreted as a literal backslash plus b, not a word boundary. As a result find-agent-in-tree reports live Pi panes as :not-found, so close-stale-sessions! can immediately mark newly recorded Pi sessions closed and closed Pi sessions cannot reactivate. Use real regex word boundaries in the literal.

Useful? React with 👍 / 👎.

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.

1 participant