chore: handle output_style field in init message (v2.1.81) #248

Closed
opened 2026-03-23 14:22:51 -07:00 by hikari · 1 comment
Owner

Context

Claude Code v2.1.81 stream-json init (system/init) messages now include an "output_style" field:

{ "type": "system", "subtype": "init", ..., "output_style": "default" }

Why This Matters

The output_style field may indicate how Claude Code is formatting its output (e.g. "default" vs other styles). This could be relevant if Claude Code ever switches output styles mid-session, which might affect how we parse assistant message content.

Tasks

  • Add output_style to the init message type in src-tauri/src/types.rs
  • Determine what values output_style can take and whether any affect our parsing
  • Add tests for the updated type definition

References

  • Claude Code v2.1.81 stream-json sample output
  • src-tauri/src/types.rs

This issue was created with help from Hikari~ 🌸

## Context Claude Code v2.1.81 stream-json `init` (system/init) messages now include an `"output_style"` field: ```json { "type": "system", "subtype": "init", ..., "output_style": "default" } ``` ## Why This Matters The `output_style` field may indicate how Claude Code is formatting its output (e.g. `"default"` vs other styles). This could be relevant if Claude Code ever switches output styles mid-session, which might affect how we parse assistant message content. ## Tasks - [ ] Add `output_style` to the `init` message type in `src-tauri/src/types.rs` - [ ] Determine what values `output_style` can take and whether any affect our parsing - [ ] Add tests for the updated type definition ## References - Claude Code v2.1.81 stream-json sample output - `src-tauri/src/types.rs` ✨ This issue was created with help from Hikari~ 🌸
Author
Owner

Resolved in PR #263. Added output_style: Option<String> to ClaudeMessage::System in types.rs with #[serde(default)]. The existing .. in the System match arm in wsl_bridge.rs silently accepts the new field with no further changes needed. Tests included.

Resolved in PR #263. Added `output_style: Option<String>` to `ClaudeMessage::System` in `types.rs` with `#[serde(default)]`. The existing `..` in the System match arm in `wsl_bridge.rs` silently accepts the new field with no further changes needed. Tests included. ✨
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nhcarrigan/hikari-desktop#248