Hardening up#376
Merged
Merged
Conversation
…s dialog Gemini CLI shows "Action Required" permission prompts even with --yolo for shell redirects/heredocs. Detect the prompt and auto-send "2" to select "Allow for this session" with 2s cooldown for repeated prompts. Newer Claude Code versions show a confirmation dialog for --dangerously-skip-permissions where the default is "No, exit", causing immediate agent termination. Detect the dialog and auto-send "y" to accept. Both detections use buffer accumulation + ANSI stripping + pattern matching with 5s timeout fallback for fragmented output. Extracted into testable helper functions with 16 new unit tests covering full/partial matches, false positives, ANSI codes, and edge cases. Closes #373, relates to Gemini permission handling. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Address Codex review feedback on the auto-approval detection: 1. Bypass permissions timeout now requires BOTH bypass reference AND confirmation prompt (was || now &&). Prevents auto-sending "y" to unrelated yes/no prompts like "Delete file? (yes/no)". 2. Gemini action timeout now requires BOTH "Action Required" header AND allow option text (was || now &&). Prevents stray approvals when only the header appears in non-permission contexts. 3. Gemini auto-approval now sends "2\n" instead of bare "2" to ensure the prompt closes properly in all terminal modes. 4. Added 4 new timeout-safety tests verifying single-signal scenarios cannot trigger timeout-based approval. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
… npm path Address code review findings: 1. Remove dead timeout code from bypass-perms and Gemini detectors. With && logic, timeout was identical to full_match and unreachable. Simplified both to direct full_match check (~70 lines removed). 2. Document why MCP timeout intentionally keeps || (one-shot AtomicBool + highly specific "MCP Server Approval Required" header makes partial match timeout safe, unlike the generic signals in other detectors). 3. Fix "ermission" pattern to "permission" - the .to_lowercase() already handles case, so the leading "p" should be included for clarity and to avoid accidental substring matches. 4. Replace tautological timeout-safety tests with meaningful false-positive scenario tests using real-world prompt strings. 5. Fix #374 for npm install: add process.execPath-based universal fallback for global npm module discovery. Derives <prefix>/lib/node_modules/ from Node's own binary path, covering ALL version managers (nvm, volta, fnm, mise, asdf, n, system, Homebrew, direct download). Closes #374 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Run cargo fmt to fix all formatting issues flagged by CI. Also change the git repository check on `agent-relay up` from a hard error to a warning so the command works outside git repos. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The devDependency was pinned to 2.1.14 while the workspace version is 2.1.17, causing CI build to fail with TS2307 module not found error. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <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.
Fixes #374 #373