Skip to content

Changelog

All notable changes to microharness are documented here and in CHANGELOG.md. See GitHub Releases and PyPI for published artifacts.

The format follows Keep a Changelog and this project adheres to Semantic Versioning.

[Unreleased]

[0.4.1] - 2026-12-05

Added

  • ACP token & context-window usage reporting (core/acp.py, docs/acp.md, tests/test_acp.py): Emits live session/update (usage_update with calibrated used context tokens and model size capacity) on session creation/load, after each prompt step, on cancellation rollback, and on model switches, and includes per-turn usage (inputTokens, outputTokens, totalTokens, and cachedReadTokens when present, including subagent usage deltas) in session/prompt responses.
  • Complete ACP session, command, diff, terminal, cache, and subagent support (core/acp.py, core/defaults.json, docs/acp.md, tests/test_acp.py): Added session/list (sessionCapabilities.list with cwd filtering and nextCursor pagination across active and persisted runs), available_commands_update + slash-command/skill dispatch (/compact, /undo, /status, /new, /skill, /agent, and discovered project/global commands and skills), structured diff content blocks on edit_file / write_file, live terminal content blocks in AcpClientEnvironment.execute_bash, cache_ttl (5m, 1h, off) session configOptions, and SubagentTool.on_step progress streaming via agent_thought_chunk.

Fixed

  • TUI scrolling & event-loop hang (core/tui.py): Fixed _read_pending() resetting stdscr from its 50ms poll timeout to blocking mode on real curses.window instances (which lack gettimeout()), preventing the UI/spinner/streaming view from freezing after any escape sequence until the next keypress or message; enabled direct SGR (1006) + X10 mouse wheel fallback when curses.BUTTON5_PRESSED is unavailable (macOS system ncurses) so scrolling down works reliably after scrolling up; and split concatenated escape/mouse-wheel bursts in _drain_escape_sequence() while handling KEY_SPREVIOUS / KEY_SNEXT and clicked wheel masks.

[0.4.0] - 2026-12-02

