How to Enable Verbose or Debug Modes for Inspecting Open Interpreter Internals
Set interpreter.verbose = True or interpreter.debug = True using CLI flags (--verbose, --debug), magic commands (%verbose, %debug), or direct attribute assignment to expose detailed logs of LLM calls, message history, and computer-tool executions.
Open Interpreter is an open-source code execution framework that bridges large language models with local system resources. When troubleshooting complex agentic workflows or analyzing performance bottlenecks, you need visibility into the framework's internal decision-making. This guide explains how to enable verbose or debug modes for inspecting interpreter internals across the openinterpreter/open-interpreter repository.
Understanding Verbose and Debug Modes
Open Interpreter provides two boolean flags that control internal logging granularity: verbose and debug. Both attributes live on the OpenInterpreter instance as interpreter.verbose and interpreter.debug.
When activated, these flags trigger conditional print statements throughout the codebase that reveal:
- Complete message history before each LLM call
- Raw LLM prompts and responses
- Computer tool executions (terminal, mouse, clipboard, vision)
- Internal state transitions in the response loop
The flags are defined in the OpenInterpreter class constructor in interpreter/core/core.py (lines 42-48), where they default to False.
Three Methods to Enable Verbose and Debug Modes
You can activate these inspection modes through three equivalent interfaces depending on your workflow.
Command-Line Interface Flags
Pass --verbose or --debug when launching Open Interpreter from the terminal. These arguments are parsed in interpreter/terminal_interface/start_terminal_interface.py (lines 68-73 for verbose, lines 90-96 for debug) and bound to the interpreter instance before the REPL starts.
# Enable verbose logging
interpreter --verbose
# Enable debug logging
interpreter --debug
# Enable both
interpreter --verbose --debug
Magic Commands During an Active Session
Toggle modes dynamically inside a running session using magic commands. The handler in interpreter/terminal_interface/magic_commands.py processes %verbose (lines 80-99) and %debug (lines 103-124), allowing you to switch inspection on or off without restarting.
%verbose true # Turn on verbose output
%verbose false # Disable verbose output
%debug true # Activate debug mode
%debug false # Deactivate debug mode
Programmatic Assignment in Python Scripts
When embedding Open Interpreter in a Python application, set the attributes directly on the singleton instance. This approach is useful for automated testing or custom interfaces where you need granular control over logging.
from interpreter import interpreter
# Enable inspection modes
interpreter.verbose = True
interpreter.debug = True
# Execute a command with full internal logging
interpreter.chat("List all files in the current directory")
The flags are initialized in the OpenInterpreter constructor in interpreter/core/core.py and can be modified at any point during the object lifecycle.
What Information Is Revealed in Verbose and Debug Modes
Activating these flags surfaces detailed execution traces across several subsystems.
Message History Inspection
When verbose is enabled, the _respond_and_store loop prints the complete message history before each LLM invocation, allowing you to inspect exactly what context is being sent to the model.
LLM Call Tracing
The LLM subsystem in interpreter/core/llm/llm.py (lines 157-164) propagates the verbose flag to the underlying litellm library, setting litellm.set_verbose = True when self.verbose is active. This reveals raw HTTP requests, token counts, and model parameters.
Computer Tool Execution Logs
The Computer class and its sub-modules (terminal, mouse, clipboard, vision) check self.computer.verbose when printing command execution details. This shows exactly what shell commands are executed, what pixels are captured, and what system calls are made.
Together, these pathways provide a complete trace of the data flow: User Input → LLM Prompt → LLM Response → Parsed Messages → Code Execution → Result Feedback.
Key Source Files Controlling Verbose and Debug Output
The following files implement the inspection logic across the codebase:
-
interpreter/core/core.py— Defines theOpenInterpreterclass and initializesverboseanddebugattributes in the constructor (lines 42-48). -
interpreter/terminal_interface/start_terminal_interface.py— Parses--verbose(lines 68-73) and--debug(lines 90-96) CLI arguments and binds them to the interpreter instance. -
interpreter/terminal_interface/magic_commands.py— Implements%verbose(lines 80-99) and%debug(lines 103-124) magic commands for runtime toggling. -
interpreter/core/llm/llm.py— Propagates the verbose flag tolitellm(lines 157-164) and manages LLM-level logging. -
interpreter/core/llm/run_text_llm.py— Checksself.interpreter.verbosebefore executing text-based LLM calls.
These files provide the complete control surface for inspecting the interpreter's internal workflow.
Summary
- Open Interpreter exposes two boolean inspection flags:
verboseanddebug, stored as attributes on theOpenInterpreterinstance. - You can activate these modes via CLI flags (
--verbose,--debug), magic commands (%verbose,%debug), or direct assignment (interpreter.verbose = True). - When enabled, the flags surface detailed logs of message history, LLM calls, and computer-tool executions across the codebase.
- Key implementation files include
interpreter/core/core.pyfor attribute definition,start_terminal_interface.pyfor CLI parsing, andmagic_commands.pyfor runtime toggling.
Frequently Asked Questions
What is the difference between verbose mode and debug mode in Open Interpreter?
Both verbose and debug are boolean flags that expose internal state, but they target slightly different aspects of execution. Verbose mode focuses on high-level operational logs such as message history, LLM prompt contents, and computer tool executions. Debug mode typically surfaces lower-level implementation details and internal state transitions. In practice, many developers enable both flags simultaneously (interpreter --verbose --debug) to capture the complete execution trace.
Does enabling verbose or debug mode affect performance?
Yes, enabling these inspection modes introduces minor performance overhead due to additional console I/O operations and the collection of internal state for logging. The impact is generally negligible for interactive sessions but may become noticeable during high-throughput automation where thousands of LLM calls are executed. For production deployments, keep both flags set to False (the default) unless actively troubleshooting an issue.
Can I toggle verbose or debug mode after starting an Open Interpreter session?
Yes, you can toggle these modes dynamically without restarting the interpreter. Use the magic commands %verbose true or %verbose false (and similarly %debug true/%debug false) inside the active REPL session. These commands are handled in interpreter/terminal_interface/magic_commands.py and immediately change the logging behavior for all subsequent operations.
How do I enable verbose mode when embedding Open Interpreter in a Python application?
When importing Open Interpreter as a library, set the attributes directly on the singleton instance before calling interpreter.chat(). Import the interpreter object from the package, assign interpreter.verbose = True (and optionally interpreter.debug = True), then execute your commands. This programmatic approach is defined in interpreter/core/core.py where the OpenInterpreter class initializes these constructor arguments.
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:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →