You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(engine): rename ENGINE_V2_TRACE to IRONCLAW_RECORD_TRACE (#2114)
* chore(engine): rename ENGINE_V2_TRACE to IRONCLAW_RECORD_TRACE
Aligns the trace-recording env var with the project-wide IRONCLAW_*
naming convention so it's discoverable alongside other ironclaw flags.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* unify engine v2 trace recording with v1 RecordingLlm
Address PR review feedback. Instead of having two separate trace
systems both named IRONCLAW_RECORD_TRACE (the v1 RecordingLlm in
src/llm/recording.rs and the engine v2 executor/trace.rs JSON dumper),
collapse them to one.
Engine v2's LlmBackend is wired to the host's full LLM provider chain,
which already includes RecordingLlm when IRONCLAW_RECORD_TRACE=1.
That means engine v2 LLM interactions are already captured by the
unified trace_*.json fixture file -- no engine-side env var, no second
JSON output, no risk of one flag enabling two divergent recorders.
Removed:
- is_trace_enabled() and write_trace() from executor/trace.rs
- the engine_trace_*.json write site in runtime/manager.rs
Kept (still useful, runs unconditionally for the self-improvement
mission):
- build_trace() / analyze_trace() / log_trace_summary()
Docs updated to point to RecordingLlm as the single trace mechanism.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/engine-v2-architecture.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,7 +118,7 @@ The bridge connects the engine to existing IronClaw infrastructure:
118
118
119
119
Set `ENGINE_V2=true` environment variable. The router in `src/bridge/router.rs` intercepts messages and routes them through the engine instead of the v1 agent loop.
120
120
121
-
For trace debugging: `ENGINE_V2_TRACE=1` writes full JSON traces to `engine_trace_*.json`.
121
+
For trace debugging set `IRONCLAW_RECORD_TRACE=1`. Engine v2 reuses the host crate's `RecordingLlm` (see `src/llm/recording.rs`) — the engine's `LlmBackend` is wired to the same provider chain, so LLM interactions are captured in the standard `trace_*.json` fixture file (configurable via `IRONCLAW_TRACE_OUTPUT`). There is no separate engine trace file.
Copy file name to clipboardExpand all lines: docs/plans/2026-03-20-engine-v2-architecture.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -346,7 +346,7 @@ Engine broadcasts `ThreadEvent`s via `tokio::broadcast`. Router subscribes and f
346
346
`EngineState` persists across messages (OnceLock singleton). ConversationManager builds the visible conversation transcript for continuity. The orchestrator persists its mutable working transcript and intermediate execution state in `persisted_state` / internal thread transcript rather than mixing tool traces into the user-visible transcript.
347
347
348
348
### 6.5 Trace recording + retrospective — DONE
349
-
`ENGINE_V2_TRACE=1` writes full JSON traces. Automatic trace analysis detects 8 issue categories. Reflection pipeline produces Summary/Lesson/Issue/Spec/Playbook docs. All run inside ThreadManager after thread completion.
349
+
Live trace recording is handled by the host crate's `RecordingLlm` (`IRONCLAW_RECORD_TRACE=1`) — engine v2 piggybacks on it via the shared LLM provider chain, so there is no separate engine trace file. Inside ThreadManager, retrospective trace analysis runs unconditionally after each thread completes: the analyzer detects 8 issue categories and the reflection pipeline produces Summary/Lesson/Issue/Spec/Playbook docs.
350
350
351
351
### 6.6 Bugs found and fixed via traces
352
352
- Tool name hyphens vs underscores (web-search vs web_search)
0 commit comments