Added

  • Zero-dependency Agent Client Protocol (ACP) stdio support (core/acp.py, core/defaults.json, main.py): Added a stdlib-only newline-delimited JSON-RPC 2.0 ACP server (AcpServer, AcpSession, JsonRpcTransport, AcpClientEnvironment) and microharness acp / --acp CLI entrypoint routing all diagnostics to stderr while keeping stdout strictly JSON-RPC framed. Supports initialize capability negotiation, session/new (with sanitized mcpServers pass-through honoring trust_project_tools, --no-mcp, --no-network-tools, and sandbox/Docker guards), session/load (trace.json / trajectory.jsonl resumption and session/update history replay), live configOptions / models / modes discovery and switching (session/set_config_option, session/set_model, session/set_mode for model, thought_level reasoning effort, and permission mode), session/prompt (streaming agent_thought_chunk, agent_message_chunk, tool_call, and tool_call_update notifications via StreamingModel + core/tracer.py action formatters), session/cancel (cooperative CancellableModel cancellation), session/close, bidirectional session/request_permission wired to GuardedEnvironment (ask mode, fail-closed on deny/cancel/disconnect), and optional fs/read_text_file, fs/write_text_file, and terminal/* client callbacks while keeping AgentLoop protocol-agnostic (#58).
  • Multimodal image message support & MCP image pass-through (core/types.py, core/memory.py, core/model.py, core/providers.py, core/providers.json, core/tools.py, core/loop.py, core/tracer.py, core/discovery.py, core/interactive.py, core/tui.py, plugins/mcp/, main.py): Extended Message to support structured multimodal content parts alongside plain str with pure-stdlib magic-byte MIME detection, base64/data-URI validation (max_image_bytes, allowed_image_mime_types in core/defaults.json), fixed-budget image token estimation (image_token_estimate), base64-safe compaction tombstones and trace.json / trajectory.jsonl / trace.md sanitization, declarative supports_vision provider/model capability flags with graceful text-placeholder fallback on non-vision models, ToolOutput-backed MCP image extraction forwarded cleanly as follow-up user multimodal turns after role="tool" responses, repeatable --image CLI flag, and interactive TUI image input (@image.png tagging/autocomplete, /image <path>, /paste, Ctrl+V / Alt+V clipboard paste, and dragged-in image paths) (#60).

  • ACP multimodal image prompts (core/acp.py, docs/acp.md, tests/test_acp.py): Enabled promptCapabilities.image in ACP initialize, added validated image content block parsing (prompt_blocks_to_content) for session/prompt, and supported multimodal user_message_chunk replay in session/load (#60).

Changed

  • ACP T3 Code & IDE setup docs (docs/acp.md): Documented global uv tool install setup, T3 Code Executable + Arguments configuration, --directory guidance for uv run, and troubleshooting for test-session failures and startup latency.
  • Documentation updates & policy (AGENTS.md, README.md, docs/plugins.md, docs/getting-started.md): Documented the bundled plugins/background_shell/ plugin (bg_start, bg_status, bg_write, bg_kill, bg code_mode helper, --background-shell / --no-background-shell, defaults.json, and sandbox/teardown guarantees), added --stream/--no-stream and --code-mode to the CLI reference, updated README.md for plugins/mcp/, plugins/background_shell/, core/sandbox.py, and core/plugins.py, and codified documentation sync + mkdocs build --strict verification in AGENTS.md.

Fixed

  • Release docs deployment (.github/workflows/publish.yml): Changed deploy_docs to dispatch docs.yml on main for the released tag instead of invoking docs.yml via workflow_call from refs/pull/<n>/merge, which github-pages environment protection rules rejected during v0.3.0.

Removed

  • Legacy mini-harness CLI entrypoint (pyproject.toml, docs/getting-started.md, AGENTS.md): Removed the legacy mini-harness console script alias from [project.scripts] so only microharness is installed.

[0.3.0] - 2026-12-02

Added

  • Background shell process management (plugins/background_shell/, core/environment.py, core/tools.py): Added a first-party zero-dependency background_shell plugin (BackgroundShellToolProvider) exposing bg_start, bg_status (with wait_for readiness matching and tail logs), bg_write, and bg_kill (plus bg code_mode helper and --background-shell / --no-background-shell CLI flags), bounded in-memory ring-buffer + file spillover logs in logs_dir, ReadOnlyEnvironment / GuardedEnvironment (ask mode) enforcement, workspace cwd trapping, host secret stripping, --sandbox / --docker container execution (DockerEnvironment.signal_exec), and deterministic SIGTERM -> grace -> SIGKILL process-group cleanup via ToolProvider.teardown() and Environment.register_teardown_hook() (#61).
  • Pure-stdlib SSE token, reasoning, and tool-call streaming (core/model.py, core/protocols.py, core/types.py, core/loop.py, core/tui_session.py, core/tui.py, core/session.py, core/harness.py, main.py): Added runtime-checkable StreamingModel (generate_stream) and StreamEvent callbacks with stdlib iter_sse_data SSE parsing in HttpChatModel (reassembling fragmented JSON tool calls, usage telemetry via stream_options, and reasoning_content / reasoning / reasoning_details replay fields), cooperative mid-stream Esc cancellation and deadline checks, automatic fallback when stream_options or stream: true is rejected, live TUI (TUIState, TuiTurnRunner) and CLI (CliStreamRenderer) streaming, --stream / --no-stream CLI flags, and declarative flags in core/defaults.json and core/providers.json.
  • User-facing plugin system (core/plugins.py, main.py, core/interactive.py): Added zero-dependency plugin bundle discovery (plugins/<name>/, ~/.microharness/plugins/<name>/, .microharness/plugins/<name>/, preset plugins/, and opt-in microharness.plugins entry points via enable_entrypoint_plugins), JSONC plugin.json manifests (supporting ToolProvider factories, tools/, skills/, subagents/, commands/, hooks, mcp_servers, CLI flag contributions, frontmatter_keys, defer/defer_tools, and lazy activate_on_config_keys), microharness plugin {install,list,enable,disable,update,remove} CLI + /plugin slash command, plugins.json enable/source tracking, and trust_project_tools enforcement for project plugins.
  • Sandboxed MCP servers & code_mode stdio bridge (core/sandbox.py, core/code_mode.py, plugins/mcp/, core/plugins.py): Added zero-dependency execution sandboxing (docker exec -i for containers, macOS sandbox-exec, and Linux bwrap) with granular per-server/per-runtime sandbox policies (mode, filesystem, read_paths, write_paths, network, allowed_hosts, env_passthrough, inherit_host_env) and declarative defaults in core/defaults.json and plugins/mcp/defaults.json; added an authenticated newline-delimited JSON-RPC stdio bridge (_ToolBridgeDispatcher) enabling code_mode and workspace-local stdio MCP servers inside --docker (including --docker-network none) and --sandbox while preserving ToolRegistry.dispatch() hooks, permission guards, host secret stripping, and HTTP/SSE allowed_hosts redirect/endpoint enforcement.
  • Generic deferred tool discovery (core/tools.py, core/code_mode.py, core/subagents.py): Added ToolSearchTool (tool_search), ToolRegistry.activate(), tools.search() in code_mode (_ToolBridgeServer /search), and per-plugin defer / defer_tools deferral so large installed plugin toolsets stay out of upfront prompt schemas until searched.
  • Isolated plugin runtimes & CodeModeHelperProvider (core/plugins.py, core/protocols.py, core/code_mode.py): Added StdioPluginToolProvider (newline-delimited JSON-RPC 2.0 over stdio with uv/python/npx/stdio runtime specs and prepare_plugin_venv), CodeModeHelperProvider / CodeModeHelper so plugins can inject custom client helpers into code_mode, and --code-mode / enable_code_mode.
  • Harness engineering & economics documentation (docs/architecture.md, docs/benchmarks.md, docs/subagents.md, docs/presets.md): Documented edit_file and --no-tool-docs schema minimalism, deterministic tombstoning vs. LLM summarization, the 7.5-ping prompt-cache break-even formula and gateway replica/wait caveats, DeepSWE-mini cost/token breakdowns with N=1 variance and --docker-network none notes, and empirical multi-agent cost/role heuristics.

Changed

  • Release-synced documentation deployment & stage indicator (.github/workflows/docs.yml, .github/workflows/publish.yml, .github/scripts/release.py, docs/index.md): Stopped auto-deploying unreleased main docs to GitHub Pages on push (keeping mkdocs build --strict on PRs), wired release documentation deployment into publish.yml + manual workflow_dispatch, and added a PyPI Development Status stage badge and heading label synced automatically from pyproject.toml.
  • Migrated plugins/mcp onto the generic plugin contract (plugins/mcp/, core/config.py, core/harness.py, core/defaults.json): Converted plugins/mcp.py into a plugins/mcp/ bundle with plugin.json, defaults.json, config.py, and plugin.py, moving MCP_MODES, resolve_mcp_server_configs, --no-mcp/--mcp-mode CLI flags, mcp_* defaults, and the mcp code_mode helper out of core/.

[0.2.2] - 2026-11-30

Added

  • Multi-PR release automation (.github/workflows/release.yml, .github/workflows/publish.yml, .github/scripts/release.py): Added a Prepare Release workflow (workflow_dispatch) that promotes ## [Unreleased] changelog entries, bumps versions across package/docs/uv.lock, and opens a release-labeled Release PR, plus automatic GitHub Release creation and PyPI OIDC publishing when that Release PR merges into main.

[0.2.1] - 2026-11-29

Added

  • Benchmark docs exporter (microharness experiments export): Added select_experiment_runs, load_experiment_tasks, format_experiments_markdown, and update_markdown_results_block in benchmarks/experiments.py (plus CLI microharness experiments export --write ...) to render sanitized run summaries and per-task matrices without exposing local paths.
  • DeepSWE-mini benchmark results (docs/benchmarks.md): Published DeepSWE-mini benchmark tables (exp-hy4-skilled-v0123, exp-hy4-solo-v0123, and deepseek-flash-suite) between BENCHMARK_RESULTS markers for one-command future updates.

[0.2.0] - 2026-11-29

Added

  • Zero-dependency MCP plugin (plugins/mcp.py): Added a stdlib-only Model Context Protocol client supporting stdio, Streamable HTTP, and legacy HTTP+SSE transports (env:VAR secret resolution, fail-open startup, annotations.readOnlyHint permission enforcement, and lazy loading when mcp_servers is configured).
  • Generic ToolProvider & deferred tools (core/protocols.py, core/tools.py): Added lifecycle-managed ToolProvider registration and deferred tool support so tools can remain dispatchable without bloating model schemas.
  • Python Code Mode (core/code_mode.py): Added --mcp-mode code_mode (plus "progressive" default and "direct" modes) backed by an authenticated 127.0.0.1 loopback bridge (tools.call, mcp.search, mcp.call) routed through ToolRegistry.dispatch().
  • MCP CLI flags & docs (main.py, docs/mcp.md): Added --no-mcp and --mcp-mode, documented exposure modes and security boundaries, and added mkdocs-material + GitHub Pages deployment (.github/workflows/docs.yml).

[0.1.23] - 2026-11-28

Added

  • Lean main-agent toolset & prompt options (--inspection-tools, --no-tool-docs): Made grep, glob, and git_read opt-in on the main agent (kept active in read-only subagents and when requested by presets) and allowed omitting prose tool descriptions when native schemas are used.
  • Pre-evaluation git patch capture (Environment.get_git_head, get_git_patch(base_ref=...)): Captured the initial HEAD commit before execution and extracted patch.diff prior to grading so commits created during a run are preserved alongside uncommitted edits.

[0.1.22] - 2026-11-26

Added

  • Named agent config presets: Added core/presets.py (AgentPreset, discover_presets, load_preset, resolve_preset) to load self-contained preset folders (agent.md, optional config.json, subagents/, tools/, skills/, commands/) from global/project presets/ or arbitrary paths, with layered/isolated inheritance and trust_project_tools enforcement.
  • Preset CLI & interactive commands: Added --preset / --agent, --list-presets / --list-agents, and /preset / /status reporting.
  • Central CSV experiment tracking: Added benchmarks/experiments.py (CsvExperimentTracker, ExperimentTracker, backfill_runs, collect_agent_metadata, collect_subagents_summary), persisting run-level (~/.microharness/experiments.csv) and per-task (~/.microharness/experiments_tasks.csv) agent versions, git commit/dirty state, configurations, active preset, subagent presets, and scores/token telemetry automatically across benchmark runs and --resume.
  • Experiments CLI: Added microharness experiments backfill and microharness experiments list to import existing saved reports and inspect runs directly from the terminal.

[0.1.21] - 2026-11-26

Added

  • Atomic multi-hunk edit_file: Added apply_text_edits (core/editing.py) and updated EditFileTool / Environment.edit_file / ReadOnlyEnvironment / GuardedEnvironment / core/tracer.py to support sequential edits: [{old_str, new_str}, ...] batches with atomic all-or-nothing rollback.
  • Advertised edit_file(path, edits) schema: Simplified the LLM tool schema to require edits directly (preserving internal old_str/new_str fallback compatibility in EditFileTool.execute).
  • Brace expansion in glob: Added {a,b} alternative support to _compile_glob_pattern in core/tools.py (fixing failures on patterns such as **/*.{ts,tsx,json,md}).
  • Project changelog: Added CHANGELOG.md documenting releases 0.1.0 through 0.1.21.

