Skip to content
This repository was archived by the owner on Jun 7, 2026. It is now read-only.

Fix start-proxy.js flag-parse crash (standalone --mode/--port)#1

Draft
redact22 wants to merge 1 commit into
mainfrom
claude/api-downgrade-compatibility-8dI4K
Draft

Fix start-proxy.js flag-parse crash (standalone --mode/--port)#1
redact22 wants to merge 1 commit into
mainfrom
claude/api-downgrade-compatibility-8dI4K

Conversation

@redact22

@redact22 redact22 commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Why

Part of the $20-plan downgrade prep. redact22/deepclaude is the simpler public sibling of the hydra deepclaude; the owner runs deepclaude and shouldn't hit a crash whichever copy launches.

The bug

proxy/start-proxy.js read argv[2]/argv[3] as the legacy <url> <key> positionals before checking for flags, so node start-proxy.js --mode deepseek --port 3200 was treated as legacy mode with targetUrl = "--mode"new URL('--mode') crash. Standalone flag mode was unreachable.

Fix

Only treat the first two args as url/key when they are not flags (startsWith('-')). Legacy mode (deepclaude.sh/ps1 passing a real url + key) is unchanged. Verified: standalone --mode/--port now starts and listens; legacy still works.

This is the same fix already applied in the hydra deepclaude (PR aattaran#9). The hydra copy is the canonical, full-featured one; this keeps the sibling from crashing in standalone mode.

https://claude.ai/code/session_01QudvzQk8mSQd3xrQwmX93D


Generated by Claude Code

start-proxy.js treated argv[2]/argv[3] as the legacy <url> <key> positionals
before checking for flags, so 'node start-proxy.js --mode deepseek --port 3200'
crashed with new URL('--mode'). Standalone flag mode was unreachable. Now ignores
leading flags; legacy mode (real url+key) is unchanged.

(Same fix already applied in the hydra deepclaude.)

https://claude.ai/code/session_01QudvzQk8mSQd3xrQwmX93D
@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6e5c2bc0-566c-4870-9fe4-79f24e4f0588

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/api-downgrade-compatibility-8dI4K

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants