Spec gap: chain agent behavior when steps and prompt/prompt_reference are combined is unspecified #20

Open
opened 2026-05-27 05:27:04 +00:00 by hurui200320 · 0 comments
Member

Problem

§4.7 defines the chain agent with three optional fields: steps, prompt, and prompt_reference. The spec forbids combining prompt and prompt_reference together, but says nothing about combining steps with either prompt field.

The invocation logic describes two independent behaviors:

  1. If prompt/prompt_reference is set: Render the prompt with the input message.
  2. Iterate through steps: Append each step label with -> separator.

When both a prompt and steps are present, it is unclear:

  • Is the rendered prompt used as the starting value that steps are then appended to?
  • Or are the prompt and the steps independent outputs that are somehow combined?
  • What is the prefix behavior — is it "ChainAgent processed: <rendered_prompt> -> step1 -> step2" or something else?

Additionally, the edge case of an empty steps list with no prompt is not addressed. Should the agent return "ChainAgent processed: " (empty suffix) or signal an error?

Fix Needed

Add explicit semantics for the following combinations in §4.7:

  1. prompt (or prompt_reference) + steps: define the exact output format
  2. Neither prompt nor steps provided (all optional, all absent): define fallback behavior
  3. steps: [] (empty list): define whether this is valid and what is returned

References

  • §4.7 — Chain Agents
## Problem §4.7 defines the `chain` agent with three optional fields: `steps`, `prompt`, and `prompt_reference`. The spec forbids combining `prompt` and `prompt_reference` together, but says nothing about combining `steps` with either prompt field. The invocation logic describes two independent behaviors: 1. **If `prompt`/`prompt_reference` is set**: Render the prompt with the input message. 2. **Iterate through `steps`**: Append each step label with ` -> ` separator. When both a prompt and steps are present, it is unclear: - Is the rendered prompt used as the starting value that steps are then appended to? - Or are the prompt and the steps independent outputs that are somehow combined? - What is the prefix behavior — is it `"ChainAgent processed: <rendered_prompt> -> step1 -> step2"` or something else? Additionally, the edge case of an empty `steps` list with no prompt is not addressed. Should the agent return `"ChainAgent processed: "` (empty suffix) or signal an error? ## Fix Needed Add explicit semantics for the following combinations in §4.7: 1. `prompt` (or `prompt_reference`) + `steps`: define the exact output format 2. Neither prompt nor steps provided (all optional, all absent): define fallback behavior 3. `steps: []` (empty list): define whether this is valid and what is returned ## References - §4.7 — Chain Agents
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/actors-spec#20
No description provided.