Repository navigation
Conversation
|
No actionable comments were generated in the recent review. ℹ️ Recent review info
Walkthrough
Priority: Merge Risk:
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
ebafa8b4-e8f6-4de8-bbab-a62f095df9b6
⛔ Files ignored due to path filters: 1
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing: 1
package.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
| }, | ||
| "dependencies": { | ||
| "@anthropic-ai/claude-agent-sdk": "0.3.284", | ||
| "@anthropic-ai/claude-agent-sdk": "0.3.302", |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
rg -n "permission-mode|permissionMode|pre-SDK|dangerously-skip-permissions" src tests --glob '!**/node_modules/**' | head -80
rg -n "produces a matching CLI flag for every pre-SDK argv entry" -r '' src tests
rg -n "permission-mode|permissionMode" node_modules/@anthropic-ai/claude-agent-sdk/*.mjs 2>/dev/null | head -20Repository: stablyai/orca
Length of output: 45657
🏁 Script executed:
set -o pipefail
printf '%s\n' '--- target test locations ---'
rg -n -F -- 'produces a matching CLI flag for every pre-SDK argv entry' . --glob '!node_modules/**' --glob '!dist/**' --glob '!build/**' || test "$?" -eq 1
printf '%s\n' '--- relevant source hits ---'
rg -n -F --glob '*.{ts,tsx,js,cjs,mjs}' -e 'permissionMode' -e 'pre-SDK' -e 'dangerously-skip-permissions' -e 'claude-agent-sdk' src tests test 2>/dev/null | rg 'claude|Claude|permission|pre-SDK|argv|SDK' | head -240 || true
printf '%s\n' '--- changed files and package diff ---'
git diff --stat 30f5bef947471007efe3b24fd9026c9e94ae1f21 7a6682d86bf3074c2440cfcf54edb8dcb0a32b38
git diff --unified=20 30f5bef947471007efe3b24fd9026c9e94ae1f21 7a6682d86bf3074c2440cfcf54edb8dcb0a32b38 -- package.json pnpm-lock.yaml src/main/claude tests
printf '%s\n' '--- package and installed SDK metadata ---'
sed -n '180,198p' package.json
if test -f node_modules/@anthropic-ai/claude-agent-sdk/package.json; then
rg -n -F -e '"version"' -e '0.3.' node_modules/@anthropic-ai/claude-agent-sdk/package.json | head -20
fi
printf '%s\n' '--- candidate files ---'
rg --files src tests test 2>/dev/null | rg 'claude|sdk|fake|cli' | head -200Repository: stablyai/orca
Length of output: 41285
🏁 Script executed:
set -o pipefail
printf '%s\n' '--- claude directory files ---'
rg --files src/main/claude | sort
printf '%s\n' '--- target test context ---'
nl -ba src/main/claude/claude-agent-sdk-contract-pins.test.ts | sed -n '1,430p'
printf '%s\n' '--- exact claude permission references ---'
rg -n -F -- 'permissionMode' src/main/claude src/main/runtime src/shared --glob '*.ts' --glob '*.tsx' | head -240
printf '%s\n' '--- exact SDK query references ---'
rg -n -F -- 'query(' src/main/claude src/main/runtime src/shared --glob '*.ts' --glob '*.tsx' | head -200
printf '%s\n' '--- fake CLI and argv references ---'
rg -n -F -- 'pre-SDK' src/main src/shared tests --glob '*.ts' --glob '*.tsx' --glob '*.mjs' --glob '*.cjs' || test "$?" -eq 1
rg -n -F -- 'fake' src/main/claude --glob '*.ts' --glob '*.tsx' --glob '*.mjs' --glob '*.cjs' || test "$?" -eq 1
rg -n -F -- 'argv' src/main/claude --glob '*.ts' --glob '*.tsx' --glob '*.mjs' --glob '*.cjs' | head -200Repository: stablyai/orca
Length of output: 42831
🏁 Script executed:
set -o pipefail
printf '%s\n' '--- target test setup and assertion ---'
nl -ba src/main/claude/claude-agent-sdk-contract-pins.test.ts | sed -n '86,215p;328,402p'
printf '%s\n' '--- permissionMode declarations and assignments ---'
rg -n --glob '*.ts' --glob '*.tsx' -F -- 'permissionMode' src/main/claude src/main/runtime src/shared | head -300
printf '%s\n' '--- resolver and option-builder symbols ---'
rg -n --glob '*.ts' --glob '*.tsx' -e 'createClaudeStructuredLaunchResolver' -e 'CLAUDE_STRUCTURED_BASE_OPTIONS' -e 'permissionMode' src/main src/shared | rg 'launch|structured|claude|permissionMode' | head -300
printf '%s\n' '--- candidate option-builder files ---'
rg --files src/main src/shared | rg 'structured-agent-launch|structured-launch|structured-options|session-acquisition-options|claude.*launch.*args|claude.*options' | sortRepository: stablyai/orca
Length of output: 41974
🌐 Web query:
@anthropic-ai/claude-agent-sdk 0.3.302 permissionMode omitted default CLI settings
💡 Result:
In **`@anthropic-ai/claude-agent-sdk` v0.3.302**, leaving `permissionMode` unset starts the session in **`default` mode** when using a third-party provider, with telemetry either off or on a fresh install. To retain `auto` mode, explicitly set `permissionMode: 'auto'`. ([github.com](https://github.com/anthropics/claude-agent-sdk-typescript/releases?utm_source=openai))
That’s the version’s release-note statement; it does **not** establish that omission resolves to `default` for every provider or installation state.
Citations:
- 1: https://github.com/anthropics/claude-agent-sdk-typescript/releases?utm_source=openai
🏁 Script executed:
set -o pipefail
printf '%s\n' '--- Claude permission mapping and resolver ---'
nl -ba src/main/claude/claude-structured-launch-resolution.ts | sed -n '1,235p'
printf '%s\n' '--- Claude option and launch-args builders ---'
nl -ba src/main/claude/claude-structured-options.ts | sed -n '1,260p'
nl -ba src/main/claude/claude-structured-launch-args.ts | sed -n '1,240p'
nl -ba src/main/runtime/structured-agent-launch-composition.ts | sed -n '130,215p'
printf '%s\n' '--- all exact permission flag source references ---'
rg -n --glob '*.ts' --glob '*.tsx' -F -e '--permission-mode' -e 'CLAUDE_PERMISSION_MODES' -e 'permissionMode:' src/main src/shared
printf '%s\n' '--- historical pre-SDK references ---'
git log --all --oneline -S'--permission-mode' -- src/main src/shared | head -30
git log --all --oneline -S'permissionMode: default' -- src/main src/shared | head -30
printf '%s\n' '--- base versions of likely relevant files ---'
for f in src/main/claude/claude-structured-launch-resolution.ts src/main/claude/claude-structured-options.ts src/main/claude/claude-structured-launch-args.ts src/main/runtime/structured-agent-launch-composition.ts; do
if git cat-file -e 30f5bef947471007efe3b24fd9026c9e94ae1f21:$f 2>/dev/null; then
echo "--- $f at base ---"
git show 30f5bef947471007efe3b24fd9026c9e94ae1f21:$f | rg -n -F -e '--permission-mode' -e 'permissionMode' -e 'CLAUDE_PERMISSION_MODES' | head -120
fi
doneRepository: stablyai/orca
Length of output: 16835
🏁 Script executed:
printf '%s\n' '--- permission mapping ---'
nl -ba src/main/claude/claude-structured-launch-resolution.ts | sed -n '60,100p'
printf '%s\n' '--- resolver construction ---'
nl -ba src/main/claude/claude-structured-launch-resolution.ts | sed -n '180,225p'
printf '%s\n' '--- launch resolution tests around modes ---'
nl -ba src/main/claude/claude-structured-launch-resolution.test.ts | sed -n '260,345p'
printf '%s\n' '--- launch args implementation and tests ---'
nl -ba src/main/claude/claude-structured-launch-args.ts | sed -n '1,180p'
nl -ba src/main/claude/claude-structured-launch-args.test.ts | sed -n '1,100p'
printf '%s\n' '--- exact permission flags in current source ---'
rg -n --glob '*.ts' --glob '*.tsx' -F -e '--permission-mode' -e 'permissionMode: undefined' -e 'permissionMode: default' src/main/claude src/main/runtime src/shared | head -180
printf '%s\n' '--- base target test and base resolver snippets ---'
git show 30f5bef947471007efe3b24fd9026c9e94ae1f21:src/main/claude/claude-agent-sdk-contract-pins.test.ts 2>/dev/null | sed -n '30,48p;336,395p'
git show 30f5bef947471007efe3b24fd9026c9e94ae1f21:src/main/claude/claude-structured-launch-resolution.ts 2>/dev/null | sed -n '60,90p;195,215p'Repository: stablyai/orca
Length of output: 25749
🏁 Script executed:
printf '%s\n' '--- final SDK options assembly ---'
nl -ba src/main/claude/claude-structured-launch-resolution.ts | sed -n '218,285p'
printf '%s\n' '--- Orca permission-mode type ---'
nl -ba src/shared/agent-chat-permission-mode.ts | sed -n '1,150p'
printf '%s\n' '--- local SDK 0.3.302 artifacts, if present ---'
find node_modules ~/.local/share/pnpm/store /root/.local/share/pnpm/store -maxdepth 6 -iname '*claude-agent-sdk*0.3.302*' -print 2>/dev/null | head -40
find node_modules -path '*claude-agent-sdk*' -maxdepth 6 -type f -name 'package.json' -print 2>/dev/null | head -20Repository: stablyai/orca
Length of output: 10272
🌐 Web query:
site:github.com/anthropics/claude-agent-sdk-typescript/releases/tag 0.3.302 permissionMode settings defaultMode
💡 Result:
For **`@anthropic-ai/claude-agent-sdk` v0.3.302**, the release says an omitted `permissionMode` now starts in **`default` mode** on third-party providers when telemetry is off or on a fresh install. To keep **`auto`** mode, explicitly pass `permissionMode: 'auto'`. ([github.com](https://github.com/anthropics/claude-agent-sdk-typescript/releases))
The release note does not mention `settings` or `defaultMode`, so it doesn’t establish whether those settings affect this behavior.
Citations:
- 1: https://github.com/anthropics/claude-agent-sdk-typescript/releases
🏁 Script executed:
set -o pipefail
SDK=$(find node_modules/.pnpm -maxdepth 1 -type d -name '@anthropic-ai+claude-agent-sdk@0.3.302*' | head -1)/node_modules/@anthropic-ai/claude-agent-sdk
printf '%s\n' "--- SDK package: $SDK ---"
cat "$SDK/package.json" | sed -n '1,90p'
printf '%s\n' '--- SDK declarations mentioning permissionMode ---'
rg -n -F -- 'permissionMode' "$SDK" --glob '*.d.ts' --glob '*.ts' | head -120
printf '%s\n' '--- SDK source files mentioning relevant terms ---'
rg -l -F -e 'permissionMode' -e 'defaultMode' -e 'dangerously-skip-permissions' "$SDK" --glob '*.mjs' --glob '*.js' --glob '*.cjs' | head -40
printf '%s\n' '--- bounded source contexts ---'
python3 - "$SDK" <<'PY'
from pathlib import Path
import sys
root = Path(sys.argv[1])
terms = ('permissionMode', 'defaultMode', 'dangerously-skip-permissions')
for path in sorted(root.rglob('*')):
if path.suffix not in {'.mjs', '.js', '.cjs'} or not path.is_file():
continue
text = path.read_text(errors='replace')
hits = [text.find(term) for term in terms]
if max(hits) < 0:
continue
print(f'--- {path} ---')
shown = set()
for term in terms:
pos = text.find(term)
if pos < 0:
continue
start = max(0, pos - 700)
end = min(len(text), pos + 1100)
snippet = text[start:end]
if snippet in shown:
continue
shown.add(snippet)
print(f'[{term} at {pos}]')
print(snippet)
PYRepository: stablyai/orca
Length of output: 45647
🏁 Script executed:
python3 <<'PY'
from pathlib import Path
roots = sorted(Path('node_modules/.pnpm').glob('@anthropic-ai+claude-agent-sdk@0.3.**/node_modules/@anthropic-ai/claude-agent-sdk'))
for root in roots:
print(f'--- {root} ---')
for name in ('core.mjs', 'sdk.mjs'):
path = root / name
if not path.exists():
continue
text = path.read_text(errors='replace')
for term in ('resolvePermissionModeInCli', 'permissionMode:oV', 'permissionMode:', 'filterEscalatingDefaultMode', 'defaultMode:'):
positions = []
start = 0
while True:
pos = text.find(term, start)
if pos < 0:
break
positions.append(pos)
start = pos + 1
if not positions:
continue
print(f'{name} term={term} count={len(positions)}')
for pos in positions[:3]:
line = text.count("\n", 0, pos) + 1
print(f' line={line} offset={pos}')
print(text[max(0, pos-260):min(len(text), pos+520)])
PYRepository: stablyai/orca
Length of output: 576
🏁 Script executed:
python3 <<'PY'
from pathlib import Path
base = Path('node_modules/.pnpm')
roots = []
for entry in base.iterdir():
if entry.name.startswith('@anthropic-ai+claude-agent-sdk@'):
pkg = entry / 'node_modules/@anthropic-ai/claude-agent-sdk'
if pkg.is_dir():
roots.append(pkg)
for root in sorted(roots, key=str):
print(f'--- {root} ---')
for name in ('core.mjs', 'sdk.mjs'):
path = root / name
if not path.exists():
continue
text = path.read_text(errors='replace')
for term in ('resolvePermissionModeInCli', 'filterEscalatingDefaultMode', 'defaultMode:'):
positions = []
start = 0
while True:
pos = text.find(term, start)
if pos < 0:
break
positions.append(pos)
start = pos + 1
if not positions:
continue
print(f'{name} term={term} count={len(positions)}')
for pos in positions[:3]:
line = text.count("\n", 0, pos) + 1
print(f' line={line} offset={pos}')
print(text[max(0, pos-300):min(len(text), pos+650)])
PYRepository: stablyai/orca
Length of output: 10863
Preserve the explicit default permission mode for Full Access.
full-access currently omits permissionMode and relies only on --dangerously-skip-permissions. SDK 0.3.302 no longer emits --permission-mode default when the option is omitted, so enabled CLI settings can select a different starting mode. The fake-CLI assertion detects this contract change. Do not relax it.
Suggested fix
return mode === 'full-access'
- ? { extraArgs: { 'dangerously-skip-permissions': null } }
+ ? {
+ permissionMode: 'default',
+ extraArgs: { 'dangerously-skip-permissions': null }
+ }
: { permissionMode: CLAUDE_PERMISSION_MODES[mode] }SDK 0.3.295+ writes value-taking flags as --flag=value, and 0.3.286+ stops adding --permission-mode default when Orca passes no mode. Only Full Access passes none; a real claude 2.1.302 still starts it in bypassPermissions, with or without the old extra flag and whatever defaultMode the user's settings set.
|
Closing: stale (SDK 0.3.302). The daily SDK check now tells Brennan when to update instead of keeping an update PR open. |
ELI5
Orca's Claude chats use Anthropic's Claude Agent SDK to talk to the user's installed Claude Code. Main pins SDK 0.3.284, built for Claude Code 2.1.284. This existing candidate still pins 0.3.302; Claude Code's current stable/latest channels are 2.1.308/2.1.309. A larger version gap makes future wrapper compatibility updates harder to review, but a newer wrapper does not update the user's Claude Code.
Brennan requested an October 23 sample refresh to 0.3.305, the newest release meeting the repository's three-day age rule. The sample could not obtain a permitted remote QA machine within its 45-minute admission limit, so the 0.3.305 install and lockfile refresh were not performed. This PR remains at 0.3.302. The current head merges main once to clear the previous conflicts; it does not claim new runtime validation.
What Changed
The existing dependency change is 0.3.284 → 0.3.302, with no intended visible feature change. Its contract updates account for two upstream argument changes: named options use
--flag=value(0.3.295), and Full Access no longer gets a redundant--permission-mode defaultbeside--dangerously-skip-permissionswhen permissionMode is omitted (0.3.286). Other permission modes still pass explicit values. The packaged CLI expectation and launch snapshots match the new argument form. Main's other dependency versions were preserved during the merge.The October 23 research covers 0.3.303 through 0.3.309, but none of those versions is installed by this PR. SDK 0.3.304–305 mainly adds optional context/usage fields and SDK startup/setMcpServers fixes; Orca uses query(), not startup()/prewarm(), and does not call setMcpServers. The 0.3.305 and 0.3.306 type definitions are identical. Version 0.3.309 remains under the age floor until October 25.
MCP elicitation is already supported by the 0.3.284 wrapper: without onElicitation, requests not handled by CLI hooks are automatically declined. Orca has no such callback or form/URL consent UI; a dependency bump does not add one. MCP task execution and completion are CLI-owned; the old SDK already forwards task notifications, including mcp_task. Neither feature establishes a need for this pin bump. The published 2.1.306 changelog does not list either feature's introduction.
Why
Keeping the wrapper reasonably current is maintenance. The common pattern is to run the user's executable explicitly, which Orca already does. This candidate changes no persisted state, wire operation, UI or runtime guard.
Why not yet
The normal automation priority gate says to skip: the other apps on this SDK still pin 0.3.276 and 0.3.245, both behind Orca's 0.3.284. No current defect caused by Orca's SDK pin was established. The requested sample refresh could not run its required comparison within the QA queue limit. Current Claude Code reports below also prevent a blanket recommendation across all providers/platforms. This is not a ready-to-merge claim.
Linked Issue
N/A: scheduled dependency upkeep; October 23 refresh sample was explicitly requested.
Visual Proof
N/A: no UI change. Electron QA of a real chat was not exercised by this sample.
Testing
The five named fake-Claude files were not run in this sample. The historical October 19 comparison is not current-head evidence and is not presented as validation here. CI alone does not establish that model/effort/permission/context controls work with a real Claude.
Current-head CI: failed on d58b003, PR Checks run 40029870743. The lint step rejects src/renderer/src/components/terminal-pane/terminal-file-open-routing.ts:364 for its line count; that file is identical to merged main. The mobile HTML-preview fragment-link test at config/scripts/mobile-web-app/preview/mobile-web-app-html-preview-render.test.mjs:590 timed out after 240 seconds in Chromium; that test and its preview implementation are also unchanged by this PR. The timeout was not independently reproduced on main. The aggregate gate consequently failed and unit/contract tests were skipped. No SDK-required failure was identified, no unrelated fixes or retries were made, and this is not a CI pass.
Known issues
A bounded fresh search found no issue naming 0.3.305's wrapper JavaScript as a regression in Orca's used paths. Existing SDK reports include missing cancellation declarations (anthropics/claude-agent-sdk-typescript#516), dropped callback reason fields (#515), one-shot background work ending early (#514), and Bedrock streaming buffering (#511).
Claude Code reports affect users through their own executable, independently of Orca's pin:
Not verified
Current-head fake/real Claude runs, Electron QA, live MCP task/elicitation server behavior, Windows/Linux runtime behavior, provider-specific flows and older installed CLIs. The scheduler admitted this Mac once, which the brief explicitly excludes; that ticket was released without setup or tests. No QA worktree, test copy or real agent was launched in this sample.
Review
No completed review loop or merge-readiness assertion. No force push, merge, auto-merge or external announcement was performed.
Agent skill upstream boundary
Notes
The main merge preserves current unrelated dependency updates. Executable selection, remote execution and mobile wire behavior are unchanged. The priority decision is separate from whether this candidate might eventually pass verification.
Checklist