Skip to content

fix(harness): clarify built-in tool and subagent prompt contracts - #3694

Merged
jujn merged 1 commit into
agentscope-ai:mainfrom
Buktal:codex/harness-tool-delegation-guidance
Oct 21, 2026
Merged

jujn merged 1 commit into
agentscope-ai:mainfrom
Buktal:codex/harness-tool-delegation-guidance

Conversation

@Buktal

@Buktal Buktal commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

AgentScope-Java Version

2.1.0-SNAPSHOT

Description

Refs #3690. Independent PR 4/4: built-in tool and delegation instructions.

Summary

Give generic Harness agents the file-edit recovery instructions currently duplicated in the coding-agent prompt. File descriptions state zero-based pagination, create-only writes and exact text replacement after line-ending normalization. Remove the redundant example instructions and clarify its project-convention wording.

built-in tool description: file semantics + recovery steps
subagent prompt: identity + evidence + final delivery
spawn/send description: parent-context boundary + persistent history + follow-ups

Use the existing general-purpose identity constant, require conclusions in the child's final message and clarify asynchronous waiting. Permission-denial guidance allows normal task steering. Tool execution and permission checks are unchanged.

Evidence

  • Before: the general-purpose factory passes a null base prompt, and shared file-tool descriptions omit the example's recovery guidance.
    After: prompt composition and delegation-contract tests check identity, persistent history and supported follow-ups; existing permission, plan-mode, persistent-key and filesystem tests exercise the unchanged execution paths.
  • Independent branch validation: mvn -B -T1 -pl agentscope-harness -am test spotless:check passed; 1,286 Harness tests, 0 failures/errors, 18 skipped; 2,742 Core tests, 0 failures/errors, 8 skipped.
  • After the final line-ending wording correction, 45 targeted tool, permission, plan-mode and prompt tests plus Spotless passed.
  • These checks establish prompt assembly and implementation consistency; no claim of measured model task-success improvement is made.

Merge Danger

Door: two-way. Prompt-only changes and factory identity wiring can be reverted without a state migration.

Blast Radius: Harness. Built-in tool/delegation instructions and the coding-agent example prompt change.

Checklist

  • Code has been formatted with mvn spotless:apply
  • Relevant module tests and Spotless pass on this independent branch
  • Javadoc comments follow project conventions
  • The affected coding-agent example is updated
  • Code is ready for review

@jujn
jujn merged commit d12c638 into agentscope-ai:main Oct 21, 2026
4 checks passed
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