Skip to content

Running on windows fails - claude not found #29

Open

Description

@prodigy

Thank you for this great proxy!

Running this on windows fails because it cannot find the claude code CLI. Running in WSL works without issues.

(venv) PS E:\AI\ClaudeCodeOpenAiWrapper> poetry run uvicorn src.main:app --reload --port 8000
INFO:     Will watch for changes in these directories: ['E:\\AI\\ClaudeCodeOpenAiWrapper']
INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO:     Started reloader process [23324] using WatchFiles
2025-12-18 07:38:14,244 - src.claude_cli - INFO - Using temporary isolated workspace: C:\Users\sgrun\AppData\Local\Temp\claude_code_workspace_3j22uob4
2025-12-18 07:38:14,244 - src.auth - INFO - Claude Code authentication validated: claude_cli
2025-12-18 07:38:14,245 - src.claude_cli - INFO - Claude Code authentication method: claude_cli
INFO:     Started server process [22008]
INFO:     Waiting for application startup.
2025-12-18 07:38:14,252 - src.main - INFO - Verifying Claude Code authentication and CLI...
2025-12-18 07:38:14,252 - src.auth - INFO - Claude Code authentication validated: claude_cli
2025-12-18 07:38:14,252 - src.main - INFO - ✅ Claude Code authentication validated: claude_cli
2025-12-18 07:38:14,252 - src.main - INFO - Testing Claude Agent SDK connection...
2025-12-18 07:38:14,252 - src.claude_cli - INFO - Testing Claude Agent SDK...
2025-12-18 07:38:14,291 - src.claude_cli - ERROR - Claude Agent SDK verification failed: Failed to start Claude Code:
2025-12-18 07:38:14,291 - src.claude_cli - WARNING - Please ensure Claude Code is installed and authenticated:
2025-12-18 07:38:14,291 - src.claude_cli - WARNING -   1. Install: npm install -g @anthropic-ai/claude-code
2025-12-18 07:38:14,291 - src.claude_cli - WARNING -   2. Set ANTHROPIC_API_KEY environment variable
2025-12-18 07:38:14,292 - src.claude_cli - WARNING -   3. Test: claude --print 'Hello'
2025-12-18 07:38:14,292 - src.main - WARNING - ⚠️  Claude Agent SDK verification returned False
2025-12-18 07:38:14,292 - src.main - WARNING - The server will start, but requests may fail.
2025-12-18 07:38:14,292 - src.session_manager - INFO - Started session cleanup task (interval: 5 minutes)
INFO:     Application startup complete.
INFO:     Shutting down
INFO:     Waiting for application shutdown.
2025-12-18 07:38:36,628 - src.main - INFO - Shutting down session manager...
2025-12-18 07:38:36,629 - src.session_manager - INFO - Session manager shutdown complete
2025-12-18 07:38:36,630 - src.session_manager - INFO - Session cleanup task cancelled
INFO:     Application shutdown complete.
INFO:     Finished server process [22008]
2025-12-18 07:38:36,635 - src.claude_cli - INFO - Cleaned up temporary workspace: C:\Users\sgrun\AppData\Local\Temp\claude_code_workspace_3j22uob4
INFO:     Stopping reloader process [23324]
Terminate batch job (Y/N)? y
(venv) PS E:\AI\ClaudeCodeOpenAiWrapper> claude --print "Hello"
Hello! I'm Claude Code, an AI assistant that can help you with software engineering tasks. I can help you write code, debug issues, refactor existing code, explore codebases, and much more.

I can see you're in the `ClaudeCodeOpenAiWrapper` project directory. How can I help you today?

Activity

  1. RichardAtCT commented on Dec 24, 2025

    @RichardAtCT
    Owner

    I don't have access to a windows machine to debug unfortunately!

  2. ThanhChinhBK commented on Jan 12, 2026

    @ThanhChinhBK

    hi, this works for me:

    $env:PATH = "C:\Users\abc\npm;$env:PATH" // -> my installed claude code path, on windows, abc is a mock name
    poetry run uvicorn src.main:app --reload --port 8000
  3. agaring commented on Mar 21, 2026

    @agaring

    Yeah, can confirm that is a problem on windows.
    Tried to use the suggestion of @ThanhChinhBK, but its not working for me.

  4. 6801318d8d commented on Jun 7, 2026

    @6801318d8d

    I also have this problem on Windows.

    claude is in path and if I type claude it finds it.

    But this wrapper seem unable to find the executable.

    Also works fine on WSL (but I can't access the wsl server from the host machine ... but this is another problem).

    Here are the logs: as you can see claude is in path:

    >claude --version
    2.1.168 (Claude Code)
    
    >uv run uvicorn src.main:app --reload --port 8000
    INFO:     Will watch for changes in these directories: ['C:\\[...]\\claude-code-openai-wrapper']
    INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
    INFO:     Started reloader process [33440] using WatchFiles
    2026-06-07 04:58:37,965 - src.claude_cli - INFO - Using temporary isolated workspace: C:\Users\user\AppData\Local\Temp\claude_code_workspace_mx597nmp
    2026-06-07 04:58:37,965 - src.auth - INFO - Claude Code authentication validated: claude_cli
    2026-06-07 04:58:37,965 - src.claude_cli - INFO - Claude Code authentication method: claude_cli
    INFO:     Started server process [12416]
    INFO:     Waiting for application startup.
    2026-06-07 04:58:37,973 - src.main - INFO - Verifying Claude Code authentication and CLI...
    2026-06-07 04:58:37,973 - src.auth - INFO - Claude Code authentication validated: claude_cli
    2026-06-07 04:58:37,973 - src.main - INFO - ✅ Claude Code authentication validated: claude_cli
    2026-06-07 04:58:37,973 - src.main - INFO - Testing Claude Agent SDK connection...
    2026-06-07 04:58:37,973 - src.claude_cli - INFO - Testing Claude Agent SDK...
    2026-06-07 04:58:38,048 - claude_agent_sdk._internal.transport.subprocess_cli - INFO - Using bundled Claude Code CLI: [...]\claude-code-openai-wrapper\.venv\Lib\site-packages\claude_agent_sdk\_bundled\claude.exe
    2026-06-07 04:58:38,049 - src.claude_cli - ERROR - Claude Agent SDK verification failed: Failed to start Claude Code:
    2026-06-07 04:58:38,050 - src.claude_cli - WARNING - Please ensure Claude Code is installed and authenticated:
    2026-06-07 04:58:38,050 - src.claude_cli - WARNING -   1. Install: npm install -g @anthropic-ai/claude-code
    2026-06-07 04:58:38,051 - src.claude_cli - WARNING -   2. Set ANTHROPIC_API_KEY environment variable
    2026-06-07 04:58:38,051 - src.claude_cli - WARNING -   3. Test: claude --print 'Hello'
    2026-06-07 04:58:38,051 - src.main - WARNING - ⚠️  Claude Agent SDK verification returned False
    2026-06-07 04:58:38,051 - src.main - WARNING - The server will start, but requests may fail.
    2026-06-07 04:58:38,052 - src.main - INFO - Live model discovery disabled (no ANTHROPIC_API_KEY); using fallback default claude-sonnet-4-6
    2026-06-07 04:58:38,052 - src.session_manager - INFO - Started session cleanup task (interval: 5 minutes)
    INFO:     Application startup complete.
    
  5. 6801318d8d commented on Jun 7, 2026

    @6801318d8d

    What worked for me was removing the --reload argument from the command line, thus running:

    >uv run uvicorn src.main:app --port 8000
    

    I'm using this fork which uses uv instead of poetry, and took the idea from here

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions