Skip to content

Conversation

@tonsiasy
Copy link

@tonsiasy tonsiasy commented Nov 8, 2025

Summary

This PR fixes startup issues on macOS Intel x86_64 systems, adds SOCKS proxy support, and resolves an agent port conflict.

Changes

  1. Fix macOS Intel x86_64 compatibility

    • Upgraded pylance from 0.38.2 to 0.38.3 across all environments
    • Version 0.38.2 only supported ARM macOS (macosx_11_0_arm64)
    • Version 0.38.3 adds Intel macOS support (macosx_10_15_x86_64)
    • Fixes ImportError when running on Intel-based Macs
  2. Add SOCKS proxy support

    • Added httpx[socks] dependency to main project, ai-hedge-fund, and TradingAgents
    • Resolves ImportError: Using SOCKS proxy, but the 'socksio' package is not installed
    • Enables agents to work in environments with SOCKS proxy configuration
  3. Remove deprecated AutoTradingAgent from launcher

    • AutoTradingAgent card was removed in commit c9063d2
    • Prevents startup failures due to missing agent configuration
    • Commented out in python/scripts/launch.py with explanation
  4. Fix port conflict between ResearchAgent and StrategyAgent

    • Changed StrategyAgent port from 10004 to 10006
    • ResearchAgent and StrategyAgent were both configured to use port 10004
    • This caused ResearchAgent to fail to start, resulting in JSON validation errors
    • New port allocation:
      • ResearchAgent: 10004
      • NewsAgent: 10005
      • StrategyAgent: 10006
  5. Add Claude Code configuration

    • Added CLAUDE.md with comprehensive project documentation
    • Includes architecture, development workflows, and troubleshooting guides

Test Plan

  • Tested on macOS 15.0 Intel x86_64
  • Verified all agents (ResearchAgent, NewsAgent, StrategyAgent) start successfully
  • Confirmed no port conflicts - all agents running on separate ports
  • Confirmed backend runs on http://localhost:8000
  • Confirmed frontend runs on http://localhost:1420
  • Tested with SOCKS proxy environment (all_proxy=socks5://127.0.0.1:7891)
  • Verified ResearchAgent responds correctly to queries (no more JSON validation errors)

Breaking Changes

None

Related Issues

  • Fixes startup issues on macOS Intel systems
  • Fixes environments with proxy configuration
  • Fixes user-reported error: "1 validation error for UserRequest Invalid JSON: expected value at line 1 column 1"

Wang Tong added 4 commits November 8, 2025 11:27
- Upgraded pylance from 0.38.2 to 0.38.3 in all environments
- Version 0.38.2 only supported ARM macOS (macosx_11_0_arm64)
- Version 0.38.3 adds support for Intel macOS (macosx_10_15_x86_64)
- Fixes ImportError when running on macOS Intel x86_64 platform
- Applied to: main, ai-hedge-fund, and TradingAgents environments
…rom launcher

- Added httpx[socks] dependency to support SOCKS5 proxy connections
  - Main project: added httpx[socks]>=0.28.1
  - ai-hedge-fund: upgraded httpx to httpx[socks]>=0.28.0
  - TradingAgents: added httpx[socks]>=0.28.1
- Fixes ImportError when agents use SOCKS proxy (all_proxy environment variable)
- Removed AutoTradingAgent from launch.py agent list
  - Agent card was removed in commit c9063d2
  - Prevents startup failures due to missing agent configuration

Resolves startup issues on systems with SOCKS proxy configuration
- Add CLAUDE.md with comprehensive project documentation
- Includes architecture overview, development workflows, and best practices
- Provides guidance for Claude Code AI assistant when working with the codebase
- Documents:
  - Project structure and module organization
  - Common commands and development setup
  - Configuration system (env vars, YAML configs)
  - Core orchestration flow and agent framework
  - Testing, linting, and code quality standards
  - Troubleshooting common issues
- Changed StrategyAgent port from 10004 to 10006
- Fixes port conflict that prevented ResearchAgent from starting
- Port allocation now:
  - ResearchAgent: 10004
  - NewsAgent: 10005
  - StrategyAgent: 10006

Previously both ResearchAgent and StrategyAgent were configured to use
port 10004, causing StrategyAgent to start first and block ResearchAgent
from starting. This resulted in JSON validation errors when users tried
to interact with ResearchAgent, as requests were being routed to the
wrong agent.

Resolves user-reported error:
"1 validation error for UserRequest Invalid JSON: expected value at
line 1 column 1"
@vcfgv
Copy link
Collaborator

vcfgv commented Nov 8, 2025

Thanks for the PR! The fixes for macOS Intel compatibility, SOCKS proxy support, and the port conflict resolution look good.
However, I noticed that the Claude Code configuration (commit ⁠99e8b98) seems somewhat off-topic from the main focus of this PR, which is addressing compatibility and proxy issues. I'd suggest splitting the ⁠CLAUDE.md documentation addition into a separate PR. This would help keep the PR scope focused and make it easier to review and track changes related to different concerns.

@vcfgv
Copy link
Collaborator

vcfgv commented Nov 18, 2025

Thanks for the PR! Unfortunately, we're unable to merge this PR due to the extended period without response.
The pylance upgrade fix you proposed has been addressed separately in #365. We appreciate your contribution and the effort you put into identifying these compatibility issues!
If you'd like to continue working on the other fixes (SOCKS proxy support and port conflict resolution), feel free to update this PR with those changes.

su8su pushed a commit that referenced this pull request Nov 18, 2025
## 📝 Pull Request Template

### 1. Related Issue
Closes #200 #204 #292

### Type of Change (select one)
Bug Fix

### 3. Description
Problem: In [version
0.38.2](https://pypi.org/project/pylance/0.38.2/#files), the Intel Mac
built distribution was missing from the release artifacts, which
prevented Intel Mac users from installing the pre-built wheel and forced
them to fall back to source installation or alternative methods.

Solution: This release restores the Intel Mac built distribution. As
seen in [version
0.38.3](https://pypi.org/project/pylance/0.38.3/#files), the wheel for
Intel Mac (⁠macosx_*_x86_64.whl) is now included in the distribution
files.

Acknowledgments: Thanks to PR #316 for the inspiration!

### 4. Testing
- [x] I have tested this locally.
- [x] I have updated or added relevant tests.

### 5. Checklist
- [x] I have read the [Code of Conduct](./CODE_OF_CONDUCT.md)
- [x] I have followed the [Contributing Guidelines](./CONTRIBUTING.md)
- [x] My changes follow the project's coding style
@tonsiasy tonsiasy closed this Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants