Skip to content

bug(gateway): cron job outputs injected as assistant role, breaking message alternation #2221

@teknium1

Description

@teknium1

Cron job outputs in gateway sessions are appended as assistant role messages, creating two consecutive assistant messages. This violates the expected user/assistant alternation.

Found during session audit — JSONL session 20260319_052206_eee156a5 has messages 231-232 both as assistant role (agent response followed by cron report).

Cron outputs should be injected as a user or system message to maintain proper alternation. Two consecutive assistant messages can confuse models and cause API rejections on strict providers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions