Repository navigation
fix(skills): point a truncated description at invoke_skill, not the SKILL.md path - #6664
Merged
Merged
Conversation
…KILL.md path Skill truncates a description over 1024 characters when it is loaded, and its notice named the absolute path of the SKILL.md. to_prompt() leaves the location out of <available_skills> on purpose so the agent loads skills through invoke_skill, but the load-time notice put the path back and, being within the limit already, kept to_prompt from adding its invoke_skill pointer. The notice now names the skill for invoke_skill instead. Fixes #6644 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013ArwwLKWzfpSTpRccheeWP
Contributor
REST API breakage checks (OpenAPI) — ✅ PASSEDResult: ✅ PASSED |
Contributor
This comment has been minimized.
This comment has been minimized.
all-hands-bot
approved these changes
Nov 9, 2026
all-hands-bot
left a comment
Collaborator
There was a problem hiding this comment.
This review was posted by an AI agent (OpenHands).
Review summary
Reviewed at head 9c2494a4b488d3638b1ee39ee24c8e5ebff161cd. No material correctness, security, or compatibility findings.
Verified in the workspace:
- Bug confirmed on
main: loading aSKILL.mdwith a description over 1024 characters embeds the absoluteSKILL.mdpath inSkill.description(load-time notice in_truncate_long_description). Because the truncated description already sits at exactly 1024 chars,to_prompt()adds nothing, so<available_skills>carried the path and noinvoke_skillpointer — contradictingto_prompt()'s documented design (location deliberately omitted since #2835). - Fix is correct and consistent:
_DESCRIPTION_TRUNCATE_NOTICEnow names the skill forinvoke_skill, matching the exactinvoke_skill(name="<name>")wording already used byto_prompt()'s own truncation message and byAvailableSkillsSection("the only supported way to invoke a skill"). Theinvoke_skillbuiltin matches skills by name, so the pointer resolves correctly. The fallback for aNone/absent source is now the same pointer, which is strictly better than the old genericDEFAULT_TRUNCATE_NOTICE. - No consumer loses the path:
Skill.source/SkillInfo.sourceare unchanged; the only runtime path disclosure (invoke_skill's location footer for bundledscripts//references/) still works and is intentionally scoped to post-invocation output. The legacy generic notice never contained a path either, so nothing depended on the removed behavior. Nested third-party skills (AGENTS.md/CLAUDE.md) never set a description, so they are unaffected. - Regression evidence: the new test
test_loaded_long_description_points_at_invoke_skill_not_pathexercises the realSkill.load()path (frontmatter → Pydantic validation, no mocks). I ran it against a detachedmaincheckout — it fails there exactly as claimed (path in prompt, noinvoke_skillpointer) — and it passes on this head. - Tests:
uv run pytest tests/sdk/skills tests/sdk/context -q-> 809 passed on the head, matching the PR description. No tracked files were modified during review. - Compatibility: the field-description edit is metadata-only per the repo's API-breakage policy; no
Field(default=...)change, no persisted-settings shape change, no REST/OpenAPI impact.
CI note (not a code finding): the "PR Description Check" on this head fails because umbrella issue #6660 (opened 2026-11-09) carries neither ready-for-dev nor a pre-rollout creation date; the direct fix target #6644 does have ready-for-dev. That is a process gate for the maintainer and does not reflect on the change itself.
✅ APPROVED
all-hands-bot
requested review from
VascoSch92
and removed request for
VascoSch92
November 9, 2026 09:33
VascoSch92
approved these changes
Nov 11, 2026
VascoSch92
enabled auto-merge (squash)
November 11, 2026 11:06
1 of 5 tasks
enyst
added a commit
that referenced
this pull request
Nov 12, 2026
- F25.long-description: a long skill description is cut with an invoke_skill pointer and no file path (#6664). - F26.conversation-resume-disabled drives the MCP half: a disabled ambient plugin's MCP server is dropped on resume (#5756). - F27.tool-schema-keywords: known bug #6766, reproduced through the server; F27 owns tool/schema.py; F27.import-modules uses LiteLLM's local cost map under env -i (#6749). - F31.crash-tool-call checks recovery_reason and classification (#6778). - F34.manager-batch-over-limit: the TypeScript client splits more than 99 ids into batches (#6771). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013ArwwNZe7p1P7oMgnFNYcy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HUMAN:
This PR proposes a fix for a bug uncovered during the first full agentic run of
verify-sdk.AGENT:
I'm an AI agent (Claude Code) helping Engel Nyst (@enyst) with project maintenance.
Requested by Engel · project thread
Decision needed
The load-time truncation notice used to name the skill's file on purpose (#2395, March), before
invoke_skillexisted. Since #2835 (April),to_prompt()leaves the location out so the agent loads skills throughinvoke_skill, and its tests say so (test_to_prompt_truncation_points_at_invoke_skill_not_source). The two behaviors conflict for any skill loaded from disk.Skill.descriptionnames the skill forinvoke_skilland never the path. Two tests from fix: truncate long skill descriptions instead of raising errors (#2394) #2395 are updated to match.Skill.description(for UIs or logs that show it) and haveto_prompt()replace that notice with its owninvoke_skillpointer. This keeps the path out of the prompt but leaves two different descriptions in play.Why
Skilltruncates a description over 1024 characters whenSKILL.mdis loaded, with... You can view the complete skill content at /abs/path/.agents/skills/<name>/SKILL.md.. Because the truncated description is already within the limit,to_prompt()then adds nothing, so<available_skills>carried the absolute path and noinvoke_skillpointer.Summary
Skill._DESCRIPTION_TRUNCATE_NOTICEnow reads... Call invoke_skill(name="<name>") to load the full skill.; it is used with or without asource.S07.available-skills-promptis updated.Issue Number
Fixes #6644 (umbrella #6660)
How to Test
test_loaded_long_description_points_at_invoke_skill_not_pathloads a realSKILL.mdwith a 2000-character description and checks the prompt has theinvoke_skillpointer and no path. It fails onmain.tests/sdk/skillsandtests/sdk/context: 809 passed.longdesc_points_to_invoke_skilltrue,longdesc_leaks_locationfalse.Video/Screenshots
Not applicable.
Type
Notes
Cross-repo dependencies: none.
Generated by Claude Code
🐳 Agent Server images for this PR — GHCR package, pull/run commands, and all pushed tags (click to expand)
• GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server
Variants & Base Images
eclipse-temurin:17-jdkpython-node-runtimepython-node-runtimepython-node-runtimegolang:1.21-bookwormPull (multi-arch manifest)
# Each variant is a multi-arch manifest supporting both amd64 and arm64 docker pull ghcr.io/openhands/agent-server:26c3908-pythonRun
All tags pushed for this build
About Multi-Architecture Support
26c3908-python) is a multi-arch manifest supporting both amd64 and arm6426c3908-python-amd64) are also available if needed