# How to Interpret Results from DeepSeek-Reasonix: Message Schema and Tool Output Guide

> Learn to interpret DeepSeek-Reasonix results by understanding its message schema and tool output. Decode user, assistant, tool, and shell execution messages for clear insights.

- Repository: [YHH/DeepSeek-Reasonix](https://github.com/esengine/DeepSeek-Reasonix)
- Tags: how-to-guide
- Published: 2026-06-26

---

**DeepSeek-Reasonix transcripts follow a deterministic sequence of User, Assistant, Tool, and Tool-output messages, where collapsed tool calls expand to reveal shell execution results, culminating in a final Assistant response that incorporates all tool outputs.**

DeepSeek-Reasonix functions as a coding agent that interleaves conversational text with structured tool execution. When you run the `reasonix` CLI or desktop application, the interface displays a deterministic sequence of messages defined in the core engine. Understanding how to interpret results from DeepSeek-Reasonix—by reading the message schema implemented across [`internal/provider/provider.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/provider/provider.go) and [`internal/cli/chat_tui.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/cli/chat_tui.go)—allows you to accurately distinguish between tool calls, execution outputs, and final synthesized answers.

## Understanding the DeepSeek-Reasonix Message Architecture

Every interaction follows a strict schema defined in the provider layer. The message flow progresses through distinct roles that determine how content is rendered and processed.

### Core Message Types and Roles

The foundation of result interpretation lies in the `Message` struct defined in [`internal/provider/provider.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/provider/provider.go). This struct categorizes communication into specific roles:

- **User input** – Parsed in [`internal/cli/cli.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/cli/cli.go), representing the text you type into the composer line.
- **Assistant replies** – Streamed from the LLM provider (e.g., `internal/provider/openai/...`), identified by the `RoleAssistant` constant.
- **Tool calls** – Emitted by the model as `ChunkToolCall` structures within the `Chunk` struct, indicating the model requires external execution (e.g., `Bash(git status)`).
- **Tool output** – Executed by implementations in `internal/tool/builtin/...` and returned as distinct messages, rendered as shell-output blocks in the interface.

### System Prompt Injection

Hidden from the visible transcript, the **system prompt** is injected at the start of each session in [`internal/config/render.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/config/render.go). This prompt establishes the base persona and output constraints. When you configure an output style via [`reasonix.toml`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/reasonix.toml) or the `/output-style` command, the style text is merged into this system prompt before any user interaction begins.

## Navigating the Transcript Interface

The UI renders the message sequence as a navigable transcript where tool execution exists between Assistant thought and final output.

### Collapsed Tool Calls and Shell Output

Tool calls appear as **collapsed** blocks indicated by the `▸` marker (e.g., `▸ Bash(git status)`). These blocks are implemented in [`internal/cli/chat_tui.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/cli/chat_tui.go) (lines 3342-3344) and represent the model's request to execute a specific command or function. 

When expanded, these blocks reveal the **tool output**—the actual shell results or function returns fed back to the model. The engine pauses the LLM stream during execution, runs the tool via `internal/tool/builtin/...`, then resumes the conversation by injecting the result as a new message before the final Assistant response.

### Keyboard Shortcuts for Inspection

You can toggle the visibility of tool output blocks using keyboard shortcuts defined in [`docs/GUIDE.md`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/docs/GUIDE.md) (lines 184-188):

- **Ctrl+B** – Toggle expanded/collapsed view in the desktop UI.
- **Ctrl+Shift+B** – Toggle view in the CLI interface.

These shortcuts allow you to inspect the exact data returned to the model before it generates the final answer.

## Customizing Results with Output Styles

The **output style** modifies how the final Assistant message is phrased by altering the system prompt context.

### Listing and Selecting Styles

You can list available styles using the `/output-style` slash command, implemented in [`internal/cli/cli.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/cli/cli.go) (line 640). The available styles include:

- **default** – Standard conversational tone.
- **formal** – Structured, professional wording.
- **concise** – Brief, direct replies.

Configure your preferred style in [`reasonix.toml`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/reasonix.toml):

```toml
[agent]
output_style = "formal"

```

### Style Resolution Logic

The merging logic resides in [`internal/outputstyle/outputstyle.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/outputstyle/outputstyle.go). The `Resolve` function locates the style definition, while `Apply` (line 131) appends the style instructions to the system prompt string. This modified prompt influences only the final Assistant turn, ensuring tool calls remain deterministic while the concluding explanation matches your selected persona.

## Practical Examples for Interpreting Output

### Example 1: Reading a Typical Session

When you run a goal-oriented task, the transcript follows this visible pattern:

```bash
$ reasonix
> /goal "Add a new HTTP endpoint"

```

The UI displays:
1. `▸ Bash(git status)` – A collapsed tool call.
2. `▸ Bash output …` – The expanded shell result (toggle with `Ctrl+B`).
3. `Assistant: I added a new file …` – The final answer incorporating the tool result.

### Example 2: Listing Output Styles

To view available personas that affect result interpretation:

```bash
$ reasonix /output-style
output styles:
  * default   – no persona
  * formal    – more formal wording
  * concise   – short replies

```

### Example 3: Programmatic Style Application

To understand how styles modify the system context programmatically:

```go
package main

import (
    "fmt"
    "reasonix/internal/outputstyle"
)

func main() {
    st, ok := outputstyle.Resolve("formal", outputstyle.Dirs())
    if ok {
        sysPrompt := "You are a coding assistant."
        fmt.Println(outputstyle.Apply(sysPrompt, st))
    }
}

```

*This demonstrates how `outputstyle.Apply` transforms the base prompt before the model generates results.*

## Summary

- **DeepSeek-Reasonix** structures output as a deterministic sequence of User, Assistant, Tool, and Tool-output messages defined in [`internal/provider/provider.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/provider/provider.go).
- **Tool calls** appear as collapsed `▸` blocks (handled in [`internal/cli/chat_tui.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/cli/chat_tui.go)) that you can expand to inspect raw shell output.
- **Final Assistant messages** are guaranteed to appear only after all tool outputs have been executed and fed back into the context.
- **Output styles** modify result tone by appending instructions to the system prompt via [`internal/outputstyle/outputstyle.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/outputstyle/outputstyle.go), without affecting the underlying tool execution logic.
- Use **Ctrl+B** (desktop) or **Ctrl+Shift+B** (CLI) to toggle visibility of tool execution details.

## Frequently Asked Questions

### What do the collapsed ▸ blocks represent in DeepSeek-Reasonix?

The `▸` markers represent **tool calls**—requests from the model to execute external commands or functions. According to the `Chunk` struct in [`internal/provider/provider.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/provider/provider.go), these are `ChunkToolCall` instances. When expanded (using `Ctrl+B` or `Ctrl+Shift+B`), they reveal the exact shell output or function results returned to the model before it generates the final response.

