[FEATURE] Support external event triggers (e.g., GitHub PR comments) to resume sessions
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Use case: After Claude Code creates a PR, I'd like it to automatically pick up reviewer comments and address them — ideally resuming the original session that has full context.
Current workaround: Manually copy-paste PR comments into the CLI, or tell my claude session to lookup the PR comments or use GitHub Actions (which loses conversation context).
Proposed Solution
Proposed idea: Allow registering a "watch" on external events (e.g., GitHub PR review comments via webhooks) that can resume a Claude Code session with the original context preserved. This could work via:
- A --watch-pr <url> flag that polls/subscribes to PR events
- Integration with the existing hooks system to support external triggers
- Session persistence that allows resuming with full prior context
This would enable a powerful end-to-end workflow: implement → PR → review → address feedback, all within one continuous context within the session
Alternative Solutions
_No response_
Priority
Medium - Would be very helpful
Feature Category
CLI commands and flags
Use Case Example
- I tell Claude Code: "work on CHNL-22051" — it reads the Jira ticket, explores the codebase, understands the viewset structure and logging patterns, and implements the change.
- Claude Code commits, pushes, and opens a draft PR (e.g., app#110349).
- I tell Claude Code: "watch this PR for comments."
- Hours later, a reviewer comments: "Can you also log the request method (GET/POST)?" and "Use always_log_mobile_logger instead of mobile_logger so these aren't sampled."
- Claude Code detects the new comments, resumes the session — it already knows the file, the StructuredLogger API, the _log_create_request helper method, and why the try/except is there.
- It makes the changes, commits, pushes, and replies on the PR: "Added request method to the log payload and switched to always_log_mobile_logger."
- I get a notification that it was handled, review the diff, and approve.
Today, step 4-6 requires me to manually copy each comment into a new (or existing) Claude Code session, re-establish context, and babysit the changes. The value is removing that manual loop while preserving the session context that makes the responses fast and
accurate.
Additional Context
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