English
Changelog
1.5.2
/configaccepts several assignments at once; fixed the OpenAI client not being updated after settingprovider.*.- The provider model probe is cached for 60 seconds instead of calling
models.list()on every config build. xunxgained arotate-token <user>command;--tokensets the new token (random by default).
1.5.1
Core
.envis now loaded explicitly by the program entrypoints (xun.core.config.load_env(), re-exported asxun.load_env()):import xunno longer reads or writesos.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
AfterExecutionStepArgshook argument gained a mutableshould_continue, letting extensions steer the execution loop. agent_waitnow returns a task snapshot alongside the result.- Finalizing an agent cancels its whole sub-agent chain.
- The execution core moved into the
xun.corepackage; the publicfrom xun import …surface is unchanged. - Added the
xun.sessioninteraction and persistence layer: agent snapshots and display events survive across processes. - The xun home default moved from
./.xunto~/.xun. - Fixed
.envresolution: it is now searched from the working directory upwards, and loaded whenxun.core.configis imported.
Tools & Security
- Removed the
cdargument of the bash tool; prefixcdinside the command instead. Shell-operator scanning is now deny-by-default: a symbol-only token outside the allowlist counts as suspicious. - Removed the
envsargument of the bash tool: set environment variables with inlineNAME=value commandprefixes, and variables that change execution semantics such asPATHnow 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
/saveand/loadcommands; snapshots are maintained automatically by the session layer.
API Changes
openai_clientis now an injectable, lazily built property.- Hooks can be removed through the signature returned at registration.
- The extension API version range
api_max_versionis now the half-open interval[min, max). - The display
bindparameter is narrowed to a living agent,Agent[T.Alive]. - Added the
CustomEventdisplay event: an extension-defined JSON payload, ignored by built-in displays and reserved for custom rendering. - The web session was abstracted into the
WebSessionprotocol, and the service mounts everything throughmount(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.
xunssession 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
/.xunto/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;movenow confirms the destination as well. - Compaction: user messages gained an
is_syntheticflag, 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
EventStoreprotocol, replaceable through thedisplay.event_storeproperty. - 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
conclusiveflag 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_errorflag, and every tool call — argument-parsing failures included — is now recorded as a call/result event pair. - Display methods
info/warning/errorrenamed todisplay_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_patchon top ofgit apply: consistent cross-platform behaviour and clearer error messages (requires Git to be installed). - Added background execution for sub-agents: replaced
agent_run_parallelwith 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
xunecommand: extensions can declare their own CLI (cli=(parser, handler)), run directly viaxune <name> .... - Extensions can declare
data_version; the framework provides a consistently laid out, version-isolated data directory (ExtensionContext.data_dir). - Added the
completion_token_updatehook: pushes token usage (including cache hits) for each model call. - Added the
statextension: records token and tool-call usage, registers reports shown in the session, and manages reports plus per-user daily / weekly / monthly budgets viaxune 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.stateto the typed containerAgentState: persistent and runtime entries are distinguished, and entries are fetched withget_entry(key, factory). - Moved lifecycle type annotations into
agent_lifecycle.py. - Renamed
cancellable_execution()torun_scope(). - Renamed
set_persistent_sectiontoset_system_persistent_section. - Changed
to_json/from_jsonto use structured JSON as their interface; exported the newToJson/FromJsonprotocols. - 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_parallelreplaced 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
xuncforwards arguments to the container. - Added
xunx shell <user>: opens a shell in a user's container, with--exec/--cwdto 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_settingsconfiguration entry: bucketed by extension name and read by extensions throughExtensionContext.settings. - The toolbox now supports querying disabled state, removing tools with
popand 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
sleeptool;evaluateinbrowsernow supports a timeout. - Added the
/handoffcommand: packages the current task into a zip handoff bundle. /configcan now edit configuration,/reviseaccepts new content,/compacthas improved parsing, and/rendergained 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@filereferences; confirmation prompts can interrupt the current input and restore it unchanged. - Fixed garbled display under multithreading.
Configuration & Prompts
AGENTS.mdis loaded as its own system-prompt section; added theload_project_instructionsswitch.
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:
/extensionsshows loading state, and initialization exceptions are raised and displayed clearly instead of only leaving a silent warning. - Version compatibility gate:
@extension_attrdeclares the supported version range; extensions outside the range are markedskippedand not loaded. - Added
xun_version()to query the current version.
Core & Hooks
- Execution hooks can take over execution: once
takeover_resultis set, the hook handler returns the result directly, skipping the execution step without writing to session history. - Added the
htmlinfo 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
cropparameter torequest_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 byxuns; 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'sacceptedreceipt; pending messages are resent automatically after a reconnect, and the server de-duplicates byclient_idto avoid running them twice. - Show file sizes in file info using scale units (B / KiB / MiB ...).
xunssupports--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.pyand the flat form{name}.py; the entrypoint issetup_extension(ctx). - Import or initialization failures only warn and do not block startup; the
enable_extensionsconfiguration entry can turn the feature off. - Added display-layer hooks
before_display_info/before_display_warning/before_display_errorto intercept agent output; added the/extensionscommand 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 intoAgentDisplayMixinand brought under type-state constraints. - Changed sub-agent getter parameters to the dataclass
AgentGetterParam. - Renamed the
shelltool tobash;copynow requires confirmation to overwrite an existing destination. get_choice/get_confirmreturnChoiceOutcome(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_confirmsupports theXUN_AUTO_CONFIRMenvironment variable.- The system prompt now requires checking and following
AGENTS.mdin 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
/.xunat container startup (onlyconfig.jsonandextensions). xunc --env/xunx serve --envsupportNAME=VALUEassignments and wildcard forwarding of host variables.xunxcontainer persistence:servere-adopts existing containers and keeps their sessions after a restart, and containers of deleted users are cleaned up during reconciliation.- Added
xunx upgrade; the runningserverebuilds containers at the next reconciliation.
Documentation
- Added bilingual Chinese / English documentation (MkDocs); the web service exposes it at
/docswithout 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.