Skip to content

fix(harness): align subagent prompts with lifecycle and delivery - #3860

Merged
Buktal merged 1 commit into
agentscope-ai:mainfrom
Buktal:codex/align-subagent-prompt-contract
Oct 30, 2026
Merged

Buktal merged 1 commit into
agentscope-ai:mainfrom
Buktal:codex/align-subagent-prompt-contract

Conversation

@Buktal

@Buktal Buktal commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

AgentScope-Java Version

2.1.0-SNAPSHOT

Summary

Align the parent and child subagent prompts with the existing lifecycle and delivery paths. Require self-contained tasks and final reports, distinguish observer events from delivered results, and keep EN/ZH documentation aligned.

- All subagents are ephemeral; the parent receives only the final text.
+ Each invocation delivers a final result; intermediate events serve observers.
+ Live local children retain history across sends; remote history depends on the backend.
+ Session persistence and later resumption depend on the declaration and backend.

Refs #3834 (slice 08). This shared tracking issue should remain open.

Evidence

  • Before: The prompts describe all subagents as ephemeral while also advertising persistent sessions and follow-up sends, and describe final text as the only information the parent receives despite the existing event forwarding path.
  • After: Local spawn/send tests verify that follow-ups see the first task and reply, and that a task-less spawn does not invoke the child. Prompt contract checks retain handle, timeout-promotion, push/wait, and stable-system guidance. These are offline contract/runtime fixtures, not model-quality measurements.

Validation on base 616ab47cc:

  • mvn -B -T1C verify: full reactor passed, including Spotless and all 9 tests in the three new classes; environment-dependent tests retain their existing skips.
  • cd docs; npm test: 13 passed.
  • cd docs; npm run validate: local checker (432 pages / 584 redirects) and Mintlify build passed.
  • git diff --cached --check: passed.
  • npm run broken-links previously reported 2,222 links across 328 files. That broad CLI report remains unresolved; the local link checker and build validation pass.

The initial clean verify on the older worktree base failed in MemorySearchToolTest.errorLookingMemoryIsData. The branch was then moved onto current main, which already contains the fix in #3856, and the full reactor rerun passed.

Merge Danger

Door: Two-way

Blast Radius: Harness

Changes prompt guidance, tests, and documentation only. Reuses the existing local conversation, remote task, final-result delivery, and observer-event mechanisms; adds no protocol or public API.

Checklist

  • Code formatting verified by Spotless
  • All enabled tests are passing (full mvn verify; existing environment-dependent skips retained)
  • Javadoc comments are complete and follow project conventions
  • Related EN/ZH documentation has been updated
  • Code is ready for review

@mintlify

mintlify Bot commented Oct 29, 2026

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit 92891b6.

Approve preview

@Buktal
Buktal merged commit 0d7e5d6 into agentscope-ai:main Oct 30, 2026
8 of 10 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