Three bugs fixed in autoresearch_control_plane_demo.ipynb:
1. Wrong variable names in the alternative-backends demo cell (NODE_ROOT,
SMOKE_PACKET, HARNESS_ROOT → AUTORESEARCH_ROOT, packet_path, CLAW_ROOT).
2. --allow-any-branch passed to autoresearch run, which does not accept that
flag (loop-only). Removed it; switched to run_cmd + try/except so backend
failures print cleanly instead of raising a raw JSONDecodeError.
3. Root-cause fix for "Worker did not produce a pending experiment":
_collect_changed_files() uses after_paths - before_paths to detect edits.
If train.py is already dirty when the worker starts (left over from a
prior run), it sits in both snapshot sets so the difference is empty. The
fallback edit also uses run_shell_command, not edit_file, so edited_paths
is empty too — changed_files == [] even though the worker did edit the
file. Fixed by adding git checkout -- train.py right after isolate,
giving the worker a clean baseline every time.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add missing imports to test module:
- PromptHistoryEntry, render_prompt_history_report, parse_history_count
- parse_export_args, render_session_markdown
- summarize_tool_payload_for_markdown, short_tool_id
Fixes test compilation errors introduced by new session and export
features from batch 5/6 work.
The CLI was using a flat cwd/.claw/sessions/ path without workspace
fingerprinting, while SessionStore::from_cwd() adds a hash subdirectory.
This mismatch meant the isolation machinery existed but wasn't actually
used by the main session management codepath.
Now sessions_dir() delegates to SessionStore::from_cwd(), ensuring all
session operations use workspace-fingerprinted directories.
Remove #[cfg(test)] gate from session_control module — SessionStore
is now available at runtime, not just in tests. Export SessionStore and
add workspace_sessions_dir() helper that creates fingerprinted session
directories per workspace root.
This is the #41 kill shot: parallel opencode serve instances will use
separate session namespaces based on workspace fingerprint instead of
sharing a global ~/.local/share/opencode/ store.
The CLI already uses cwd/.claw/sessions/ (sessions_dir()), and now
SessionStore::from_cwd() adds workspace hash isolation on top.
Global session store causes cross-worktree confusion in parallel lanes.
Added workspace_root field to session metadata and documented root cause
in ROADMAP.md.
- Anthropic-compat (ANTHROPIC_BASE_URL + ANTHROPIC_AUTH_TOKEN)
- OpenAI-compat (OPENAI_BASE_URL + OPENAI_API_KEY)
- ollama example with concrete curl
- OpenRouter example with model selection
Addresses community requests for local model setup guidance.
Sterling reported 'json_error: no field input/input_tokens' still firing
despite existing serde(default) in types.rs. Root cause: SSE streaming
path had a separate deserialization site that didn't use the same defaults.
- Add serde(default) to sse.rs UsageEvent deserialization
- Add serde(default) to types.rs Usage struct fields (input_tokens, output_tokens)
- Add regression test with empty-usage JSON response in streaming context