Warning
Review limit reached
Only developers with an assigned seat can use this organization's usage-based review budget, and seats here are assigned manually. Ask an admin to assign a seat, or change the review continuation mode in Billing.
Next included review available in 2 minutes.
View limit details
Limit details: You’ve used all 10 included reviews currently available.
Review configuration:
External image Run configuration
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: main
- File: .coderabbit.config.ts
- Commit: cc0b86d
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
d0190f2c-51b2-4278-8cdf-39a3456fe777
External image Commits
Reviewing files that changed from the base of the PR and between 4297440b83f43b1160ffe7789110f7286563d9c1 and 59fa4a20667dd9828a21c041bdd67dd1b4c8143d.
External image Files selected for processing: 2
apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsapps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts
No actionable comments were generated in the recent review.
ℹ️ Recent review info
⚙️ Run configuration
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Advanced
- Run ID:
a9c570e0-1249-40e5-b68c-c1c6133db86b
📥 Commits
Reviewing files that changed from the base of the PR and between 3cc75bac85684a02320e16ba1ee6194233293ef5 and 4297440b83f43b1160ffe7789110f7286563d9c1.
📒 Files selected for processing: 2
apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsapps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
Walkthrough
The Claude adapter now installs permission callbacks for runtime modes other than full-access when no explicit approval policy is set. It formats approval prompts with distinct decision reasons and avoids creating session-wide allow rules when Claude provides no permission suggestions.
Changes: Claude Permission Handling
Layer / File(s) Summary Runtime permission callbacks
apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts,apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsThe adapter installs a permission callback for runtime modes other than full-access when no approval policy is set. Tests cover callback installation and escalation approval outcomes. Approval prompt content
apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts,apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsApproval prompts use the summarized tool request as the base. They append a distinct decision reason after stripping VT control characters and trimming it. Tests cover prompt content and allow or deny outcomes. Session permission updates
apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts,apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsThe adapter returns no session permission updates for Bash or Monitor when Claude provides no suggestions. Tests cover accepting these tools for the session. Priority: External image Normal
Estimated code review effort: 2 (Simple) | ~15 minutes
Change: Bug fix · Severity of issue fixed: Medium
Sequence Diagram(s)
mermaid1 sequenceDiagram 2 participant ClaudeSDK 3 participant ClaudeAdapterV2 4 participant RuntimeApproval 5 ClaudeSDK->>ClaudeAdapterV2: Invoke permission callback for escalation 6 ClaudeAdapterV2->>RuntimeApproval: Request approval 7 RuntimeApproval-->>ClaudeAdapterV2: Return approval decision 8 ClaudeAdapterV2-->>ClaudeSDK: Return permission decision Suggested reviewers:
jieyuexing
Merge Risk: External image Minimal · up to 42974
Auto escalations use the existing approval delivery path, and no merge-blocking issue remains in the reviewed change.
Security architecture risk: External image Low · up to 42974
The change strengthens human approval for escalated commands and prevents unintended session-wide command access. Remaining uncertainty concerns approval cleanup during interruption and recovery, not a demonstrated authorization bypass.
Retained concerns No architecture-level concerns identified.
Security review details
Security Blast Radius
- inferred — The affected authority is tool execution within the relevant provider sessions. The change strengthens approval for requests escalated by the SDK; it does not establish that every command requires human approval or introduce a new execution sandbox.
Trust Boundaries and Controls
- observed — The callback denies requests without an active turn. For approval-requiring requests, human acceptance allows the supplied tool input, decline denies execution, and cancellation denies with interruption. Responses address an exact pending request ID rather than granting authority to an arbitrary tool invocation.
Resilience and Maintainability Implications
- inferred — Concurrent responses target the same single-assignment decision, so they do not create multiple permission results for one callback. Explicit duplicate-response rejection and complete interruption/recovery behavior remain unverified; the underlying decision and cleanup mechanisms predate this PR.
Pre-merge checks: Passed 4
Check name Status Explanation Title check Passed The title clearly identifies the main change: Claude Auto mode now asks for approval when commands escalate. Linked Issues check Passed Issue #15353requires Claude Auto escalations, including ask-rule commands, to show an approval request.claudeRuntimeQueryPolicyForRuntimePolicynow installs the permission callback for every mode …Out of Scope Changes check Passed The changes stay within issue #15353. Permission callback installation implements Auto escalation prompts. Prompt sanitization supports the approval request. The Bash and Monitor session-permission gu…Description check Passed The description provides the required problem, change, scope, approval, verification, limitations, issue references, and agent information. It does not use the template’s explicit section headings, bu… Full details: Linked Issues check
Explanation
Issue
#15353requires Claude Auto escalations, including ask-rule commands, to show an approval request.claudeRuntimeQueryPolicyForRuntimePolicynow installs the permission callback for every mode exceptfull-accesswhen no explicit policy applies. The callback waits for the runtime decision, maps accept and decline to allow and deny, and appends a VT-control-character-sanitized decision reason. Tests cover Auto callback requests, decisions, and prompt content. Existing tests cover explicit policy behavior.
Full details: Out of Scope Changes check
Explanation
The changes stay within issue
#15353. Permission callback installation implements Auto escalation prompts. Prompt sanitization supports the approval request. The Bash and Monitor session-permission guard prevents an approval without SDK suggestions from creating broad command access. The added tests directly verify these behaviors. No unrelated change is established.
Full details: Description check
Explanation
The description provides the required problem, change, scope, approval, verification, limitations, issue references, and agent information. It does not use the template’s explicit section headings, but the required content is substantially complete and relevant.
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create a new PR
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.