Skip to content

fix(shell-execute): optimize working_directory parameter and tool usage hints#2107

Open
chcodex wants to merge 3 commits into
agentscope-ai:mainfrom
chcodex:fix/shell-tool-optimize
Open

fix(shell-execute): optimize working_directory parameter and tool usage hints#2107
chcodex wants to merge 3 commits into
agentscope-ai:mainfrom
chcodex:fix/shell-tool-optimize

Conversation

@chcodex

@chcodex chcodex commented Jul 10, 2026

Copy link
Copy Markdown

AgentScope-Java Version

Based on upstream/main

Description

Three optimizations for ShellExecuteTool:

  1. refactor(tool): Mark working_directory parameter as non-required (required = false)
  2. fix(agent): Improve workingDirectory parameter description
  3. docs(shell-execute): Add prompt suggesting llm prefer special tools (read_file, write_file, etc.) over shell commands when applicable

How to Test

  • Verify working_directory parameter is non-required
  • Verify parameter descriptions are clear
  • Verify shell tool prompt message is correct

Checklist

  • Code has been formatted with mvn spotless:apply
  • All tests are passing (mvn test)
  • Javadoc comments are complete and follow project conventions
  • Related documentation has been updated (e.g. links, examples, etc.)
  • Code is ready for review

@chcodex chcodex requested a review from a team July 10, 2026 14:46
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@oss-maintainer oss-maintainer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. Trivial change, looks good.


Automated review by github-manager-bot

@AgentScopeJavaBot AgentScopeJavaBot added bug Something isn't working area/harness agentscope-harness (test/runtime support) labels Jul 11, 2026

@AgentScopeJavaBot AgentScopeJavaBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🤖 AI Review

Optimizes ShellExecuteTool working_directory parameter and adds LLM usage hints. Small focused change. Suggestion: make timeout also optional for consistency.

(inline comments could not be attached — line numbers fell outside PR hunks. See archived report.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/harness agentscope-harness (test/runtime support) bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants