Skip to content

[dotnet-port-api] Port skill detailed script errors option - #395

Merged
gdams merged 3 commits into
mainfrom
dotnet-port-api-skill-detailed-errors-45c145392d913517
Jun 30, 2026
Merged

[dotnet-port-api] Port skill detailed script errors option#395
gdams merged 3 commits into
mainfrom
dotnet-port-api-skill-detailed-errors-45c145392d913517

Conversation

@michelle-clayton-work

Copy link
Copy Markdown
Contributor

Add ContextProviderOptions.IncludeDetailedErrors for skills so script execution failures can opt in to model-visible error details while propagating runner errors by default.

Add ContextProviderOptions.IncludeDetailedErrors for skills so script execution failures can opt in to model-visible error details while propagating runner errors by default.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 29, 2026 22:07
@michelle-clayton-work
michelle-clayton-work requested a review from a team as a code owner June 29, 2026 22:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR ports the .NET “detailed skill script errors” behavior into the Go skills context provider by introducing an opt-in flag that controls whether script execution failures are exposed to the model vs. propagated as tool-call errors to the caller/middleware.

Changes:

  • Added skills.ContextProviderOptions.IncludeDetailedErrors to control model-visible script execution error details.
  • Updated run_skill_script tool behavior to propagate script runner errors by default (unless detailed errors are enabled).
  • Added provider tests covering default error propagation and opt-in detailed error strings; updated the .NET/Go feature comparison doc.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
agent/skills/provider.go Adds IncludeDetailedErrors and changes run_skill_script to return (any, error) so runner errors can propagate by default.
agent/skills/provider_test.go Adds tests for default propagation of script-runner errors and opt-in detailed error output.
docs/dotnet-go-sdk-feature-comparison.md Documents the new Go option and its parity with the .NET API.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread agent/skills/provider.go
Comment thread agent/skills/provider_test.go
@github-actions

This comment has been minimized.

@michelle-clayton-work

Copy link
Copy Markdown
Contributor Author

@copilot address the PR feedback

Co-authored-by: michelle-clayton-work <262183035+michelle-clayton-work@users.noreply.github.com>

Copilot AI commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

@copilot address the PR feedback

Addressed in commit 14737aa. I updated run_skill_script so script.Run == nil now propagates an error by default and only returns model-visible details when IncludeDetailedErrors is enabled, and added tests for both nil-runner paths.

@github-actions

Copy link
Copy Markdown
Contributor

Cross-repo consistency review

Result: ✅ Aligned with .NET — no parity issues found.

.NET parity check

ContextProviderOptions.IncludeDetailedErrors (Go) matches AgentSkillsProviderOptions.IncludeDetailedErrors (.NET, dotnet/src/Microsoft.Agents.AI/Skills/AgentSkillsProviderOptions.cs) across every relevant dimension:

Dimension .NET Go (this PR)
Option name IncludeDetailedErrors IncludeDetailedErrors
Default false (propagate exception to caller) false (return error, propagate to middleware)
Opt-in behaviour Return "Error: Failed to execute script '{script}' from skill '{skill}'. Exception: {message}" Return fmt.Sprintf("Error: Failed to execute script '%s' from skill '%s'. Exception: %s", ...)
Security note Documented (prompt-injection risk from untrusted scripts) Documented identically

Python parity check

Python's SkillsProvider (python/packages/core/agent_framework/_skills.py) does not expose an equivalent option — it always re-raises script exceptions, delegating error-detail policy entirely to the function-invocation pipeline. This is a known Python-side gap, not caused by this PR. The docs update correctly scopes the parity claim to .NET only.

Generated by Go API Consistency Review Agent for #395 · 232.9 AIC · ⌖ 12.7 AIC · ⊞ 27.1K ·

@gdams
gdams added this pull request to the merge queue Jun 30, 2026
@gdams gdams linked an issue Jun 30, 2026 that may be closed by this pull request
Merged via the queue into main with commit caf6283 Jun 30, 2026
17 checks passed
@gdams
gdams deleted the dotnet-port-api-skill-detailed-errors-45c145392d913517 branch June 30, 2026 07:33
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.

[dotnet-port-api] Port skill detailed script errors option

4 participants