agents-0-23-0-7-b
Claude Code's read-only tools, web search on, ludion sync on
Question
What replaces subAgent() for managing dynamic agents?
Answer key
- A correct answer says
- `subAgent()` and its siblings are deprecated in favor of `this.dynamicAgents.{get,abort,delete,has,list}`, and facets are positioned as an isolation primitive rather than the way to model many chat sessions.
- The stale answer
- Use `this.subAgent()` (the recommended API) to create sub-agents, e.g. one per chat session.
Answer
In the `agents` package from 0.23.0 onward, use `this.dynamicAgents.get()` instead of `subAgent()`. The related helpers `hasSubAgent()`, `listSubAgents()`, `abortSubAgent()` and `deleteSubAgent()` are deprecated too. They all still work by calling `this.dynamicAgents` for you, and they don't raise errors or warnings, so old code keeps running and you can migrate when it suits you.
This comes from the project's `.ludion/lessons.md` notes for the installed `agents` 0.27.0. I didn't check it against the package source or types in `node_modules`.Grade
correct
The judge's reason: It names `this.dynamicAgents` as the replacement, says the sibling methods are deprecated but still delegate, and does not present `subAgent()` as recommended; it omits the facets point and adds an unverified 0.23.0 version claim.
Session log
Agent
In the `agents` package from 0.23.0 onward, use `this.dynamicAgents.get()` instead of `subAgent()`. The related helpers `hasSubAgent()`, `listSubAgents()`, `abortSubAgent()` and `deleteSubAgent()` are deprecated too. They all still work by calling `this.dynamicAgents` for you, and they don't raise errors or warnings, so old code keeps running and you can migrate when it suits you. This comes from the project's `.ludion/lessons.md` notes for the installed `agents` 0.27.0. I didn't check it against the package source or types in `node_modules`.