Skip to content

Changelog ​

1.5.2 ​

  • /config accepts several assignments at once; fixed the OpenAI client not being updated after setting provider.*.
  • The provider model probe is cached for 60 seconds instead of calling models.list() on every config build.
  • xunx gained a rotate-token <user> command; --token sets the new token (random by default).

1.5.1 ​

Core ​

  • .env is now loaded explicitly by the program entrypoints (xun.core.config.load_env(), re-exported as xun.load_env()): import xun no longer reads or writes os.environ, so embedding xun as a library leaves the host environment untouched; environment-derived parameters are resolved at call time.

1.5.0 ​

Core ​

  • Added execution tracing: the cancel chain and span context propagate automatically, stream events are attributed to a span, and sub-agent dispatch carries a span snapshot.
  • The AfterExecutionStepArgs hook argument gained a mutable should_continue, letting extensions steer the execution loop.
  • agent_wait now returns a task snapshot alongside the result.
  • Finalizing an agent cancels its whole sub-agent chain.
  • The execution core moved into the xun.core package; the public from xun import … surface is unchanged.
  • Added the xun.session interaction and persistence layer: agent snapshots and display events survive across processes.
  • The xun home default moved from ./.xun to ~/.xun.
  • Fixed .env resolution: it is now searched from the working directory upwards, and loaded when xun.core.config is imported.

Tools & Security ​

  • Removed the cd argument of the bash tool; prefix cd inside the command instead. Shell-operator scanning is now deny-by-default: a symbol-only token outside the allowlist counts as suspicious.
  • Removed the envs argument of the bash tool: set environment variables with inline NAME=value command prefixes, and variables that change execution semantics such as PATH now force a review.
  • The bash tool checks whether its process pool has shut down before starting a command.
  • Re-registering a tool or command is now idempotent; overriding a command must be declared explicitly instead of replacing silently.
  • Removed the experimental /save and /load commands; snapshots are maintained automatically by the session layer.

API Changes ​

  • openai_client is now an injectable, lazily built property.
  • Hooks can be removed through the signature returned at registration.
  • The extension API version range api_max_version is now the half-open interval [min, max).
  • The display bind parameter is narrowed to a living agent, Agent[T.Alive].
  • Added the CustomEvent display event: an extension-defined JSON payload, ignored by built-in displays and reserved for custom rendering.
  • The web session was abstracted into the WebSession protocol, and the service mounts everything through mount(session); the previous context-manager interface is gone.

Web Service & Frontend ​

  • Added steering: send follow-up instructions while an agent is running; they are injected before the next execution step, shown as cards that can be edited or deleted.
  • Tracing views: added a trace graph and a flame chart, with tail-window zoom, filtering of rows without time in the window, and rows ordered by the agent call tree.
  • xuns session persistence: without a fixed working directory, sessions are stored under <home>/sessions/, every session shares one workspace, and stored sessions are remounted at startup.
  • The file list refreshes automatically when an active agent emits a conclusive message; fixed table columns being squeezed by non-wrapping code snippets.
  • Simplified the session sidebar style; sessions are sorted by creation time descending, newest first.

Containers & Multi-user ​

  • xunx user data is persisted: every user owns a separate home on the host, mounted into the container, so sessions, workspaces and extension data survive container rebuilds and upgrades.
  • The in-container xun home moved from /.xun to /xun.

Documentation ​

  • README gained the Docker prerequisites; added a documentation sync script.

