Skip to content

feat(upgrade): upgrade OpenHands from v1.4.0 to v1.6.0 - #65

Merged
zxkane merged 13 commits into
mainfrom
feat/upgrade-openhands-v1.6.0
Apr 8, 2026
Merged

feat(upgrade): upgrade OpenHands from v1.4.0 to v1.6.0#65
zxkane merged 13 commits into
mainfrom
feat/upgrade-openhands-v1.6.0

Conversation

@zxkane

@zxkane zxkane commented Apr 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Upgrade base OpenHands image, SDK, and runtime from v1.4.0 to v1.6.0 (341 upstream commits)
  • Remove custom S3EventService β€” upstream v1.6.0 has native AwsEventService with identical S3 path format (users/{user_id}/v1_conversations/{conv_id_hex}/)
  • Update _build_service_url patch for new 3-arg signature in v1.6.0 (url, service_name, runtime_id)
  • Update agent-server SDK from v1.11.5 to v1.15.0 with updated patch compatibility
  • Align orchestrator STATUS_MAP values with upstream expectations (starting/error instead of pending/failed)
  • Fix npm CVEs: handlebars 4.7.9, fast-xml-parser 5.5.10, minimatch 10.2.5, picomatch 4.0.4, path-to-regexp 8.4.2, brace-expansion 5.0.5
  • Remove deprecated send_telemetry config key (removed in v1.6.0)
  • Fork: custom/v1.6.0-fargate-r1 (20 cherry-picked commits from v1.4.0 fork)

Test plan

  • E2E tests pass (full --all run on staging openhands.test.kane.mx)
    • TC-003: Login via Chrome DevTools
    • TC-004: Verify Conversation List
    • TC-005: Start New Conversation
    • TC-005a: Load Existing Conversation History
    • TC-006: Execute Flask Todo App
    • TC-007: Verify Runtime Accessible β€” "Hello from OpenHands v1.6.0!"
    • TC-008: Verify In-App Routing
    • TC-009: Verify Web App Subdomain
    • TC-010: Verify VS Code URL Rewriting
    • TC-011: Cross-User Access Denied
    • TC-012: Unauthenticated Access Denied
    • TC-013: Main App Access Works
    • TC-014: Conversation Resume After Sandbox Stop
    • TC-015: AWS Docs MCP Server
    • TC-016: Chrome DevTools MCP Server
    • TC-017: Sandbox AWS Access
    • TC-018: Logout Functionality
    • TC-019: Secrets Page User Isolation
    • TC-020: Settings Pages User Isolation
    • TC-021: Secrets Persist After ECS Task Recycling
    • TC-024: Sandbox Idle Timeout
    • TC-027: SPA Navigation Starts Sandbox
    • TC-028: Conversation Archival
    • TC-029: Conversation Deletion
    • TC-030: Changes Tab Without GitHub Repo
    • TC-031: Changes Tab With GitHub Repo

Upgrade the base OpenHands image, SDK, and runtime to v1.6.0 (341 upstream
commits). Key changes:

- Bump base image from 1.4.0 to 1.6.0
- Bump agent-server SDK from v1.11.5 to v1.15.0
- Bump runtime image from 1.4-nikolaik to 1.6-nikolaik
- Bump openhands-tools from 1.11.5 to 1.15.0
- Remove custom S3EventService (Patch 33) β€” upstream v1.6.0 has native
  AwsEventService with identical S3 path format
- Remove remote_sandbox_service.py from fork patches (absorbed upstream)
- Update Patch 32 (exposed_urls) for new _build_service_url(url, name,
  runtime_id) signature and correct port mapping (60001 for VS Code)
- Update SDK Patch 26 insertion logic for v1.15.0 (no existing
  model_validator in ConversationState)
- Update VS Code server source image to 1.15.0-python
- Fork branch: custom/v1.6.0-fargate-r1 (19 cherry-picked commits,
  3 absorbed/skipped)
@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

πŸ”’ Security Scan Results

Status: πŸ”΄ CRITICAL ISSUES - Do not merge!

Summary

  • Critical Issues: 0
  • High Issues: 0
  • Medium Issues: 0
  • Low Issues: 0

NPM Vulnerabilities

  • Critical: 1
  • High: 6

Security Score: N/A/10

Please run ./security-check.sh locally for detailed findings.

πŸ“‹ View detailed reports

@amazon-q-developer amazon-q-developer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenHands v1.6.0 Upgrade Review

This PR upgrades OpenHands from v1.4.0 to v1.6.0, including SDK updates, removal of custom S3EventService (now native upstream), and alignment with new API signatures.

