feat: support remote Claude Code sessions via BUDDI_HOST env var#7
Open
shadowsaber16 wants to merge 2 commits intotalkvalue:mainfrom
Open
feat: support remote Claude Code sessions via BUDDI_HOST env var#7shadowsaber16 wants to merge 2 commits intotalkvalue:mainfrom
shadowsaber16 wants to merge 2 commits intotalkvalue:mainfrom
Conversation
Adds optional BUDDI_HOST and BUDDI_SOCKET environment variables to buddi-hook.py. When BUDDI_HOST is set (e.g. "localhost:9999"), the hook connects over TCP instead of the Unix socket, enabling Claude Code on a remote VM to forward hook events to Buddi on a local Mac via SSH reverse port-forwarding (typically bridged with socat on the Mac). Behavior is unchanged when neither variable is set. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Author
|
Please feel free to discard the PR and take it up as a feature request to support remote SSH connections for buddi. I realley liked to concept and built this for personal use and felt this could be shared with the community! |
There was a problem hiding this comment.
1 issue found across 1 file
Confidence score: 3/5
- Unhandled exceptions on invalid
BUDDI_HOSTport values inbuddi/Buddi/Resources/buddi-hook.pycould crash the hook and affect user workflows. - Score reflects a concrete, user-impacting failure mode with medium severity, but limited to input validation.
- Pay close attention to
buddi/Buddi/Resources/buddi-hook.py- add port validation or error handling to avoid crashes.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="buddi/Buddi/Resources/buddi-hook.py">
<violation number="1" location="buddi/Buddi/Resources/buddi-hook.py:34">
P2: Invalid `BUDDI_HOST` port values can raise uncaught exceptions and crash the hook.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Non-numeric or out-of-range port values would raise ValueError or OverflowError uncaught by send_event, crashing the hook with a traceback. Convert both to OSError so the existing handler silently drops the event the same way other connection failures do. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Adds optional BUDDI_HOST and BUDDI_SOCKET environment variables to buddi-hook.py. When BUDDI_HOST is set (e.g. "localhost:9999"), the hook connects over TCP instead of the Unix socket, enabling Claude Code on a remote VM to forward hook events to Buddi on a local Mac via SSH reverse port-forwarding (typically bridged with socat on the Mac).
Behavior is unchanged when neither variable is set.
Description
Type of change
Checklist
Screenshots