diff --git a/fern/squads/handoff/troubleshooting.mdx b/fern/squads/handoff/troubleshooting.mdx index 96d50fdb3..327d29265 100644 --- a/fern/squads/handoff/troubleshooting.mdx +++ b/fern/squads/handoff/troubleshooting.mdx @@ -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." + } + ] + } +} +```