How to Interpret the Output of DeepSeek-Reasonix: Understanding Message Flows and Tool Calls

DeepSeek-Reasonix output consists of a deterministic sequence of messages mixing plain text with structured tool calls, where the final assistant response is always generated after all tool outputs have been incorporated into the context.

DeepSeek-Reasonix is a coding agent that produces transcripts blending chat text with executable tool calls. Learning how to interpret the output of DeepSeek-Reasonix requires understanding its internal message schema, defined in internal/provider/provider.go, and how the engine sequences system prompts, user inputs, tool executions, and final responses.

Understanding the Message Types in DeepSeek-Reasonix

The Reasonix engine processes six distinct message types, each generated by specific components within the esengine/DeepSeek-Reasonix repository.

System Prompts and Configuration

The system prompt is injected at the start of every session in internal/config/render.go. This message remains hidden in the UI but prefixes the model context using fmt.Fprintf to set the output_style parameter. The prompt establishes the base persona and instructions that govern all subsequent interactions.

User Inputs and Assistant Replies

User messages are parsed in internal/cli/cli.go and structured according to the Message struct defined in internal/provider/provider.go. This struct uses role constants including RoleAssistant for model-generated content. Assistant replies appear as plain text in the interface, potentially containing slash commands (/) or at-references (@).

Tool Calls and Tool Outputs

When the model requires external execution, it emits a Chunk struct with Type set to tool call variants. These appear as collapsed blocks like ▸ Bash(git status) in the TUI. The actual execution occurs in internal/tool/builtin/, returning results as tool messages that feed back into the conversation before the model resumes generation.

How the Reasonix Engine Processes Messages

The message flow follows a strict deterministic sequence: User → Assistant → Tool → Assistant. When the model emits a tool_calls field (represented as ChunkToolCall in internal/provider/provider.go), the engine pauses the LLM stream, executes the requested tool, and appends the result as a tool message. Only after incorporating all pending tool outputs does the model generate the final assistant response.

This pause-resume cycle ensures that the final answer you read has access to the exact shell output or file contents retrieved by the tool call. The internal/provider/provider.go file defines the Chunk struct that carries Type information distinguishing between content chunks and tool invocations.

The interface renders these messages differently depending on the view mode and user interaction.

Collapsed and Expanded Views

Tool calls render as collapsed blocks by default, showing only the command signature (e.g., ▸ Bash(git status)). You can expand these to view the full shell output using keyboard shortcuts defined in docs/GUIDE.md lines 184-188. The rendering logic for these toggle states appears in internal/cli/chat_tui.go (lines 3342-3344).

Keyboard Shortcuts

In the desktop UI, press Ctrl+B to toggle tool output visibility. In the CLI version, use Ctrl+Shift+B. These shortcuts control the display of shell-output blocks marked with the "▸" indicator, allowing you to inspect the raw data provided to the model before it generated its final response.

Customizing Output with Persona Styles

The persona or tone of responses is controlled through the output style system.

Available Styles and Configuration

Available styles include default, formal, and concise. List them using the /output-style slash command, implemented in internal/cli/cli.go at line 640. Select a style by setting agent.output_style in your reasonix.toml configuration file.

How Styles Affect the System Prompt

The style merging logic resides in internal/outputstyle/outputstyle.go. The Resolve function locates the style definition, while Apply (line 131) appends the persona text to the system prompt. This modifies the tone of the final assistant message without changing the underlying tool execution logic.

Code Examples for Programmatic Interpretation

Understanding the output structure enables programmatic interaction with the Reasonix engine.

CLI Session Example


# Run Reasonix on a project

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

# The UI shows:

#   ▸ Bash(git status)          ← tool call

#   ▸ Bash output …             ← tool output (collapsed by default)

#   Assistant: I added a new file …   ← final answer

Listing Output Styles

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

Configure in reasonix.toml:

[agent]
output_style = "formal"

Programmatic Style Application

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))
    }
}

Summary

  • DeepSeek-Reasonix output follows a deterministic sequence of User → Assistant → Tool → Assistant messages defined in internal/provider/provider.go.
  • Tool calls appear as collapsed blocks (e.g., ▸ Bash(git status)) that you can expand using Ctrl+B (desktop) or Ctrl+Shift+B (CLI) per docs/GUIDE.md.
  • The final assistant message always appears after all tool outputs have been executed and fed back into the context.
  • Output styles modify the system prompt via internal/outputstyle/outputstyle.go but do not affect tool execution semantics.
  • The Message and Chunk structs in internal/provider/provider.go provide the formal schema for parsing transcripts programmatically.

Frequently Asked Questions

What does the "▸" symbol mean in DeepSeek-Reasonix output?

The "▸" symbol indicates a collapsed tool call or its resulting output. According to internal/cli/chat_tui.go, this marker represents an executable command (like Bash(git status)) that the model requested. Expanding the block reveals the exact shell output returned to the model before it generated its final response.

How do I expand collapsed tool calls in the Reasonix CLI?

Press Ctrl+Shift+B in the CLI or Ctrl+B in the desktop UI to toggle the visibility of tool outputs. This keyboard shortcut, documented in docs/GUIDE.md lines 184-188, reveals the raw execution results that the model used to formulate its answer.

Where is the output style configuration stored in DeepSeek-Reasonix?

Output styles are configured in the reasonix.toml file under the [agent] section using the output_style key. The /output-style command in internal/cli/cli.go (line 640) lists available options, while internal/outputstyle/outputstyle.go handles the resolution and application of these personas to the system prompt.

How does DeepSeek-Reasonix handle the sequence of tool execution?

The engine implements a pause-resume cycle: when the model emits a ChunkToolCall (defined in internal/provider/provider.go), the LLM stream pauses, the tool executes in internal/tool/builtin/, and the result returns as a tool message. The model only resumes generating the final assistant response after all tool outputs have been incorporated, ensuring the answer reflects the actual execution results.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →