Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions fern/squads/handoff/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,43 @@ attention to these handoffs in your conversation with the user.
- Test variable extraction schemas with sample data
- Validate that assistant names exist in the same squad
- Verify rejection plan conditions use correct regex syntax (remember to double-escape `\\` in JSON)

### Destination assistant ignores part of its system prompt

If a destination assistant has more than one system message in `model.messages`, only the first system message is sent to the model after a handoff. Any additional system messages are dropped. The same assistant follows all of its instructions when you call it directly.

To fix this, combine all system instructions into a single system message. Use the [`model`](/api-reference/assistants/update#request.body.model) field of the [Update Assistant](/api-reference/assistants/update) endpoint to replace `model.messages` with one system message. Include the full `model` object in your request, since the update replaces the existing `model` configuration.

For example, this configuration loses the second system message after a handoff:

```json
{
"model": {
"messages": [
{
"role": "system",
"content": "You are a support agent for Acme."
},
{
"role": "system",
"content": "Only discuss billing questions."
}
]
}
}
```

Combine the instructions into one system message instead:

```json
{
"model": {
"messages": [
{
"role": "system",
"content": "You are a support agent for Acme.\n\nOnly discuss billing questions."
}
]
}
}
```
Loading