1.4.3 ​

  • API call concurrency is now allocated per-agent slots: an agent reuses its previous slot, improving server-side prefix-cache hits.
  • File and browser tools hardened: the browser rejects file:// and other disallowed URL sources; move now confirms the destination as well.
  • Compaction: user messages gained an is_synthetic flag, handled distinctly when compacting with a gap notice; summary keep-recent default raised from 16 to 24.
  • Command parsing no longer treats # as the start of a comment.
  • Fixed sub-agent nesting depth not counting actual generations.
  • Fixed one-shot hook callbacks being lost when execution is cancelled mid-way.
  • Fixed conversation dump/compaction issues: UTF-8 encoding, token estimation during recursive compaction, and empty-conversation protection.
  • Display event storage is now a pluggable backend: the EventStore protocol, replaceable through the display.event_store property.
  • Each model-call retry now emits a fresh working event, so the UI no longer shows a stale state.
  • Skills extension: script run results include execution duration.
  • Internal defaults are now configured via environment variables (_XUN_MAX_API_CALL_CONCURRENCY).

1.4.2 ​

  • Structured-output parsing failures are now retried instead of raised.
  • Default API call concurrency changed from 3 to 8.
  • Model message events gained a conclusive flag distinguishing intermediate from concluding messages.
  • Framework display notices were trimmed: execution errors are reported once, at the entrypoint layer, instead of being repeated.
  • A failing tool call no longer emits an extra notice: tool result events gained an is_error flag, and every tool call — argument-parsing failures included — is now recorded as a call/result event pair.
  • Display methods info / warning / error renamed to display_info / display_warning / display_error; the old names remain as aliases.
  • Web: the tab title shows agent running/waiting state; the settings menu gained a source-code link; failed tool calls are marked with an icon and failure counts are summarized in the group and session headers.
  • Web: long model messages from non-selected agents can now be collapsed into a preview, with expand/collapse controls.

1.4.1 ​

  • Fixed sub-agent cancellation signal propagation: signals now survive across runs, fixing parent agents failing to stop when many sub-agents are running.
  • Made waiting for API concurrency permits cancellable; cancelling a request while permits are exhausted is no longer blocked.
  • Capped compacted tool-call records to bound memory and storage growth.
  • Made sub-agent nesting depth configurable; the default changed from 3 to 2.
  • Web: added an overlay, menu button and documentation entry to the settings panel; added preview zoom, file search and last-session memory.
  • Documentation: built with VitePress.

1.4.0 ​

Core & Tools ​

  • Redesigned the bash tool set: added background command tools so agents can start, wait for, kill and inspect long-running commands; output is split into log files and results report the duration.
  • Redesigned command risk assessment: verdicts are decided per element of the command-line structure, and dangerous patterns are rejected outright instead of going through confirmation; confirmation can optionally collect a rejection reason and pass it back to the agent, and verdicts now carry a brief reason.
  • Tightened the default command allowlist: removed risky commands such as curl / wget / sed, which now go through risk assessment and confirmation.
  • Rewrote apply_patch on top of git apply: consistent cross-platform behaviour and clearer error messages (requires Git to be installed).
  • Added background execution for sub-agents: replaced agent_run_parallel with the async agent interface, so several sub-agents can be dispatched in parallel and their results collected on demand.
  • Cancellation errors now carry the cancellation reason.

Extension System ​

  • Added the xune command: extensions can declare their own CLI (cli=(parser, handler)), run directly via xune <name> ....
  • Extensions can declare data_version; the framework provides a consistently laid out, version-isolated data directory (ExtensionContext.data_dir).
  • Added the completion_token_update hook: pushes token usage (including cache hits) for each model call.
  • Added the stat extension: records token and tool-call usage, registers reports shown in the session, and manages reports plus per-user daily / weekly / monthly budgets via xune stat.
  • Built-in extensions declare the minimum core API version they depend on: MCP ≥ 1.3.0, Skills / stat ≥ 1.4.0.

API Changes ​

  • Upgraded Agent.state to the typed container AgentState: persistent and runtime entries are distinguished, and entries are fetched with get_entry(key, factory).
  • Moved lifecycle type annotations into agent_lifecycle.py.
  • Renamed cancellable_execution() to run_scope().
  • Renamed set_persistent_section to set_system_persistent_section.
  • Changed to_json / from_json to use structured JSON as their interface; exported the new ToJson / FromJson protocols.
  • Changed the default event buffer capacity to 0 (set by the consumer); the setter is now the chainable with_buffer_size().
  • Redesigned the sub-agent tool set: agent_run_parallel replaced by the async agent interface.