### How does the model incorporate tool output into the final results?

The engine implements a pause-and-resume flow specified in [`docs/SPEC.md`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/docs/SPEC.md). When the model emits a tool call, the stream pauses, the tool executes via `internal/tool/builtin/...`, and the result is injected as a `RoleTool` message. The model then resumes generating the **final Assistant message**, which necessarily incorporates the tool output into its reasoning and response.

### Where can I configure the output style to change how results are phrased?

You can configure output styles in two ways: interactively via the `/output-style` command (implemented in [`internal/cli/cli.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/cli/cli.go) line 640) or permanently in [`reasonix.toml`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/reasonix.toml) under the `[agent]` section with the `output_style` key. The resolution and application logic lives in [`internal/outputstyle/outputstyle.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/outputstyle/outputstyle.go), where the `Apply` function (line 131) merges the style into the system prompt.

### What is the message flow sequence in DeepSeek-Reasonix?

The deterministic sequence is: **System prompt** (injected from [`internal/config/render.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/config/render.go)) → **User input** → **Assistant reply** (possibly containing tool calls) → **Tool execution** → **Tool output** → **Final Assistant message**. This schema, defined across [`internal/provider/provider.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/provider/provider.go) and documented in [`docs/SPEC.md`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/docs/SPEC.md), ensures that every final answer accounts for all intermediate tool results.