The streamed step labels refactor dropped the trailing ellipsis on four extension labels, so the browser evaluate, text editor, parallel and call_subordinate steps read as bare phrases while the default and code execution labels kept their dots. Each extension owns its full label text and appends the ellipsis itself, matching how the default and code execution labels are written, while the argument length counter stays centrally appended. The browser extension now also labels its long multi and cdp actions and names the tool in every label, so Evaluating alone no longer hides which tool runs.
Validation: pytest tests/test_tool_step_description.py tests/test_plugin_tool_step_descriptions.py tests/test_plain_response_logging.py -q (86 passed); git diff --check
Per-action streamed labels now cover only the calls whose arguments take real printing time: code execution, text editor, browser evaluate, and call_subordinate with its requested profile. Labels reuse the owning tool classes' verb maps, and the parallel tool names the first of its calls and the remaining count.
Validation: pytest tests/test_plugin_tool_step_descriptions.py (52 passed), tests/test_tool_step_description.py (14 passed), tests/test_plain_response_logging.py (18 passed), tests/test_response_stream_cadence.py (3 passed)
The response_stream log extension hardcoded one tool name to build the step label beside a streamed call. The label now comes from build_step_description, which seeds the generic text from the humanized tool name (underscores as spaces) and dispatches a display-only tool_step_description hook plugins rewrite, with the compact serialized args length appended centrally after the chain so argument streaming stays visible.
Validation: pytest tests/test_tool_step_description.py (14 passed), tests/test_plain_response_logging.py (18 passed), tests/test_response_stream_cadence.py (3 passed)
Recovered turns showed no hint that the reply was kept as thoughts and retried, because earlier notices had been silenced and the new non-action prose branch logged none. The notices return as utility rows following the Show utility messages preference and carry the warning message id so they stay attached to their history warning. Both plain-text rows share one wording adapted from the pre-silence fallback prompt, following the surviving fw.msg_reasoning_only_response.md pattern and the recovery-notice sync contract that keeps the core and plugin rows identical.
Validation: pytest tests/test_message_loop_result.py plugins/_context_doctor/tests/test_context_doctor.py tests/test_leaked_tool_call_integration.py tests/test_unusable_response_loop.py tests/test_plain_response_logging.py tests/test_responses_architecture.py tests/test_prompt_catalogs.py (7 failed, 327 passed in 9.28s; the failures reproduce identically on the base commit)
MCP servers can return usage instructions in their initialize result,
such as which tool to call first or what an argument means. Agent Zero
discarded them. Capture them when a server connects and add them to the
MCP part of the system prompt, the way reference clients do.
- Capture InitializeResult.instructions on the update_tools (re)connect
path and cache them with the tools. A failed reconnect clears them, and
tool calls never change them.
- Render one "MCP Server Instructions" section after the MCP tools, with
a part for each server that offers at least one allowed tool. The
framing tells the model that the instructions are context, not
capabilities, and that tool names in them are the server's own.
- Contain each server's text. Cap it at 4096 characters, demote its
headings (including --- and === underlined ones) below its part, close
open code fences, drop control characters and neutralize template
syntax.
- Build the section inside get_tools_prompt. The Responses transport
rebuilds the MCP section from that method, so it keeps the section.
- Report has_instructions in the server status API, mark such servers in
the server list, and show the text in the server detail modal. Pass
the instructions to the MCP scanner's AI review.
- Document the behavior, note it in the agent's self-knowledge, and add
tests.
Let loaded skills declare callable schemas and bind them through plugin extensions using normal scoped skill resolution. Use the same binding for native tool declarations, Tool Access, and dispatch.
Move Document Query behind the skill registration and remove both standalone entry points. Preserve saved denials, destination permissions, and the existing indexing, worker, and streaming backend.
Launch Chromium against the existing guest profile and keep native window restoration, scoped handles, the private viewer and lazy startup. Follow iframe history through document readiness, authenticate proxies before restoring tabs and finish bounded shutdown before reopening the profile.
Adopt the installed guest browser offline or install Debian Chromium on first use. Keep interrupted setup retryable and retain the scoped outer SDK cleanup on source upgrades. Exercise the pipe, DOM isolation, provisioning and migration with disposable fixtures.
Keep the v3 browser and filesystem observer implementations. Restore secure Telegram project and agent-profile scopes on the v3 sandboxed transport, including migration, session ownership, and current authorization checks.
Restore global, project, profile, and project/profile configuration with
one bot identity per saved scope. Preserve inherited configuration and
pause conflicting legacy bot identities without discarding their settings.
Revalidate scope, activation, and access rules for inbound messages,
commands, callbacks, session selection, and outbound delivery. Keep scoped
bots within their owning project/profile, omit credentials from persisted
chat metadata, and sanitize attachment filenames.
Automatically back up existing configuration, activation, and session
mappings before upgrade. Preserve their contents and stable global session
keys, while provisioning secure webhook secrets where legacy settings
require them. Document scope ownership, conflict recovery, and migration.
Validation:
- Docker framework suite: 216 passed, plus 73 subtests.
- Live Telegram status and message/reply round-trip confirmed.
- Missing and forged webhook credentials rejected with HTTP 403.
- Existing live configuration, activation, and session mappings unchanged.
Move tunnel, browser, document, speech and integration runtimes into plugin-owned
sandboxes with lazy dependencies and instance-scoped lifecycle management.
Reuse Tuxee display assets and the sandbox image's Python/Node runtimes, enable
automatic Desktop login, and show elapsed time for each browser launch.
Slim the outer image, use offline ONNX embeddings, and calculate sandbox storage
only on demand. Include regression coverage and updated runtime documentation.
Exclude local handoff notes and temporary verification artifacts from publication.
Expand §§include(path) recursively at the tool execution boundary so
Chat, native Responses, and parallel calls receive file contents even
without streaming. Mutate the original argument dictionary so both
execution kwargs and tool.args receive the expanded values.
Run expansion before tool-policy checks and secret unmasking. Preserve
unreadable-file placeholders, add regression coverage, and document
hook ordering.
Validation: 133 focused tests passed in the a0 conda environment; seven
targeted tests passed in the live localhost:32081 container's framework
runtime. Full-suite and LLM-driven UI testing were not run.
Preserve free text and reasoning-only output in the current generation
and retry without intermediate warning rows. Require an explicit response
tool call to finish in both API modes, including after provider built-in
actions.
Keep history metadata, Responses state, tool validation and the
consecutive-failure stop intact. Allow core retries when Context Doctor
and its prompts are unavailable.
Validation: 411 backend tests and 2 Chromium live/replay grouping tests
passed; live runtime health check passed.
Give updated and restored WebUI runtimes ten minutes to become healthy,
preserving A0_SELF_UPDATE_HEALTH_TIMEOUT_SECONDS overrides. Backup and
checkout still precede the health-check window.
Expose the configured timeout in update information and use 600 seconds
as the browser fallback, retaining its 30-second buffer. Upgrade older
durable managers through the existing migration with backup protection.
Validation: 55 focused tests passed in the Docker framework runtime.
Three frontend simulations passed for recovery after six minutes, a
900-second override, and expiry at the default 630-second browser limit.
Allow user-data backups to include files dated outside ZIP's supported
range without changing source file dates. Use deflate level 1 to reduce
backup time while preserving backup contents and existing exclusions.
Require both capabilities in the existing startup migration so installed
durable updaters receive the fixes. Cover old timestamps, archive contents,
and migration of older backup settings.
Validation: 53 focused tests passed in the Docker framework runtime.
On an identical 2.079 GB snapshot, compression level 1 reduced average
backup time from 39.5 to 32.9 seconds with 2.1% larger archives. All four
benchmark archives passed CRC and matching-content checks.
Keep the original model response in turn-local repair data so Context Doctor
honors Update log content: off retains raw XML/DSML in View Details, while
on shows repaired JSON. Mark successful recovery notices as utility messages
so they follow the existing UTL visibility preference.
Accept an outer headline alongside DSML tool_args and preserve it through
normalization. Keep parallel calls, nested arguments and command escaping
intact, with normal repair fallback and dispatch unchanged.
Add regression coverage for both transports, log-setting states, disabled
Context Doctor, repeated repair hooks and outer versus nested headlines.
Update the owning documentation and include the reported DSML fixture.
Validation: 263 focused tests passed locally and in the Docker framework
runtime. The live instance restarted successfully and its health check passed.
Let unconverted alternate-format output reach Context Doctor's existing JSON
repair path. Remove the leaked-call rejection state, retry hook and prompts
so missing delimiters and other repairable output can execute in the same
turn, restoring the behavior from before PR #1920.
Keep complete XML/DSML/native-text conversion, normal tool permissions,
Context Doctor's XML history cleanup and existing output-limit handling.
Update integration tests and ownership documentation for the restored flow.
Validation: 504 targeted tests passed both locally and in the Docker framework
runtime, including actual agent-loop tests for missing brackets and braces.
Historical comparisons matched pre-PR behavior in 48 cases and confirmed
12 additive format-conversion cases. Restarted the local runtime and verified
its health and extension discovery.
Separate leaked-call classification from retry handling so Context Doctor
can apply XML suppression, thought splitting, and log settings before the
history entry is saved. Keep rejected calls out of JSON repair and tool
dispatch; disabling XML suppression retains them only as thoughts.
Core still owns bounded retries and history insertion, defaults to {} when
the plugin is disabled, and clears replayable Responses output and pending
continuation state. Update plugin settings guidance and ownership docs.
Validation: 455 focused tests passed locally and in Docker's framework
runtime. Restarted the idle live app, verified health and actual extension
ordering, and found no startup error markers.
Store a neutral {} for rejected or incomplete leaked calls so retries do
not reinforce malformed XML or JSON. Keep the original result available
for diagnostics and preserve the existing warning and retry limits.
Remove replayable output items from the history copy and clear the
Responses continuation after normal history insertion. Retain recorded
turn IDs and usage while forcing the next request to use cleaned history.
This works with Context Doctor enabled or disabled.
Validation: 349 focused parser, dispatch, history, Responses, streaming,
Context Doctor, and retry-limit tests passed for this standalone change.
Let profiles allow individual operations across all 12 bundled multi-action
tools, such as reading files without allowing writes or listing scheduled
tasks without allowing deletion.
Share action contracts across runtime policy, Agent Editor, text prompts,
and native schemas. Preserve existing whole-tool policies and legacy memory
IDs; only explicit permission edits persist the editor's projection.
Check aliases, defaults, browser batches, reset flags, and parallel
operations at execution. Apply action permissions to automatic browser
context and skill hints.
Validation: 742 focused tests passed. Live Docker checks verified allowed
reads, denied writes through native/legacy/parallel dispatch, blocked
scheduler deletion, and editor save/reload.
Framework warning log rows no longer repeat the agent name before the message text, covering tool and execution errors, the misformat notice, and the truncated, empty, repeat and fallback response warnings. A source-level regression test keeps the warning rows prefix-free, and the message-loop and context-doctor DOX and tests stop expecting the removed prefix.
Validation: pytest tests/test_warning_log_prefixes.py tests/test_tool_action_contracts.py tests/test_message_loop_result.py plugins/_context_doctor/tests/test_context_doctor.py
Failed scheduler tasks stayed in Error when their chats resumed outside the
scheduler runner, even after successful replies and a persistence reload.
Persist the owning task UUID in chat context data and reconcile successful
main-agent monologues with the associated errored task. Save Idle, the
recovered result and its completion timestamp through a checked update.
Preserve planned launch progression, normal retry callbacks and unrelated,
disabled, removed or reassigned tasks. Legacy dedicated chats resolve by
context ID; legacy shared chats still require an explicit scheduler retry.
Add regression coverage for failure, restoration, two successful chat steps,
all task types, JSON/YAML persistence, cancellation and ownership guards.
Update the scheduler and extension contracts.
Validation: 31 scheduler tests passed in the localhost:32081 container's
framework runtime. Broader lifecycle checks: 65 passed, with one unrelated
nudge fixture failure reproduced with reconciliation disabled. No live
provider/model-switch test or service restart.
Reject incomplete native-call argument JSON during output-limit recovery
while allowing complete calls to proceed. Publish observed finish reasons
and canonical calls before terminal or flushed stream output reaches
callbacks, so early cancellation preserves the original result metadata.
Cover sync and async installed-SDK streams, callback stops, incomplete and
mixed native-call batches, and result/history metadata compatibility.
Update the owning extension and transport documentation.
Validation: 327 focused tests passed in the Docker framework runtime;
333 tests and 11 subtests passed in the updated local environment.
Live localhost:32081 checks passed with Codex Responses and Opus Chat
Completions through the Agent Zero LLM API. A real 64-token Opus cutoff
produced the dedicated length warning and recovered in one retry.
Record the Chat Completions finish_reason on LLMResult and add a
message_loop_result extension that, when a turn stopped at the output
token limit (finish_reason "length"/"max_tokens") without a complete
tool request, retries with a warning naming truncation as the cause
rather than the generic misformat message. The warning counts toward
the existing unusable-response loop limit.
Context Doctor now leaves results already handled by an earlier
extension untouched, so truncated envelopes are not repaired and
dispatched with cut-off arguments.
Fixes#1836
The synthetic Hello! user turn was limited to the main agent, so subordinate agents started their history without the few-shot example of the response tool-call JSON. Remove the agent-number guard so every agent receives the seed turn, which the initial_seed metadata marker already keeps out of chat naming for delegated children.
Validation: pytest tests/test_initial_message.py plugins/_chat_naming/tests/test_chat_naming.py (20 passed) on the framework runtime.
The agent-init greeting extension seeds every new chat with a synthetic user turn that chat naming treated as a real user message, so fresh chats were named after the greeting and later band-aids delayed or re-defaulted naming to escape the trap. Mark the seed turn with initial_seed metadata at creation, skip marked turns in user-message selection so seed-only chats schedule no Utility Model call and a real first user message names the chat immediately, and schedule naming from monologue_start again since the background task cannot delay the Main Model.
Validation: pytest plugins/_chat_naming/tests/test_chat_naming.py tests/test_initial_message.py (19 passed) on the framework runtime.
The profile-settings hook merged a priority-first lookup list with
last-value-wins updates, allowing bundled settings to overwrite community
plugins and higher user/project scopes.
Merge plugin-wide settings, bundled profile, plugin profiles, user profile,
project settings and project profile from low to high priority. Use the
existing stable root-priority sort within each plugin layer, preserving
same-root discovery order, activation scope and cached lookup lists.
Add a failing-before/passing-after regression for both plugin layers,
scoped overrides, fallback, malformed settings and profile/MCP inheritance.
Strengthen metadata override tests with community plugins enabled and
update the agent-init contract.
Validation: 207 focused local tests and 18 precedence tests in the Docker
framework runtime passed. Two isolated fresh-context initialization smoke
checks passed in Docker. git diff --check passed.
Update LiteLLM to 1.104.0, OpenAI to 2.54.0, and python-dotenv to 1.2.2.
Raise shared security floors for aiohttp, anyio, urllib3, filelock, fsspec,
and multidict while retaining the compatible OpenAI 2.x SDK line.
Use the existing startup_migration hook to apply the same requirements to
v2.x Docker instances updating to v2.14. Read versions from requirements.txt,
install only when requirements are unmet, and reuse restart_process() to
load the upgraded SDKs before serving requests. Skip current and non-Docker
environments, bound installation time, and propagate installation failures.
Add installed-SDK HTTP tests for Chat Completions, Responses, streaming,
tools, state, usage, fallback, embeddings, and Anthropic cache markers.
Cover dependency migration, restart behavior, and installation failures.
Validation:
- 70 focused dependency, SDK, and self-update tests passed.
- Docker startup upgraded the v2.0-v2.13 SDK pins and became healthy in
24 seconds, with exactly one dependency installation and process restart.
- An already-current startup performed no installation or extra restart.
- pip check passed; live Codex Responses and Moonshot Chat Completions
tasks and follow-ups validated the upgraded SDK versions.
Compare public commentary together with canonical function calls when
recording and checking the previous response. This restores the historical
full-message policy for native turns, so changed or missing commentary
can distinguish otherwise identical calls.
Keep canonical call history, masking, provider metadata and state
advancement intact. Exclude provider IDs and separate reasoning from the
comparison; identical public text and calls remain guarded.
Cover commentary changes and absence, call changes and batches, provider
metadata round trips, and legacy thoughts/headline behavior. Update the
owning contracts. Verified with 177 passing tests, four recorded Mac
warning replays and a live two-call drill using the Codex II preset.
Show public commentary alongside native tool calls in generation logs while preserving separate reasoning summaries. Request commentary without a sentence limit and retain canonical calls when Chat Completions also returns text.
Use display-only previews for agent turns and reconcile completed output without changing legacy callbacks, native dispatch or provider metadata.
Validated with parser, streaming and prompt regression tests, plus live Codex II ordinary and parallel tool chats.
Keep per-build replay state and model-call adaptation in the existing
Responses helpers instead of adding transport fields to LoopData or a
history-conversion method to Agent. Prompt section owners identify sections;
Responses owns alternate templates, while MCP supplies filtered server context.
Remove the persisted replay counter used only for diagnostics.
Retain public history compatibility, canonical masking and shared stream
normalization at their existing boundaries. Across the remediation series,
agent.py additions decrease from 61 to 24 lines without introducing new hooks.
Validation: 1633 root tests passed, one skipped; framework prepared-input
probe passed. Live Codex and Venice presets completed terminal checks, with
56% cache hit shown in the Codex Context window viewer.
Project intact call/result groups from the current prepared local Responses
input, retaining original IDs and encrypted reasoning. Bind replay to the
visible prefix and tool scope; preserve summaries, masking, protocol, extras
and untouched Chat/fallback input. Keep request conversion in Responses helpers.
Recover output items omitted by terminal stream envelopes and keep native
call commentary out of plain-response finalization. Do not rewrite stored
chats or change tool execution policy.
Validation: 1632 root tests passed, one skipped; framework prepared-prompt
probe passed. Live Codex and Venice presets completed terminal calls, native
replay advanced from three to four calls, and the viewer reported 57% cache hit.
Correct the initialization contract: the synthetic user seed is hidden, while the assistant greeting has a response log linked to its history ID. Preserve the existing user-first ordering and intentional Context Doctor thoughts splitting.
Add coverage for idempotent initialization, JSON and plain-text greeting profiles, linked logs and non-LLM metadata after reload. Verified with 48 greeting, history, prompt-protocol and Context Doctor tests.
Expose named Responses function arguments as they arrive, buffering interleaved display envelopes while retaining canonical call metadata. Normalize tool aliases before stream consumers and apply masking before complete tool previews as well as partial ones.
Reject incomplete generations and native-call streams without completion so partial previews cannot become executable text calls. Verified with 103 focused tests, a framework runtime probe, live Codex Responses and Venice Chat Completions runs, and a 69% Codex cache hit in the Context window viewer.
Store canonical function-call content through the existing assistant history and masking path, preserving original provider metadata. Compare that same content when detecting repeated responses so accompanying commentary cannot hide distinct calls.
Validated with 87 focused architecture, result, logging and Context Doctor tests plus a framework runtime history/repeat probe. Native history replay remains a separate change.
Record protocol substitutions at the existing system-section owners and apply
them to copied Responses input when native A0 tools are present. Keep original
Chat and fallback messages intact, remove duplicate local tool guidance, and
preserve policy-filtered MCP server context.
Provide a profile-overridable native communication template and keep the JSON
brace terminator in the legacy protocol. Stored history remains unchanged.
Verified 127 focused tests, Docker framework rendering, and same-chat Codex to
Venice to Codex terminal tasks. Codex input fell from about 16.4K to 11.3K after
removing duplicate guidance. Native history/reasoning replay remains separate.
Track rollback snapshots by Git object ID so an existing stash does not
make a successful snapshot look like a failure. Apply the saved object
and resolve its current reflog entry for cleanup, preserving unrelated
stashes and retaining snapshots when restoration fails.
Upgrade installed updater copies through the existing startup migration.
Cover staged, unstaged and untracked changes, changing stash stacks,
conflicts and stale runtimes. All 50 focused tests pass; the installed
framework-runtime check passes and the restarted WebUI returns HTTP 200.
Add LLMResult.non_llm classmethod for non-LLM AI turns (greeting, intervention progress) so stored metadata does not claim a Responses-API turn. Rename is_thoughts_fallback to looks_like_tool_call (inverted polarity: True when valid A0 response JSON). Rework check to accept any dict containing at least one A0 key (thoughts/headline/tool_name/tool_args); empty dicts and non-A0 dicts fall through to the raw-text fallback branch. Fix drawMessageAgent kvps order to thoughts, tool_name, tool_args keys (reserved keys skipped), then step; reserved keys (thoughts, step, reasoning, tool_name, tool_args, args, headline) win over colliding tool_args keys. Document Hello! seeding turns as few-shot example, drawMessageDefault as deprecated, and plugin get_log_object duplication as intentional. Align context_doctor DOX kvps sentence with code (reasoning only, not thoughts).
Make llm_result required in hist_add_ai_response and move _remember_llm_result_state inside so plugin authors cannot silently break response_id chaining. Drop manual state calls in main loop and _30_repeat_response. Pass empty LLMResult() for greeting and intervention progress. Document invariant in root AGENTS.md and affected extension DOX.
Drop duplicate plain-text-invalid clause from response_tool_tips (covered by communication.md). Note reasoning-to-thoughts revert (77e55152) as maintainer UX call in response_stream_end DOX.
Context Doctor's fw.msg_thoughts_fallback.md warning was excluded from the core stop-unusable-response loop allowlist, so consecutive plain-text fallbacks never advanced the counter. Add it alongside misformat, repeat, empty_response, and reasoning_only, update the plugin DOX, and cover the behavior with a regression test.