[0.1.20] - 2026-11-24

Added

  • Benchmark task exclusions & arm64 guard (#38): Added !term / -term exclusion filters to benchmarks/runner.py, benchmarks/harbor.py, and benchmarks/mini_swe.py, and automatically skip narwhals-rolling-window-suite on arm64 hosts where prebuilt wheels fail.

[0.1.19] - 2026-11-24

Added

  • Dedicated read-only inspection tools (#37): Added grep, glob, and git_read (parallel_safe=True), switched explore and reviewer subagent presets to [read_file, grep, glob, git_read], and surfaced explicit read-only access labels in render_subagents_index.

Fixed

  • Shell chaining validation: Fixed && / || operator parsing in core/environment.py.

[0.1.18] - 2026-11-24

Fixed

  • Container skills & capped subagents (#36): Skip host repository skills inside container sandboxes and ensure subagents that hit max_steps produce a structured wrap-up summary.

[0.1.17] - 2026-11-23

Fixed

  • Benchmark ergonomics & metadata (#35): Added multi-task filter support, deferred live context-window probing until needed, tightened task filter matching, and fixed macOS curses test compatibility.

[0.1.16] - 2026-11-23

Fixed

  • Sandbox project discovery (#34): Discovered project .microharness/ config, subagent presets, and project skills inside sandbox workspaces without duplicate discovery.

[0.1.15] - 2026-11-22

Fixed

  • Subagent context & spill logs (#33): Resolved per-subagent model context windows, bumped default bash_timeout to 300s, and prevented log spill file collisions.

[0.1.14] - 2026-11-22

Added

  • UTC trace timestamps (#32): Added ISO-8601 UTC timestamps to trajectories and run traces.

[0.1.13] - 2026-11-22

Fixed

  • TUI interaction polish (#31): Required leading / for slash commands, added mouse/keyboard scrolling, unified Enter/Tab input behavior, and added visual turn separators.

[0.1.12] - 2026-11-21

Changed

  • Declarative defaults (#30): Centralized operational defaults in core/defaults.json and core/providers.json, and raised the default fallback context window to 256k.

[0.1.11] - 2026-11-21

Added

  • Dynamic context-window discovery (#29): Auto-detected model context windows from provider /models endpoints.

[0.1.10] - 2026-11-21

Fixed

  • Docker path resolution & fail-fast HTTP errors (#28): Resolved container relative paths cleanly and failed fast on non-retryable 4xx HTTP responses instead of burning retry budgets.

[0.1.9] - 2026-11-21

Fixed

  • Permissions & review cleanup (#27): Added /permissions ro alias, deduplicated config/environment helpers, and removed dead hook code.

[0.1.7] - 2026-11-21

Added

  • Lifecycle hooks & loop guardrails (#25): Added HookRegistry (pre_turn, post_turn, pre_step, post_step, pre_tool, post_tool), built-in python_syntax_diagnostics via ast.parse, and doom_loop_detection.
  • Checkpoints & permission guardrails (#26): Added pre-turn git/file checkpoints with /undo, GuardedEnvironment (auto/ask/read-only/ro), and Docker resource limits.

Fixed

  • Hooks & Python 3.12+ proxy compatibility: Fired post_step on final steps, passed turn outcome to post_turn, and preserved ContainerEnvironment protocol compliance in GuardedEnvironment.

[0.1.5] - 2026-11-21

Fixed

  • Preset defaults: Tightened read-only preset defaults for subagent roles.

[0.1.4] - 2026-11-21

Added

  • KV-cache friendly memory compaction (#24): Added immutable prefix preservation, prompt_tokens-calibrated budgeting, structured compaction summaries, and read-only Docker /logs inspection.
  • Resilient editing & parallel reads (#21): Extracted core/editing.py with whitespace/dedent fallback and difflib closest-match hints, enabled parallel_safe on read_file, and improved JSON parse error feedback.
  • Subagent isolation hardening (#22): Hardened ReadOnlyEnvironment isolation, prevented concurrent write-worker races, and added configurable max_steps per preset.

[0.1.3] - 2026-11-20

Added

  • Subagent orchestration (#14): Added SubagentTool (parallel_safe=True), .microharness/agents/ Markdown presets (explore, worker, reviewer), concurrent tasks batching, and per-call bash timeout up to 1800s.

Fixed

  • Provider routing & reasoning replay: Prevented non-local global endpoints from hijacking local presets, and preserved assistant reasoning / reasoning_details / reasoning_content across tool turns.

[0.1.2] - 2026-11-17

Added

  • finish tool & sandbox hardening (#12): Added explicit FinishTool, Docker --network none isolation, bash timeout hardening, and preserved trailing newlines in get_git_patch.
  • Static type checking & CI (#8, #13): Added GitHub Actions CI (ruff, ty, pytest across Python 3.11–3.13), CodeQL security scanning, and .pre-commit-config.yaml.

[0.1.1] - 2026-11-15

Added

  • Global auth store & Vercel AI Gateway (#9, #10, #11): Added global credential storage, CLI login, /login command, Vercel AI Gateway provider support, and CodeQL secret-taint hardening.

[0.1.0] - 2026-11-08

Added

  • Initial PyPI release (#1–#7): Modular stdlib-only core (Model, Tool, Evaluator protocols), curses TUI with caret editing and /help command router, local provider presets, Amazon Bedrock OpenAI-compatible shim with SigV4/SSO auth, cascading AGENTS.md and skills discovery, Mini-SWE & DeepSWE-mini benchmark runners, and PyPI OIDC Trusted Publishing workflow (.github/workflows/publish.yml).