Critical Issue Found

  • Patch 32 (patch-exposed-urls.py): Missing urlparse import will cause runtime failure when the fallback code path executes

Changes Summary

  • Upgraded OpenHands to v1.6.0, agent SDK to v1.15.0, and openhands-tools to v1.15.0
  • Removed custom S3EventService - replaced by upstream AwsEventService
  • Updated VS Code port from 8001 to 60001 (upstream change)
  • Updated patch logic for v1.6.0 API signatures (added runtime_id parameter)
  • Enhanced SDK patches with v1.15.0 compatibility checks

Please address the critical import issue before merging.


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.

Comment thread docker/patch-exposed-urls.py
The Fargate orchestrator returns status='provisioning' during ECS RunTask,
which wasn't in the upstream STATUS_MAPPING. This caused 'Sandbox not
startable' errors. Re-add remote_sandbox_service.py to fork patches with
the provisioning -> STARTING mapping.
@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

πŸ”’ Security Scan Results

Status: πŸ”΄ CRITICAL ISSUES - Do not merge!

Summary

  • Critical Issues: 0
  • High Issues: 0
  • Medium Issues: 0
  • Low Issues: 0

NPM Vulnerabilities

  • Critical: 1
  • High: 6

Security Score: N/A/10

Please run ./security-check.sh locally for detailed findings.

πŸ“‹ View detailed reports

…tations

The orchestrator was returning status='pending' for STARTING sandboxes, but
upstream v1.6.0 RemoteSandboxService.STATUS_MAPPING expects 'starting'.
Similarly, ERROR was mapped to 'failed' but upstream expects 'error'.

This caused 'Sandbox not startable' errors because 'pending' didn't match
any entry in STATUS_MAPPING, defaulting to SandboxStatus.MISSING.
@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

πŸ”’ Security Scan Results

Status: πŸ”΄ CRITICAL ISSUES - Do not merge!

Summary

  • Critical Issues: 0
  • High Issues: 0
  • Medium Issues: 0
  • Low Issues: 0

NPM Vulnerabilities

  • Critical: 1
  • High: 6

Security Score: N/A/10

Please run ./security-check.sh locally for detailed findings.

πŸ“‹ View detailed reports

zxkane added 2 commits April 7, 2026 22:41
The orchestrator source change in the previous commit altered the Docker
asset hash for the sandbox image, which is referenced in the ComputeStack
snapshot.
The send_telemetry key was removed from OpenHands v1.6.0 core config,
causing a warning on startup. Remove it to eliminate the warning.
@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

πŸ”’ Security Scan Results

Status: πŸ”΄ CRITICAL ISSUES - Do not merge!

Summary

  • Critical Issues: 0
  • High Issues: 0
  • Medium Issues: 0
  • Low Issues: 0

NPM Vulnerabilities

  • Critical: 1
  • High: 6

Security Score: N/A/10

Please run ./security-check.sh locally for detailed findings.

πŸ“‹ View detailed reports

Handlebars 4.0.0-4.7.8 has critical vulnerabilities (GHSA-3mfm-83xf-c92r,
GHSA-2w6w-674q-4c4q, GHSA-2qvq-rjwj-gvw9). Override to 4.7.9 via npm
overrides to fix CI security scan failure.
@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

πŸ”’ Security Scan Results

Status: 🟑 HIGH ISSUES - Review required!

Summary

  • Critical Issues: 0
  • High Issues: 0
  • Medium Issues: 0
  • Low Issues: 0

NPM Vulnerabilities

  • Critical: 0
  • High: 6

Security Score: N/A/10

Please run ./security-check.sh locally for detailed findings.

πŸ“‹ View detailed reports

- Add defensive urlparse import in patch-exposed-urls.py fallback path
  (review finding: NameError if module-level import missing)
- Upgrade npm overrides to fix all critical/high CVEs:
  fast-xml-parser 5.5.10, minimatch 10.2.5, picomatch 4.0.4,
  path-to-regexp 8.4.2, brace-expansion 5.0.5
- Remaining 4 vulnerabilities (2 moderate, 2 high) are inside
  aws-cdk-lib's bundled dependencies β€” unfixable via overrides
@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

πŸ”’ Security Scan Results

Status: 🟑 HIGH ISSUES - Review required!

Summary

  • Critical Issues: 0
  • High Issues: 0
  • Medium Issues: 0
  • Low Issues: 0

NPM Vulnerabilities

  • Critical: 0
  • High: 2

Security Score: N/A/10

Please run ./security-check.sh locally for detailed findings.

πŸ“‹ View detailed reports

1 similar comment
@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

πŸ”’ Security Scan Results

Status: 🟑 HIGH ISSUES - Review required!

Summary

  • Critical Issues: 0
  • High Issues: 0
  • Medium Issues: 0
  • Low Issues: 0

NPM Vulnerabilities

  • Critical: 0
  • High: 2

Security Score: N/A/10

Please run ./security-check.sh locally for detailed findings.

πŸ“‹ View detailed reports

@zxkane

zxkane commented Apr 7, 2026

Copy link
Copy Markdown
Owner Author

/q review

@amazon-q-developer amazon-q-developer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

This PR successfully upgrades OpenHands from v1.4.0 to v1.6.0 with 341 upstream commits. The upgrade demonstrates excellent engineering practices with proper version management, security-focused changes, and comprehensive compatibility patches.

Key Changes Validated

βœ… Version Upgrades

  • OpenHands base image: v1.4.0 β†’ v1.6.0
  • Agent Server SDK: v1.11.5 β†’ v1.15.0
  • Fork reference updated with appropriate commit pinning

βœ… Native Upstream Adoption

  • Removed custom S3EventService in favor of upstream AwsEventService in v1.6.0
  • Both use identical S3 path format for backward compatibility

βœ… Status Mapping Corrections

  • Fixed sandbox status values to match upstream expectations ('starting' instead of 'pending', 'error' instead of 'failed')
  • Ensures proper integration with RemoteSandboxService

βœ… SDK Compatibility Patches

  • Patches 23-27 properly handle secret masking during conversation resume
  • Build-time patches correctly applied before PyInstaller bundling
  • Fallback logic for SDK version variations (v1.8.x β†’ v1.15.0)

βœ… Security & Multi-tenancy

  • User-scoped settings/secrets stores maintained
  • Proper verification of critical patches at startup
  • Multi-tenant conversation isolation preserved

Test Plan Coverage

The PR includes comprehensive E2E test coverage (TC-003 through TC-031) validating:

  • Authentication and user isolation
  • Conversation lifecycle (create, resume, archive, delete)
  • Sandbox functionality and AWS access
  • MCP server integrations
  • Security boundaries

Status: Ready for merge after E2E tests pass. The code is well-structured, follows best practices, and maintains backward compatibility while adopting native upstream features.


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.

@zxkane

zxkane commented Apr 8, 2026

Copy link
Copy Markdown
Owner Author

/q review

@amazon-q-developer amazon-q-developer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

This PR successfully upgrades OpenHands from v1.4.0 to v1.6.0, incorporating 341 upstream commits with comprehensive SDK and infrastructure updates.

Key Changes Validated

  • Version Upgrades: OpenHands base image, SDK (v1.11.5 β†’ v1.15.0), and runtime properly updated
  • Native AwsEventService: Correctly removes custom S3EventService in favor of upstream v1.6.0's native implementation
  • SDK Patches: Build-time patches (23-27) properly handle masked secrets and Bedrock max_output_tokens
  • Fork Strategy: Clean commit SHA pinning (7a481ec3) ensures reproducible builds
  • API Compatibility: Status mapping correctly aligns with upstream v1.6.0 expectations (starting/error vs pending/failed)
  • Configuration: Properly documents removal of deprecated send_telemetry config key

Test Coverage

The PR description references comprehensive E2E test cases (TC-003 through TC-031) covering authentication, conversation management, sandbox isolation, and multi-tenancy. Ensure all test cases pass before merge.

No blocking defects identified in the code review.


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.

All three Dockerfiles (app, agent-server-custom, openresty) now include
a LAST_UPDATED build arg. Bumping this date forces CDK to rebuild the
Docker images, pulling fresh base images with the latest security patches.

Without this, CDK reuses cached images when the Dockerfile content is
unchanged, even if upstream base images have been patched.
@github-actions

github-actions Bot commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

πŸ”’ Security Scan Results

Status: 🟑 HIGH ISSUES - Review required!

Summary

  • Critical Issues: 0
  • High Issues: 0
  • Medium Issues: 0
  • Low Issues: 0

NPM Vulnerabilities

  • Critical: 0
  • High: 2

Security Score: N/A/10

Please run ./security-check.sh locally for detailed findings.

πŸ“‹ View detailed reports

…vice)

Delete s3_event_service.py and its tests β€” upstream v1.6.0 has native
AwsEventService with identical S3 path format. Update AGENTS.md docs
to reference the upstream implementation.
@github-actions

github-actions Bot commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

πŸ”’ Security Scan Results

