Skip to content

Conversation

@DerekStride
Copy link
Member

@DerekStride DerekStride commented Dec 19, 2025

What

While using the new ruby DSL executor I kept getting unparsed message logs printed to stdout when using the agent step. I've added those fields to the IGNORED list so they don't get logged anymore. I've also opened #681 to address similar issues be reintroducing a logger that outputs to stderr.

Logs

[WARNING] Unhandled data in Claude system message:
{
  "hook_name": "SessionStart:startup",
  "hook_event": "SessionStart",
  "stdout": "",
  "stderr": "",
  "exit_code": 0
}
[FULL MESSAGE: system]
#<Roast::DSL::Cogs::Agent::Providers::Claude::Messages::SystemMessage:0x00000001428b9118
 @message=nil,
 @model=nil,
 @session_id="3380d510-8ad4-471e-8550-98d0a3946d70",
 @type=:system,
 @unparsed={hook_name: "SessionStart:startup", hook_event: "SessionStart", stdout: "", stderr: "", exit_code: 0}>

@DerekStride DerekStride self-assigned this Dec 19, 2025
@DerekStride DerekStride changed the title Fix unparsed fix: better handle unparsed agent system messages Dec 19, 2025
Copy link
Contributor

@mathiusj mathiusj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DerekStride you'll want to rebase this just to see where you're at, as a lot of files have been cleaned up as we prep for v1.0 of Roast.

When Claude Code emits system messages with hook data (e.g., SessionStart),
the hook-related fields (hook_name, hook_event, stdout, stderr, exit_code)
were being flagged as unhandled data. These fields are expected but don't
need to be processed, so add them to IGNORED_FIELDS.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@DerekStride DerekStride requested a review from mathiusj January 21, 2026 20:46
@DerekStride DerekStride changed the title fix: better handle unparsed agent system messages fix: handle unparsed agent system messages Jan 21, 2026
@DerekStride
Copy link
Member Author

@mathiusj I rebased & separated out the logging changes into #681

Copy link
Contributor

@mathiusj mathiusj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but would be good to have @juniper-shopify or @dersam weigh in on implications I'm unaware of, when adding these fields to ignored 🙏 it seems like this is just informational metadata so I think it's ok though!

Copy link
Contributor

@dersam dersam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dersam dersam merged commit 5446990 into main Jan 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants