What is Goal Mode in Reasonix and How Does AutoResearch Work?

Goal mode in Reasonix is an autonomous execution mode where the assistant works continuously until a task is completed, automatically upgrading long-horizon objectives to AutoResearch mode to persist state across turns and manage complex multi-phase work.

Reasonix, the open-source reasoning engine developed by esengine/DeepSeek-Reasonix, provides a specialized Goal mode designed for autonomous task completion. When users initiate this mode with the /goal command, the system treats the request as a discrete objective that persists across conversation turns. For complex, research-heavy objectives, Reasonix automatically activates AutoResearch, a runtime strategy that creates persistent project-local storage to track progress, findings, and attempted directions.

How Goal Mode Works in Reasonix

Goal mode transforms the assistant from a reactive chatbot into an autonomous agent that drives toward completion. When invoked via the /goal command, the system interprets the request as a durable objective rather than a single-turn query.

Activating Goal Mode with the /goal Command

Users trigger Goal mode by issuing the /goal command followed by the task description. The assistant then operates under specific constraints: it favors sensible defaults and only interrupts the user when truly blocked on a decision that requires human input. This behavior minimizes interruptions while maintaining user oversight for critical choices.

Status Markers and Turn Management

Every reply in Goal mode must terminate with a single status marker on its own line. According to the source code in internal/control/input.go at line 209, three markers govern the conversation flow:

  • [goal:continue] – Indicates the assistant is making progress and should proceed with the next turn
  • [goal:complete] – Signals that the objective has been achieved and the goal is finished
  • [goal:blocked:<short reason>] – Reports that the assistant cannot proceed without user input, providing a concise explanation

These markers enable the host system to manage the conversation lifecycle automatically, determining whether to persist the session or await user clarification.

AutoResearch Activation and Long-Horizon Goals

AutoResearch is not a standalone skill but rather a runtime behavior of Goal mode that activates when the system detects signals indicating complex, multi-phase work. The distinction between lightweight and long-horizon goals determines whether the system automatically enables this strategy.

Trigger Conditions for AutoResearch

The system evaluates user input for specific linguistic patterns and contextual clues to determine AutoResearch eligibility. According to the documentation in site/src/pages/docs.astro at line 225, the following conditions trigger automatic upgrading to AutoResearch:

  • Strong research signals: Phrases such as "keep researching", "debug until the root cause is clear", or "do not spin", along with repeated verification steps or explicit multi-phase work indicators, cause the host to upgrade the request to /goal --research or --auto-research
  • Explicit path creation: The presence of a .reasonix/autoresearch/<task-id>/ directory directly forces AutoResearch mode
  • Weak signals: Generic terms like "long term", "optimize", or "research this" do not automatically create durable task state, keeping the interaction in lightweight Goal mode

This design ensures that AutoResearch resources are allocated only for genuinely complex objectives requiring persistent state.

Persistent State and Artifact Storage

When AutoResearch activates, Reasonix creates a project-local directory under .reasonix/autoresearch/YYYYMMDD-HHMMSS-slug/ to maintain structured artifacts across turns. This persistence layer enables the assistant to recover context, pivot strategies when approaches stall, and audit completion against accumulated evidence.

The directory contains five critical files:

  • task_spec.md – The original specification and success criteria
  • progress.json – Overall progress summary and current phase
  • findings.jsonl – Incremental research findings appended as JSON lines
  • directions_tried.json – Record of attempted approaches and intentional pivots
  • iteration_log.jsonl – Detailed per-iteration log for debugging and audit trails

The implementation in internal/skill/skill_test.go at lines 580-584 explicitly tests that AutoResearch is not exposed as a separate skill, confirming its status as a Goal mode behavior.

Safety and Permission Controls

Even within AutoResearch mode, Reasonix maintains strict safety boundaries. Potentially destructive actions or operations requiring credentials still obey the standard permission gates: deny → ask → allow. The host configuration determines the approval level for read-only versus write-capable tools, with read operations potentially auto-approved while write operations fall back to "ask" or require explicit "auto-approve" configuration.

Code Examples and Usage Patterns

The following examples demonstrate how to invoke Goal mode and control AutoResearch behavior from the command line. The desktop frontend processes these flags in desktop/frontend/src/lib/bridge.ts at line 79 and App.tsx, ensuring consistent behavior between the TUI and GUI interfaces.


# Simple, lightweight goal – no auto-research persistence

reasonix /goal "Refactor the logging helper"

# Long-horizon goal – auto-research inferred automatically based on phrasing

reasonix /goal "Improve the overall performance of the query engine"

# Force auto-research explicitly for investigation tasks

reasonix /goal --research "Investigate why the cache layer thrashes under load"

# Force a lightweight goal, explicitly skipping auto-research

reasonix /goal --simple "Generate a summary of recent commits"

Summary

  • Goal mode transforms Reasonix into an autonomous agent that persists across turns until task completion, using mandatory status markers ([goal:continue], [goal:complete], [goal:blocked:]) to manage conversation flow.
  • AutoResearch is a runtime behavior of Goal mode (not a separate skill) that activates for long-horizon objectives, creating a .reasonix/autoresearch/ directory with structured JSON and Markdown artifacts to persist state.
  • Trigger phrases like "keep researching" or explicit paths force AutoResearch mode, while weak signals like "optimize" remain in lightweight Goal mode.
  • Safety permissions (deny → ask → allow) remain active even during autonomous operation, protecting against destructive actions.

Frequently Asked Questions

What is the difference between Goal mode and AutoResearch in Reasonix?

Goal mode is the foundational autonomous execution framework where the assistant works continuously until completing a task, marked by status indicators at the end of each turn. AutoResearch is a specialized runtime behavior within Goal mode that activates for complex, multi-phase objectives, creating persistent storage under .reasonix/autoresearch/ to track findings and progress across extended sessions. AutoResearch is not a separate skill but rather an automatic escalation of Goal mode when research-heavy signals are detected.

How do I force AutoResearch mode for a specific task?

You can explicitly enable AutoResearch by appending the --research or --auto-research flag to your /goal command, such as reasonix /goal --research "Analyze memory leak patterns". Alternatively, creating or referencing a path under .reasonix/autoresearch/<task-id>/ directly forces AutoResearch mode regardless of the linguistic analysis of your request.

What files does AutoResearch create and why?

AutoResearch generates five structured artifacts in a timestamped directory: task_spec.md (original requirements), progress.json (current status), findings.jsonl (incremental discoveries), directions_tried.json (attempted strategies), and iteration_log.jsonl (detailed audit trail). These files enable the assistant to maintain context across conversation turns, pivot when approaches fail, and provide evidence-based completion verification.

Does AutoResearch bypass safety permissions?

No. AutoResearch respects the same permission gates as standard Goal mode. Destructive operations and credential-requiring actions still trigger the deny → ask → allow workflow. The host may auto-approve read-only tools, but write-capable tools require explicit user approval or specific "auto-approve" configuration settings, ensuring autonomous operation does not compromise project safety.

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 →