CLI & Containers ​

  • Improved the interactive CLI display style; file-related commands are now registered uniformly across all interactive entrypoints.
  • Fixed how xunc forwards arguments to the container.
  • Added xunx shell <user>: opens a shell in a user's container, with --exec / --cwd to set the program and working directory.

Web Service & Frontend ​

  • Agent join / leave events show a preview only in the last batch; the auto-confirm flag is now displayed within the active batch.

1.3.0 ​

Extension System ​

  • Added the MCP extension: connects to servers as an MCP client (stdio supported) and exposes their tools as xun tools.
  • Added the Skills extension: supports Agent Skills packages, auto-discovers them and injects a condensed catalogue, activates them on demand, and keeps the catalogue and tools in sync automatically.
  • Added the extension_settings configuration entry: bucketed by extension name and read by extensions through ExtensionContext.settings.
  • The toolbox now supports querying disabled state, removing tools with pop and registering native functions, enabling extensions such as MCP.

Core & Tools ​

  • Refactored session messages into typed message classes, with separate roles for the system prompt, user messages and raw messages.
  • Made structured output a soft constraint: registering a tool no longer forces response_format, avoiding skipped tool calls.
  • Strengthened retries and backoff for completion requests; a new user instruction can reclaim the backoff window.
  • Limited the iteration and tool-call budget of the risk-assessment sub-agent (at most 3 tool calls).
  • Added the sleep tool; evaluate in browser now supports a timeout.
  • Added the /handoff command: packages the current task into a zip handoff bundle.
  • /config can now edit configuration, /revise accepts new content, /compact has improved parsing, and /render gained path validation and suffix tolerance.
  • Separated the built-in commands that write files from the default set; they are registered only on interactive entrypoints.

CLI ​

  • Switched the command line to prompt_toolkit: history search plus completion for / slash commands and @file references; confirmation prompts can interrupt the current input and restore it unchanged.
  • Fixed garbled display under multithreading.

Configuration & Prompts ​

  • AGENTS.md is loaded as its own system-prompt section; added the load_project_instructions switch.

Web Service & Frontend ​

  • HTML / Markdown previews: relative-path images, multi-file HTML, and preview by default for renderable files.
  • Previews can edit and create text files; nested directories can be created.
  • The settings menu shows the build version and commit.
  • Refactored the display layer: event storage is separate and events are isolated from display; refined mid-screen control styles, table column widths, prompt cards and the spectrum animation.

Containers & Multi-user ​

  • Pass the username environment variable when starting a user container.

1.2.1 ​

Web Service & Frontend ​

  • Added an agent running-state display event so the frontend can accurately show when an agent starts and stops running.
  • Fixed the activity preview flickering on updates; the working-state icon is now also shown on narrow screens.
  • Added a colored spectrum line to the footer.

1.2.0 ​

Extension System ​

  • Extension status and display events: /extensions shows loading state, and initialization exceptions are raised and displayed clearly instead of only leaving a silent warning.
  • Version compatibility gate: @extension_attr declares the supported version range; extensions outside the range are marked skipped and not loaded.
  • Added xun_version() to query the current version.

Core & Hooks ​

  • Execution hooks can take over execution: once takeover_result is set, the hook handler returns the result directly, skipping the execution step without writing to session history.
  • Added the html info event, rendered as rich text on the web.
  • Automatically detect the size of images returned by tools and scale down those that are too large; images referenced by URL are downloaded before being uploaded.
  • Added the crop parameter to request_image.
  • Tool-call arguments now uniformly tolerate lists passed as strings.
  • Changed the default maximum iterations from 256 to 512.

Web Service & Frontend ​

  • Sessions can be renamed.
  • Refactored the event stream: messages display independently of turns, collapsing is improved, a single agent auto-expands, plus in-progress summary cards and activity preview.
  • Static hosting can now serve the workspace root directly.
  • The slash-command cache now updates with the session.

1.1.1 ​

Containers & Multi-user ​

  • Fixed the workspace mismatch after mounting a directory with xunc <directory>.
  • Added xunx pause <user> / xunx resume <user>: pause or resume a user's container without discarding its state.
  • Fixed tokens starting with - being parsed as options by xuns; container startup now passes --token=<token>.

Web Service & Frontend ​

  • Improved websocket message sending: messages and commands carry a client_id, and the input box and attachments are cleared only after the server's accepted receipt; pending messages are resent automatically after a reconnect, and the server de-duplicates by client_id to avoid running them twice.
  • Show file sizes in file info using scale units (B / KiB / MiB ...).
  • xuns supports --no-initial-agent, allowing documentation to be browsed without configuring an LLM.

Extension System ​

  • No longer print the Loaded extensions: message at startup.

1.1.0 ​

Extension System (new) ​

  • Source files under $XUN_HOME/extensions/ are loaded automatically when each agent is initialized, supporting the package form {name}/setup_extension.py and the flat form {name}.py; the entrypoint is setup_extension(ctx).
  • Import or initialization failures only warn and do not block startup; the enable_extensions configuration entry can turn the feature off.
  • Added display-layer hooks before_display_info / before_display_warning / before_display_error to intercept agent output; added the /extensions command and an in-repo example.

Core & Tools ​

  • Staged session compaction: old tool results are reclaimed first, summary compaction runs only if the limit is still exceeded, and further rounds may follow after a summary; summary text no longer mixes into info messages.
  • Made cancellation events chained, so cancelling a parent agent cascades to its sub-agents; the web display also responds to cancellation while waiting for input.
  • Split lifecycle state into agent_state.py; display methods were extracted into AgentDisplayMixin and brought under type-state constraints.
  • Changed sub-agent getter parameters to the dataclass AgentGetterParam.
  • Renamed the shell tool to bash; copy now requires confirmation to overwrite an existing destination.
  • get_choice / get_confirm return ChoiceOutcome (chosen value + source); auto-confirm no longer writes to the command and path allowlists.
  • Fixed tool-call arguments getting out of sync with history after JSON repair.

Configuration & Prompts ​

  • auto_confirm supports the XUN_AUTO_CONFIRM environment variable.
  • The system prompt now requires checking and following AGENTS.md in the working directory first.

Web Service & Frontend ​

  • File browsing: PDF and full-screen previews, syntax highlighting and inline editing in text previews; list and details in separate columns for faster scanning; panels are mutually exclusive on narrow screens.
  • Uploads accept whole directories; the result notification lists all files and dismisses itself.
  • Added static hosting at /srv/, serving sites inside the working directory directly (expires after 1 hour by default).
  • Optimized event-list loading and transfer; input content persists across sessions; UI text is bilingual Chinese / English.

Containers & Multi-user ​

  • Copy the host xun home into /.xun at container startup (only config.json and extensions).
  • xunc --env / xunx serve --env support NAME=VALUE assignments and wildcard forwarding of host variables.
  • xunx container persistence: serve re-adopts existing containers and keeps their sessions after a restart, and containers of deleted users are cleaned up during reconciliation.
  • Added xunx upgrade; the running serve rebuilds containers at the next reconciliation.

Documentation ​

  • Added bilingual Chinese / English documentation (MkDocs); the web service exposes it at /docs without login.

1.0 — 2026-09-15 ​

First official release: the execution loop with structured output, functions-as-tools with 8 built-in tool groups, the display layer (console / web / null) and the web frontend, sub-agent generation and session compaction, session commands and policy confirmation, and the xun / xuns / xunc entrypoints plus the xunx multi-user multiplexed service.

Xun 1.5.1 (source 88942ea, 2026-11-07) documentation, generated from the source tree.