fix(docker): correct VS Code port mapping from 60001 to 8001 - #62
Conversation
The agent-server SDK defaults VS Code server to port 8001 (vscode_service.py default + config.py vscode_port=8001), but patch-exposed-urls.py was mapping it to 60001. This caused 502 "Upstream not reachable" errors when accessing VS Code via runtime subdomain routing, because no service listens on port 60001. Root cause: The port map in Patch 32 used an incorrect port number that didn't match the actual agent-server SDK default. Verified on staging: - Port 8001: VS Code responds (HTTP 302/403 with token auth) - Port 60001: Connection refused (no listener) - Port 8000: Agent-server responds (HTTP 200)
There was a problem hiding this comment.
Review Summary
This PR correctly fixes a critical bug where VS Code runtime subdomain access was failing with 502 errors due to an incorrect port mapping.
Changes Verified:
- β
Port corrected from 60001 β 8001 in
patch-exposed-urls.py - β Test documentation updated consistently
- β Snapshot tests updated for Docker image hash change
Root Cause Addressed:
The fix aligns the hardcoded port mapping with the upstream agent-server SDK default (vscode_port=8001), resolving the OpenResty connection failures.
No blocking issues found. The implementation is correct and well-documented.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
π Security Scan ResultsStatus: π‘ HIGH ISSUES - Review required!Summary
NPM Vulnerabilities
Security Score: N/A/10Please run |
Remove the folder path rewrite from Patch 32 that changed folder=%2Fworkspace%2Fproject to folder=%2Fworkspace. The upstream default opens VS Code at /workspace/project (the cloned repo), which is the expected behavior.
π Security Scan ResultsStatus: π‘ HIGH ISSUES - Review required!Summary
NPM Vulnerabilities
Security Score: N/A/10Please run |
## [1.2.0] - 2026-03-11 ### Added #### Sandboxes - **Startup timing instrumentation and SOCI support** (#58) - Added structured timing logs (`sandbox-startup-timing`) to benchmark sandbox startup phases in `/start` and `/resume` routes. - Integrated SOCI v2 index generation via `soci convert` for Fargate lazy image loading (requires `soci` CLI >= v0.10). - Introduced `sandboxSociImageUri` CDK context parameter for SOCI-enabled sandbox image override. - Exported sandbox image ECR URI as `CfnOutput` for SOCI index generation scripts. ### Changed #### Documentation - **Improved README for discoverability and engagement** (#60) - Restructured README to include a hero section, badges, and explicit value propositions. - Transformed features list into an emoji-tagged Key Features section for easier scanning. - Enhanced comparison tables and quick links for first-time visitor comprehension. ### Fixed #### Docker - **Correct VS Code port mapping from 60001 to 8001** (#62) - Resolved 502 runtime subdomain errors caused by incorrect port mapping (`60001` β `8001`) in `patch-exposed-urls.py`. - Fixed `can_connect(ip, 60001)` requests that failed to establish upstream connections due to mismatched port configurations in the agent-server SDK. - **Preserve project/<repo> path for nested repo git changes** (#61) - Corrected empty Changes tab for conversations linked to GitHub repositories. - Updated `normalizeGitUrl()` to preserve `project/<repo>` paths for accurate nested repo resolution. - Removed unnecessary intermediate `git init /workspace/project` repo creation shadowing actual repo changes. - **Normalize git API paths for connected repos** (#59) - Fixed 500 errors in git Changes tab when connecting GitHub repositories to conversations. - Adjusted `patch-fix.js` to properly normalize workspace paths containing nested repo directories. Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Summary
patch-exposed-urls.pymapped it to 60001 (a port where nothing listens)can_connect(ip, 60001)in OpenResty to fail β 502 "Upstream not reachable"Root Cause
docker/patch-exposed-urls.pyPatch 32 had_port_map = {'vscode': 60001, ...}but the upstreamsoftware-agent-sdkconfig defaultsvscode_port=8001and starts VS Code with--host 0.0.0.0 --port {vscode_port}.Verification (staging)
Test plan
npm run build)npm run test) β 129 TS + 100 PythonChecklist