Skip to content

[BUG] Linux deb: Bundled Python path rejected by security validation - "Invalid Python path rejected" #893

@mhenze-exaring

Description

@mhenze-exaring

Checklist

  • I searched existing issues and this hasn't been reported

Area

Backend

Operating System

Linux

Version

2.7.2

What happened?

On Linux (installed via .deb package), Auto-Claude detects and initializes its bundled Python correctly, but then rejects its own bundled Python path during service configuration. This causes all Python-dependent features to fail:

  • Tasks immediately go to "Human Review" with "Incomplete" status
  • Insights fails with "ModuleNotFoundError: No module named 'dotenv'"
  • Title generation fails with "No module named 'claude_agent_sdk'"

The root cause is a path validation check that only allows "system Python, Homebrew, pyenv, or virtual environment paths" — but the bundled Python at /opt/Auto-Claude/resources/python/bin/python3 doesn't match any of these patterns.

The bundled Python is detected and validated as working (3.12.8), but then rejected by the security validation in AgentProcess, ChangelogService, InsightsConfig, and TitleGenerator.

Steps to reproduce

  1. Install Auto-Claude 2.7.2 via the Linux .deb package
  2. Launch Auto-Claude from terminal to see logs
  3. Open a git repository project
  4. Create a new task
  5. Click "Start" on the task
  6. Observe: Task immediately moves to "Human Review" column with "Incomplete" status

Expected behavior

  • The bundled Python path (/opt/Auto-Claude/resources/python/bin/python3) should be accepted by the path validation
  • Tasks should proceed through Planning → Coding phases normally
  • Insights and other Python-dependent features should work

Logs / Screenshots

**Python Environment Initialization (SUCCESS):**

[PythonEnvManager] Initializing with path: /opt/Auto-Claude/resources/backend
[PythonEnvManager] Found bundled site-packages at: /opt/Auto-Claude/resources/python-site-packages
[PythonEnvManager] Found bundle marker, using bundled packages
[PythonEnvManager] Using bundled Python packages (no pip install needed)
[Python] Found bundled Python at: /opt/Auto-Claude/resources/python/bin/python3
[PythonEnvManager] Ready with bundled Python: /opt/Auto-Claude/resources/python/bin/python3
[PythonEnvManager] Using bundled site-packages: /opt/Auto-Claude/resources/python-site-packages
[IPC] Python environment initialized: {
  ready: true,
  pythonPath: '/opt/Auto-Claude/resources/python/bin/python3',
  sitePackagesPath: '/opt/Auto-Claude/resources/python-site-packages',
  venvExists: false,
  depsInstalled: true,
  usingBundledPackages: true
}


**Service Configuration (FAILURE - Path Rejected):**

[IPC] Configuring services with Python: /opt/Auto-Claude/resources/python/bin/python3
[AgentProcess] Invalid Python path rejected: Path does not match allowed Python locations. Expected: system Python, Homebrew, pyenv, or virtual environment paths
[AgentProcess] Falling back to getConfiguredPythonPath()
[ChangelogService] Invalid Python path rejected: Path does not match allowed Python locations. Expected: system Python, Homebrew, pyenv, or virtual environment paths
[InsightsConfig] Invalid Python path rejected: Path does not match allowed Python locations. Expected: system Python, Homebrew, pyenv, or virtual environment paths
[TitleGenerator] Invalid Python path rejected: Path does not match allowed Python locations. Expected: system Python, Homebrew, pyenv, or virtual environment paths


**Resulting Failures:**

Title generation:

[TitleGenerator] Title generation failed {
  code: 1,
  errorOutput: "Import error: No module named 'claude_agent_sdk'\n",
  output: '',
  isRateLimited: false
}


Task execution:

[AgentProcess] Process failed with code: 1 for task: 001-the-current-code-base-of-this-obsidian-plugin-grew
[AgentProcess] Checking for rate limit in output (last 500 chars): ...
ValueError: No OAuth token found.
Auto Claude requires Claude Code OAuth authentication.


Insights:

[Insights] ModuleNotFoundError: No module named 'dotenv'
[InsightsService] Error executing insights: Error: Process exited with code 1


### Additional Context

- Claude Code CLI is installed and working independently (`claude` command works in terminal)
- The OAuth authentication was completed successfully via the Auto-Claude guided setup
- The bundled Python (3.12.8) and site-packages exist and are valid
- The issue is that the path validation rejects `/opt/Auto-Claude/resources/python/bin/python3` because it doesn't match the expected patterns (system, Homebrew, pyenv, venv)

**Suggested Fix:**

The path validation logic should include the bundled Python path pattern (e.g., `/opt/Auto-Claude/resources/python/bin/python3` or more generally paths under the app's installation directory) as a valid allowed location.

### Environment Details

- **Distribution:** Debian/Ubuntu-based Linux
- **Installation method:** `.deb` package
- **Auto-Claude version:** 2.7.2
- **Bundled Python:** 3.12.8 at `/opt/Auto-Claude/resources/python/bin/python3`
- **Claude Code CLI:** 2.1.3 at `/home/<user>/.local/bin/claude`

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/backendThis is backend onlybugSomething isn't workingneeds-triageNew issue, maintainer review needed

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions