Skip to content

fix: make load_public_skills default to true (opt-out)#901

Merged
tofarr merged 1 commit into
mainfrom
fix/load-public-skills-default-true
May 28, 2026
Merged

fix: make load_public_skills default to true (opt-out)#901
tofarr merged 1 commit into
mainfrom
fix/load-public-skills-default-true

Conversation

@tofarr
Copy link
Copy Markdown
Contributor

@tofarr tofarr commented May 28, 2026

Problem

Public skills (including github-repo-monitor and slack-channel-monitor published in OpenHands/extensions) are not being loaded into new conversations, so slash commands like /github-repo-monitor have no skill context to guide them.

Root cause — a three-PR chain

PR Date Change
#229 2026-05-09 Flipped shouldLoadPublicSkills() from opt-out (!== "false", default true) to opt-in (=== "true", default false) — public skills stopped loading
#362 2026-05-15 Patched createAgentFromSettings by hardcoding load_public_skills: true — fixed
#457 2026-05-23 Large adapter refactor replaced createAgentFromSettings with buildAgentContext, reintroducing shouldLoadPublicSkills() — silently broke it again

Fix

Restore the original opt-out semantics in shouldLoadPublicSkills():

-// Defaults to false. Set VITE_LOAD_PUBLIC_SKILLS=true to enable.
-return import.meta.env.VITE_LOAD_PUBLIC_SKILLS === "true";
+// Defaults to true. Set VITE_LOAD_PUBLIC_SKILLS=false to disable.
+return import.meta.env.VITE_LOAD_PUBLIC_SKILLS !== "false";

This means buildAgentContext() (and therefore every new conversation) will carry load_public_skills: true unless the operator explicitly sets VITE_LOAD_PUBLIC_SKILLS=false (e.g. to save startup latency in CI or restricted envs).

Files changed

  • src/api/agent-server-config.ts — flip the predicate and update JSDoc
  • .env.sample — document the opt-out form of the flag
  • __tests__/api/agent-server-config.test.ts — update three tests to match new default
  • AGENTS.md — add "(opt-out)" clarifier (the doc already said "defaults to true" but the code disagreed)

This PR was created by an AI agent (OpenHands) on behalf of the user.


🐳 Docker images for this PR

GHCR package: https://github.com/OpenHands/agent-canvas/pkgs/container/agent-canvas

Component Value
Image ghcr.io/openhands/agent-canvas
Architectures amd64, arm64
Agent Server ghcr.io/openhands/agent-server:1.24.0-python
Automation openhands-automation==1.0.0a5
Commit 68ad11dcafd4743da9078e88aea763c2c970dc80

Pull (multi-arch manifest)

# Multi-arch manifest — Docker automatically pulls the correct architecture
docker pull ghcr.io/openhands/agent-canvas:sha-68ad11d

Run

docker run -it --rm \
  -p 8000:8000 \
  ghcr.io/openhands/agent-canvas:sha-68ad11d

All tags pushed for this build

ghcr.io/openhands/agent-canvas:sha-68ad11d-amd64
ghcr.io/openhands/agent-canvas:fix-load-public-skills-default-true-amd64
ghcr.io/openhands/agent-canvas:pr-901-amd64
ghcr.io/openhands/agent-canvas:sha-68ad11d-arm64
ghcr.io/openhands/agent-canvas:fix-load-public-skills-default-true-arm64
ghcr.io/openhands/agent-canvas:pr-901-arm64
ghcr.io/openhands/agent-canvas:sha-68ad11d
ghcr.io/openhands/agent-canvas:fix-load-public-skills-default-true
ghcr.io/openhands/agent-canvas:pr-901

About Multi-Architecture Support

  • Each tag (e.g., sha-68ad11d) is a multi-arch manifest supporting both amd64 and arm64
  • Docker automatically pulls the correct architecture for your platform
  • Individual architecture tags (e.g., sha-68ad11d-amd64) are also available if needed

@vercel
Copy link
Copy Markdown

vercel Bot commented May 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agent-canvas Ready Ready Preview, Comment May 28, 2026 6:45pm

Request Review

PR #229 flipped shouldLoadPublicSkills() from opt-out (default true) to
opt-in (default false) for dev-latency reasons. PR #362 patched the
conversation-start path by hardcoding load_public_skills: true, but
that fix was inadvertently lost in the #457 refactor which reintroduced
shouldLoadPublicSkills() inside the new buildAgentContext() helper.

This restores the original opt-out semantics:
- shouldLoadPublicSkills() now returns true unless VITE_LOAD_PUBLIC_SKILLS
  is explicitly set to "false"