Status: 🟑 HIGH ISSUES - Review required!

Summary

  • Critical Issues: 0
  • High Issues: 0
  • Medium Issues: 0
  • Low Issues: 0

NPM Vulnerabilities

  • Critical: 0
  • High: 2

Security Score: N/A/10

Please run ./security-check.sh locally for detailed findings.

πŸ“‹ View detailed reports

Upgrade OpenResty from 1.27.1.2-alpine-fat (2024) to 1.29.2.3-alpine-fat
(2026-04-07) to pick up 2 major versions of security patches and bug fixes.
@github-actions

github-actions Bot commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

πŸ”’ Security Scan Results

Status: 🟑 HIGH ISSUES - Review required!

Summary

  • Critical Issues: 0
  • High Issues: 0
  • Medium Issues: 0
  • Low Issues: 0

NPM Vulnerabilities

  • Critical: 0
  • High: 2

Security Score: N/A/10

Please run ./security-check.sh locally for detailed findings.

πŸ“‹ View detailed reports

Patch 24 (model_dump exclude_none) is no longer needed β€” SDK v1.15.0
already uses model_dump(mode="json") which handles None values correctly.

Remaining SDK patches: 23, 25, 26 (secret handling), 27 (Bedrock).
@github-actions

github-actions Bot commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

πŸ”’ Security Scan Results

Status: 🟑 HIGH ISSUES - Review required!

Summary

  • Critical Issues: 0
  • High Issues: 0
  • Medium Issues: 0
  • Low Issues: 0

NPM Vulnerabilities

  • Critical: 0
  • High: 2

Security Score: N/A/10

Please run ./security-check.sh locally for detailed findings.

πŸ“‹ View detailed reports

…selection

The LLM_MODEL environment variable was hardcoded to claude-sonnet-4-6,
which overrode user's model selection saved in S3 settings. The model
is already configured via config.toml [llm].model as a default, and
users can override it per-user via the Settings UI (persisted in S3).

This fixes the regression where conversations always used the default
model regardless of user's LLM settings selection.
@github-actions

github-actions Bot commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

πŸ”’ Security Scan Results

Status: 🟑 HIGH ISSUES - Review required!

Summary

  • Critical Issues: 0
  • High Issues: 0
  • Medium Issues: 0
  • Low Issues: 0

NPM Vulnerabilities

  • Critical: 0
  • High: 2

Security Score: N/A/10

Please run ./security-check.sh locally for detailed findings.

πŸ“‹ View detailed reports

Adds a regression test that verifies:
- LLM_MODEL env var is NOT hardcoded in sandbox containers
- User's model selection from Settings UI is used by conversations
- Model is passed via StartConversationRequest, not env var

This catches the regression where hardcoded LLM_MODEL env var in
compute-stack.ts overrode user's model selection.
@github-actions

github-actions Bot commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

πŸ”’ Security Scan Results

Status: 🟑 HIGH ISSUES - Review required!

Summary

  • Critical Issues: 0
  • High Issues: 0
  • Medium Issues: 0
  • Low Issues: 0

NPM Vulnerabilities

  • Critical: 0
  • High: 2

Security Score: N/A/10

Please run ./security-check.sh locally for detailed findings.

πŸ“‹ View detailed reports

@zxkane
zxkane merged commit 93362ac into main Apr 8, 2026
4 checks passed
@zxkane
zxkane deleted the feat/upgrade-openhands-v1.6.0 branch April 8, 2026 09:18
@zxkane zxkane mentioned this pull request Apr 9, 2026
3 tasks
zxkane added a commit that referenced this pull request Apr 9, 2026
## Summary

- Bump version from 1.2.0 to 1.3.0
- Update CHANGELOG.md with all changes since v1.2.0

### Changes in this release

#### Changed
- **Upgrade OpenHands from v1.4.0 to v1.6.0** (#65) β€” 341 upstream
commits, SDK v1.15.0, removed custom S3EventService in favor of upstream
AwsEventService
- **Replace github-workflow skill with autonomous-dev-team** (#66) β€”
multi-agent support for Claude Code, Kiro CLI, and Codex

#### Fixed
- **Add retention-days to security scan artifacts** (#64) β€” prevent
GitHub Actions storage quota exhaustion

#### Security
- Fixed 6 npm CVEs: handlebars, fast-xml-parser, minimatch, picomatch,
path-to-regexp, brace-expansion (#65)

## Test plan

- [x] Build passes (`npm run build`)
- [x] All 129 unit tests pass (`npm run test:ts`)
- [ ] CI checks pass
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.

1 participant