Changelog
Release notes per version. The repository keeps the long form in
RELEASE.md.
0.5.0, 0.5.1 and 0.5.2 were all published to PyPI as mmar-carl on
2026-11-09. Install the latest with pip install 'mmar-carl==0.5.2'
(Python 3.12+).
Adds the terminate step. Chain format 14 → 15.
TerminateStepDescription(terminate) withTerminateStepConfig: exactly one ofoutput(a literal JSON value,nullincluded) oroutput_source(a$reference; a missing reference fails the step), plus areason.- The current batch settles, siblings waiting for a worker slot included. When several terminate steps succeed, the lowest number selects the output. Later steps are reported as skipped; the batch schedules no new planner actions, loop iterations or RE-PLAN work.
- Earlier failures still count against the verdict. Host cancellation and
fail-fast win over termination.
result.metadata["terminated"]and the trace record the step number and reason.ReasoningResult.get_final_output()returns the selected answer even after history trimming.
Migration from 0.5.1. Lift saved JSON with
ReasoningChain.from_dict(ReasoningChain.migrate(raw)); rung 15 rewrites
nothing. Readers older than 0.5.2 reject format 15. A saved snapshot that
already executed a terminate step cannot resume past it.
Adds the decision step. Chain format 13 → 14.
DecisionStepDescription(decision) asks a decision model typed questions about one text or JSON state:predicate(thresholded probability),choice(one of 2–255 options) andscore(an ordered rubric of 2–10 levels). Per-questionfallbackandmin_confidencehandle refusals and low confidence; the step fails closed otherwise.- Provider adapters for OpenRouter Decisions and the direct OpenAI and Azure
OpenAI Decisions APIs, with one answer shape in
result_data["answers"]. Usage and cost are recorded when the provider reports them. - Answers can be written to memory (
output_memory_key, namespacedecision) for conditional routing. State templates use explicitinput_mappingand a byte limit. - Host grant.
ReasoningContext.decision_endpointsauthorizes the exact request URL and the key’s env var per provider. Neither the grant nor the key is ever in chain JSON.PreflightReportgainsrequired_decision_credentials/missing_decision_credentials. - Transient errors are retried within
max_retries; provider error bodies are kept out of step errors.httpxis now a core dependency.
Migration from 0.5.0. Lift saved JSON with migrate(); rung 14 rewrites
nothing. Grant the endpoint and credential before running a decision step.
Chains without decision steps need no new configuration. Execution-trace
replay does not support decision steps. Live checks ran on OpenRouter; the
direct OpenAI and Azure adapters have offline tests only.
The collaboration and execution-control release. Chain format 9 → 13.
New step types
Section titled “New step types”| Class | StepType | Purpose |
|---|---|---|
ClaudeCodeStepDescription | claude_code | Delegate to the local Claude Code CLI. |
CodexStepDescription | codex | Delegate to a local Codex SDK agent. |
SelectionStepDescription | selection | Pick items from a collection with no LLM call. |
PlannerStepDescription | planner | Select and order a bounded set of declared tool actions. |
Local coding agents
Section titled “Local coding agents”- Claude Code and Codex steps run only when the trusted host sets
ReasoningContext(allow_local_agent_execution=True). Loading a chain never grants it. - Steps can resume a session or thread and store its id for later steps; both validate structured output.
- Claude Code
envoverrides are no longer written to chain JSON.
Bounded planning
Section titled “Bounded planning”- The planner chooses action IDs; the chain defines the actions, their tool arguments and the budget. Chosen actions run as ordinary tool steps before the planner’s dependents.
on_step_event(..., "planner_actions_scheduled", payload)reports the assigned step numbers.- A complete, schema-valid plan survives a trailing transport failure. Token accounting includes usage from compatible streaming providers.
Git tools and skills
Section titled “Git tools and skills”GitToolSourceregisters@carl_toolfunctions or one named function from a Git checkout. Tools and skills can be pinned to a commit and checked against per-file SHA-256 digests, on cache hits too.- AgentSkill reads stay inside the skill directory and the staged workspace.
With
trust_policy="sha_pinned"the step verifies the sameSKILL.mdbytes it parses.
Collaboration and evolution
Section titled “Collaboration and evolution”- Handoff sub-chains, supervisor agents and sampling base steps survive a JSON round trip (format 11). Per-agent traces record nested runs and aggregation fallbacks.
- Writes to different keys of one namespace survive the merge of parallel step results.
- EvoC primitives: step catalog, spec validation, graph and field mutations, code-tool contracts, evaluation helpers, run descriptors, Pareto helpers.
validate_specchecks that explicit$steps.Ninputs refer to declared predecessors; the meta mutation helpers check this before accepting an edit.
Inputs, scheduling and failures
Section titled “Inputs, scheduling and failures”- Host inputs go through
ReasoningContext.runtime_inputand explicit references. Structured-output and human-input prompts can select the fields they need. A missing required tool input fails before dispatch. - Opt-in
fail_faststops dispatch after a terminal failure. Pause is acknowledged once active steps settle; resume releases queued work without replaying completed steps. - Concurrent executions get separate step caches and injection budgets. Active steps share the remaining chain deadline.
- Experimental
execute_eager_tools()starts a tool as soon as its dependencies succeed. - After a fallback,
StepExecutionResult.tool_namenames the tool that ran. JSON text results are decoded intoresult_data. Failed embedded chains and MCPisErrorresults fail the step. Tool tag restrictions apply to primary and fallback calls. - Borrowed LLM clients are no longer closed by the executor. An answerless
completion that exhausts its token budget raises
LLMTokenLimitError. Themcpextra is constrained to SDK 1.x.
Breaking changes
Section titled “Breaking changes”- Chain format 9 → 13. Format 12 saves
fail_fast,max_injections,memory_schemaandstep_groups; format 13 adds the planner. Older readers reject newer snapshots withChainFormatNewerError. - Local agents need host approval. Apps that use Claude Code or Codex
steps must set
allow_local_agent_executionin the trusted host context. - Tool failures affect chain status. Callers that consumed an MCP error or a failed embedded chain as a successful step must handle step failure.
- Steps own their response format. The default English and Russian prompt
wrappers carry instructions and context only. Define the required output
format in the step or pass an explicit
PromptTemplate.
Migration from 0.4.0
Section titled “Migration from 0.4.0”- Lift saved JSON with
ReasoningChain.from_dict(ReasoningChain.migrate(raw)). If an old file omitted a nested sub-agent, reattach its topology from the original source. - Grant local agent execution for trusted workflows and supply Claude Code environment overrides at run time.
- Older MAESTRO chains: migration removes legacy human-input fallback values; missing providers and timeouts produce typed non-success outcomes.
Details: Migration.
Known limitations (0.5.2)
Section titled “Known limitations (0.5.2)”- The default
from_json()/load()path rebuildsllm,tool,mcp,memory,transform,conditional,structured_output,commandandshell_sessionsteps as legacyStepDescriptionobjects. Usefrom_dict_typed()for typed objects. StepDescription.to_typed_step()dropsretry_maxandtimeout.ChainMutatorignoresStepDescriptionBase.frozen; only themmar_carl.metahelpers honour it.- A
ClaudeCodeStepConfig.envpresent in loaded JSON is accepted, althoughto_dict()never writes it.
The runtime-execution release (2026-08-27). Rule of the release: a serialized chain is input, never authority. Permissions come from the host at run time.
- Seven step types:
agent(bounded tool loop with an explicitfinish),code(one exact generated Pythonrun(inputs)in a sandbox profile, #23),wait(timer / event / any-of, #19),map(bounded ordered fan-out over a JSON array, #22),command_plan,command(argv through a skill runtime; renamed frombash) andshell_session. - Host authority:
CommandPolicy,CommandCapabilityRegistry,NetworkEnforcer,CodeExecutionPolicylive onReasoningContextand are never written to chain JSON. - Chain as a tool (#21):
ChainToolDefinitionembeds a chain snapshot as an isolated, bounded tool; results come back asChainToolOutcome. - HumanInputStep lifecycle (#20, breaking):
fallback_valueis removed; the host provider isasync (HumanInputRequest) -> HumanInputResponse;as_human_input_outcome()returns a typed status. - Structured output is validated against its JSON Schema; invalid schemas
and remote
$refs fail before the provider call.jsonschemais a core dependency. - LLM telemetry:
get_response_with_tools_and_usage(); cassettes record usage; malformed tool-call arguments are kept as the raw string. - Serialization: chain format 1 → 9 with a migration ladder
(
ReasoningChain.migrate).loop_back_to,loop_configandtriggered_byround-trip. - Portable artifacts (
ArtifactInput/ArtifactOutput/ArtifactRecord) and skill-runtime enforcement reports.
2026-06-02. Multi-agent steps (handoff,
supervisor,
debate,
parallel sampling,
human input); sandboxed
AgentSkill runtimes; ExecutionTrace, Gantt and
HTML playback; ChainBuilder.from_description and ChainEvolver;
AnthropicClient; record/replay; cost
estimation; dataset evaluation; MCP out of
experimental; pause/resume and cancellation; preflight, RunRecord and chain
metadata for MAESTRO.
2026-04-15. LLM client refactoring (removed mmar-llm-mapi), an examples
runner, fixes for conditional steps, serialization and input mapping.
Typed step classes, structured logging, chain timeout, per-step retry, OpenAI-compatible API, per-step LLM config, FAST / SELF_CRITIC modes, chain-level RE-PLAN, evaluation metrics.