- .env.sample updated to document the opt-out form
- Tests updated to match the new default
- AGENTS.md updated (it already said "defaults to true" but the code
  disagreed — now they agree)

Co-authored-by: openhands <openhands@all-hands.dev>
@tofarr tofarr force-pushed the fix/load-public-skills-default-true branch from 7540267 to 68ad11d Compare May 28, 2026 18:44
@tofarr tofarr merged commit 99bed9c into main May 28, 2026
14 of 15 checks passed
@tofarr tofarr deleted the fix/load-public-skills-default-true branch May 28, 2026 18:53
@github-actions
Copy link
Copy Markdown
Contributor

📸 Snapshot Test Report

Warning

Snapshot comparison step crashed (timeout, OOM, or runner error) — diff results below may be incomplete or absent.
Check the CI logs for the full error output (look for the "Run snapshot comparison" step).

Warning

One or more snapshot tests crashed during generation — some snapshots below may be incomplete.
Check the CI logs for the full error output (look for the "Generate current PR snapshots" step).

❌ 7 snapshots differ from the main branch baselines. Add the update-snapshots label to acknowledge intentional changes.

Category Count
🔴 Changed 7
🆕 New 0
✅ Unchanged 66
Total 73

How to resolve:

  • Unintentional diffs — the baselines on main may have moved since this branch was created. Merge the latest main into this branch and re-run CI.
  • Intentional changes — add the update-snapshots label. CI will pass and the new screenshots become the baseline when this PR merges.
🔴 Changed snapshots (7)

backends-extended

backend-after-switch

Expected (main) Actual (PR) Diff
expected actual diff

mcp-page — 5 snapshots

mcp-custom-server-1-editor-open

Expected (main) Actual (PR) Diff
expected actual diff

mcp-custom-server-editor

Expected (main) Actual (PR) Diff
expected actual diff

mcp-empty-installed

Expected (main) Actual (PR) Diff
expected actual diff

mcp-search-filtered

Expected (main) Actual (PR) Diff
expected actual diff

mcp-slack-install-1-marketplace

Expected (main) Actual (PR) Diff
expected actual diff

settings-page

settings-page

Expected (main) Actual (PR) Diff
expected actual diff
✅ Unchanged snapshots (66)

archived-conversation

  • conversation-panel-with-archived-badges
  • conversation-view-archived
  • conversation-view-sandbox-error

automations

  • automations-delete-modal
  • automations-list-active-inactive
  • automations-no-automations
  • automations-search-no-results

backends-extended

  • backend-add-blank-disabled
  • backend-add-cloud-advanced-open
  • backend-add-cloud-no-key-disabled
  • backend-add-cloud-with-key-enabled
  • backend-add-form-partially-filled
  • backend-add-invalid-url-disabled
  • backend-add-local-ready
  • backend-add-name-only-disabled
  • backend-add-two-column-layout
  • backend-add-whitespace-host-disabled
  • backend-cancel-nothing-saved
  • backend-dropdown-two-backends
  • backend-edit-prefilled
  • backend-manage-after-removal
  • backend-manage-two-listed
  • backend-remove-cancelled
  • backend-remove-confirmation
  • backend-switch-overlay

backends

  • backend-add-modal
  • backend-manage-modal
  • backend-selector-open

changes-tab

  • changes-deleted-file
  • changes-diff-viewer
  • changes-empty

collapsible-thinking

  • reasoning-content-collapsed
  • reasoning-content-expanded
  • think-action-collapsed
  • think-action-expanded

mcp-page

  • mcp-custom-server-2-url-filled
  • mcp-custom-server-3-all-filled
  • mcp-custom-server-4-installed
  • mcp-slack-install-2-modal
  • mcp-slack-install-3-filled
  • mcp-slack-install-4-installed

onboarding

  • onboarding-step-0-choose-agent
  • onboarding-step-1-check-backend
  • onboarding-step-2-setup-llm
  • onboarding-step-3-say-hello

projects-workspace-browser

  • projects-workspace-browser

settings-page

  • add-backend-modal
  • analytics-consent-modal
  • home-screen
  • settings-app-page

settings-secrets

  • secrets-add-form-filled
  • secrets-add-form
  • secrets-after-save
  • secrets-delete-confirm
  • secrets-list

settings-verification

  • condenser-settings
  • verification-settings-off
  • verification-settings-on

sidebar

  • sidebar-collapsed
  • sidebar-conversation-panel
  • sidebar-filter-menu

skills-page

  • skills-empty
  • skills-loaded
  • skills-no-match
  • skills-search-filtered
  • skills-type-filter

Generated by the Snapshot Tests workflow. This comment was created by an AI agent (OpenHands) on behalf of the repo maintainers.

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