Use these entries to diagnose the most frequently reported problems. Each entry describes a symptom, explains the root cause, and gives the fix.Documentation Index
Fetch the complete documentation index at: https://reasonblocks.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
AttributeError: module 'reasonblocks' has no attribute X
AttributeError: module 'reasonblocks' has no attribute X
SymptomCauseThe top-level All public names are re-exported from
reasonblocks package uses lazy imports. If you access a name directly from the module object without importing it explicitly, Python may not have loaded the submodule that defines it.FixImport the class directly from its submodule:reasonblocks/__init__.py — the issue is only with attribute access on the module object before it has been fully initialized in some import orders.ImportError: cannot import name 'AgentMiddleware' from 'langchain'
ImportError: cannot import name 'AgentMiddleware' from 'langchain'
SymptomCauseReasonBlocks requires LangChain 1.0 or later. The If you are pinned to an earlier version for other reasons, check the ReasonBlocks changelog for the minimum version tested against your installed LangChain release.
AgentMiddleware base class and the ModelRequest / ModelResponse protocol were introduced in LangChain 1.0. Earlier versions do not have them.FixImportError: No module named 'networkx'
ImportError: No module named 'networkx'
SymptomCauseIf you do not use
networkx is only needed when you use ImportGraph (reasonblocks.import_graph), which builds a dependency graph over a codebase. It is an optional dependency, not installed by default.FixInstall networkx only if you intend to use ImportGraph:ImportGraph, you can safely ignore this error — it only appears if something in your code imports reasonblocks.import_graph directly. Remove that import to avoid the error without installing networkx.No steering injections appearing in any run
No steering injections appearing in any run
SymptomEvery entry in 2. Wrong 3. If
mw.step_log has empty injection_sources and intervention_texts. The agent runs normally but receives no guidance.Cause and fix (check in order)1. Missing or invalid api_keyIf api_key is empty, malformed, or revoked, all API calls will fail silently. Enable debug logging to see the errors:base_urlIf you passed a base_url that is unreachable or incorrect, all API calls will time out silently. Verify the endpoint is reachable:e_traces_enabled=FalseCheck whether you passed e_traces_enabled=False. This disables the entire E-trace pipeline. The default is True.4. FSM staying in FAST stateIf all steps score below fast_threshold (default 0.2), the FSM stays in FAST and skips E-traces. Inspect:difficulty is consistently low, your tasks may genuinely be easy, or the heuristic scorer may not be picking up the right signals for your agent’s output format.5. No patterns in the storeA brand-new account has no distilled patterns yet. E2 and E3 should still fire on the first run — if they do not, the API key or endpoint is the issue.Agent never enters FAST mode
Agent never enters FAST mode
SymptomThe FSM stays in You can also inspect the raw difficulty scores to calibrate:
NORMAL even on steps that appear straightforward. You expected cheaper model routing or reduced injection overhead in FAST state, but it never triggers.CauseThe default fast_threshold is 0.2 and fast_window is 6. The agent must score below 0.2 on six consecutive steps to enter FAST. If your agent’s output includes hedging language, error references, or complex entities — even on easy steps — the heuristic scorer may push scores above 0.2.FixRaise fast_threshold or reduce fast_window:Too many steering injections — agent seems over-guided
Too many steering injections — agent seems over-guided
SymptomEvery step has injections from To reduce monitor steering injections, raise the cooldown at the FSM level by adjusting how quickly the FSM enters SLOW (where injection frequency is highest):
MonitorSteeringInjection. The agent appears to be getting too much guidance, which may be disrupting its reasoning.CauseReasonBlocksMiddleware has an internal _monitor_max_per_run cap (currently 5), so true over-injection from the monitor steering tier is capped at 5 injections per run. If you are seeing more than that, the injections are likely coming from E1, E2, or E3 rather than monitor steering.If you are using GeneralMonitorMiddleware directly (not through build_middleware), the cooldown controls how often rules fire. The default is cooldown=8 — a rule can fire at most once every 8 model calls.FixTo reduce general monitor firing frequency:TokenSavingMiddleware is not compressing tool outputs
TokenSavingMiddleware is not compressing tool outputs
SymptomTool messages in the history are long, but If you are constructing middleware manually, ensure
mw.stats.compressions stays at 0 after the run.CauseThe most common cause is middleware ordering. TokenSavingMiddleware must come last in the middleware list. If you constructed the list manually and placed it before ReasonBlocksMiddleware, it processes the message history before injections are added — but the key point is that it still only processes ToolMessage instances, and those may not yet exceed the threshold at the point it runs.Other causes:- Tool outputs are shorter than
compress_threshold_chars(default1800). Checklen(tool_message.content)for representative messages. ts_enable_compression=Falsewas set explicitly.- The last
ts_keep_recent_tool_messages(default2) messages are protected from compression — if there are only 2 or fewer tool messages total, nothing is compressed.
TokenSavingMiddleware is the last item:Dashboard shows runs as 'in progress' indefinitely
Dashboard shows runs as 'in progress' indefinitely
SymptomRuns appear in the dashboard with a spinner or “in progress” status and never transition to “complete”, even after the agent has finished.CauseReasonBlocks emits a Or call If you need to mark a run as failed explicitly:
run_finish telemetry event to mark a run as complete. This happens automatically in two ways:- Via the
after_agenthook — fired by LangChain afteragent.invoke()oragent.stream()returns cleanly - Via the context manager
__exit__— fired when thewith mw:block exits
agent.invoke() without the context manager — the run_finish event is never sent and the dashboard row stays open.FixUse the context manager to guarantee the finish event fires even on exceptions:flush_session() manually when you cannot use the context manager: