Repository navigation
v0.80.72
·
2728 commits
to main
since this release
A-Coder 0.80.72 ships Your Office — a society of named coworkers with huddles and errands living inside the engine — along with background sessions that keep turns running when you switch away, and a reworked plan mode with a persisted plan file, auto-accept, and an exit-approval dialog. The TUI gains /context, /diff, /permissions, output styles, and thinking controls, while the engine fixes compaction timing, provider message-order validation, and RPC abort/steering behavior.
Highlights
- Your Office: named coworkers with faces, huddles (group conversations) and errands (scheduled jobs with memory) live inside the engine, persisted under
~/.a-coder/cli/office/with a canonical session per project so memory and history survive restarts. Huddle sends drive a bounded round-robin (max 3 rounds / 10 messages, "(pass)" silence, hold directives like "stop @atlas"); errands fire on a 30s ticker with every/daily/once schedules and run inside the coworker's own session. Surfaces:office_*RPC commands +office_update/office_huddleevents (desktop Office panel, third tab in the right sidebar) and the/officeTUI command (hire,huddle,tell,say,stop,errands). - Background sessions: switching away from a session with a turn in flight no longer aborts it — detached runtimes keep streaming to their session file and re-attach on switch-back, with new
get_sessions_status/abort_sessionRPC, pushedsessions_updateevents, and multi-project hosting so the desktop no longer restarts the engine when switching projects. - Plan mode: a persisted plan file the model can write, read-only bash commands auto-approved while planning, a third "Yes, auto-accept rest of plan" permission option, and an exit-plan approval dialog offering proceed / switch to ask mode / keep planning with typed feedback.
- Output styles and thinking controls:
/output-stylesystem-prompt overlays (default/Explanatory/Learningplus custom.mdfiles) reshape how the agent answers without changing its tools;/think [level]and "ultrathink"-style keyword escalation adjust reasoning depth (raise-only, reasoning models only). - New TUI surface:
/context(context-window bars),/diff [n](working-tree patch + rewind preview),/permissions(interactive policy-rule editor),/memorypicker, a unified running-tasks viewer for background bash and sub-agents,statusLinecustom footers, and session picker 1-9 quick keys. - Engine fixes: large tool results no longer reach the provider before threshold compaction (#6879), compaction no longer forces
toolChoice: "none"that OpenAI-compatible gateways reject (#8649, #8638), extension messages withtriggerTurn: falseno longer break message order (#8537), and RPCabort/steer/follow_upsemantics were corrected (#8920, #8718).
Details
Engine
AGENTS.override.mdper-directory context overrides: when a directory containsAGENTS.override.md, it is loaded instead of that directory'sAGENTS.md/CLAUDE.md; other directories layer normally (upstream pi earendil-works#7681 parity).SessionManager.inMemory(cwd, options, entries)restores sessions held outside the filesystem (e.g. a database): entries are adopted with their tree, labels and compaction structure intact, a stored session header carries its identity and version through migration, and headerless entries become the body of a fresh session (upstream pi earendil-works#8980 parity).ui_prompt_start/ui_prompt_endextension events (upstream pi earendil-works#8355 parity): hosts can distinguish active agent work from time spent waiting on blockingctx.uiprompts (select/confirm/input/editor/custom), with nested prompts tracked by depth; RPC/desktop clients receive them as extension events for waiting-state rendering.pi authcommand surface (upstream pi 99e3401/a261366bd parity):auth print-api-key,auth print-bearer-token --min-expiry <duration>, andauth check [--json] [--credentials] [--no-refresh]resolve credentials through the model registry and auth storage without starting a session.--no-refreshonly refreshes tokens that are already expired;--min-expiryrequires validity for the requested window and refreshes proactively.ctx.modelRegistry.stream()andstreamSimple()for extension model calls through configured providers with resolved authentication (upstream pi earendil-works#8964/earendil-works#9272 parity). Setup failures surface as error events on the returned stream.- RPC
clear_queueretrieves and removes queued steering and follow-up messages, for interactive Esc behavior (upstream pi earendil-works#8432 parity): clear beforeabort, then restore the returned text in the client editor. - In-place managed-install updates stage the release tarball, verify its SHA256, and atomically activate it.
- Background bash processes now notify the agent when they terminate (done/error — by exit or timeout): the same
<task-notification>wake used for detached sub-agents fires a turn reporting the outcome, including exit code, duration, line/byte totals, the output tail and the full-output log path. Multiple terminations within one wake window batch into a single turn, and a persistently failing wake prompt backs off 2s instead of spinning. A user kill from the running-tasks viewer stays quiet and only rides along on the next submission, as does a sub-agent killed via the viewer orkill_subagenttool, since the killing party already knows. - Full-turn auto-retry honors provider
Retry-After: error assistant messages can carry aretryAfterMshint (extracted from Retry-After/-Ms headers or SDK fields); the retry waits that long instead of the backoff schedule, capped by the newretry.maxDelayMssetting (default 60000ms, same cap as the backoff tiers). - Auto-retry hardening: a turn whose failed attempt already streamed visible output (non-empty text or thinking, or any tool call) is no longer silently replayed — the error surfaces instead, avoiding duplicated visible output; consecutive overloaded/529 failures stop auto-retrying after 3 attempts (reset by any successful turn or a non-overload retry).
- Background-process output notifications are throttled to ~10Hz (leading + trailing edge) in the store itself: a chatty background command no longer drives per-chunk renders and per-chunk
background_processes_updateRPC events to the desktop; completion events still notify immediately. task_createbatch creation: the tool now takes atasksarray (each withsubject,description, optionalactiveForm/metadata) and creates the complete task list in one call instead of one round-trip per task; ids are assigned sequentially and the result text lists every created id.- Persistent task graph:
task_createand further task tools (full entry truncated in the source material).
Fixed
- Direct RPC
steerandfollow_upcommands bypassing extensioninputhandlers (#8718): both now run through the same input-handler/queue path as interactive submissions, withsource: "rpc". - RPC
abortreporting success without cancelling an in-progress manual compaction (#8920): abort now also cancels compaction and branch summarization, and the session exposesisIdle/waitForIdle()so abort settles before responding. - Large tool results crossing the auto-compaction threshold were sent to the provider before compaction. Threshold compaction now runs between tool execution and the next assistant response in the same run, and interactive progress resumes when the run continues (#6879, upstream earendil-works#8782).
prepareNextTurnnow runs only when a next turn actually happens, aftershouldStopAfterTurn. - Extension messages sent with
triggerTurn: falsewhile the agent is running were inserted between a tool call and its result, which made providers that validate message order reject the replayed history. They are now appended once the turn's tool results are in (#8537). - Compaction and branch summaries forced
toolChoice: "none", which OpenAI-compatible gateways reject when no tools are sent (#8649, #8638). read,write,edit,grep,find,ls, andbashtools ignoredctx.cwdwhen registered by extensions with a different session cwd (#8627).- Proxied plain-HTTP provider requests hung after a tool call; they are now tunneled with CONNECT (
proxyTunnel, upstream earendil-works#8134).
Sessions & RPC
- Background sessions (Phase 1 of the session architecture roadmap in
desktop-app/SESSION-ARCHITECTURE.md): a mid-turn runtime moved off the active slot keeps streaming to its own session file in the background and is reaped once it settles (turn ended, nothing queued); switching back re-attaches the same live runtime. When a background turn hits a tool-approval prompt or extension dialog, the runtime is flaggedneedsInput(viamarkSessionNeedsInputfrom the RPC host's dialog bindings) and cleared when answered. New RPC:get_sessions_status(per-sessionrunning/pendingMessageCount/active/needsInput),abort_session(abort a background turn by session path), and a pushedsessions_updateevent whenever the registry changes. Detached runs keep their own extension bindings;session_shutdownfires when they are reaped./clearstill aborts (it rewrites the session file in place, so a detached writer would race it). - Phase 2: detached runtimes stay alive after their turn settles (idle keep-alive, 30-minute default reap,
setDetachedIdleTimeoutMsoverride) so switching back is a pure re-attach;prompt/steer/follow_up/abortaccept an optionalsessionPathtargeting a background session (engine resolves it viagetSessionForPath);switch_sessionresponses carryreattached+ a snapshot (running/needsInput/pendingMessageCount) so clients can adopt in-flight turns immediately; blockingextension_ui_requestevents (confirm/select/input/editor/question + permission prompts) are tagged with thesessionFileof the session that opened them. - Phase 3 (multi-project): the engine hosts sessions from any project — each runtime's cwd-bound services follow the session's recorded cwd — so the desktop no longer restarts the engine when switching projects.
newSession/new_sessionaccept acwd(the session lands in that project's session dir); switching to a project resumes its most recent session or starts a new one. Extension-initiated replacements (ctx.newSession()/ctx.switchSession()/ctx.fork()) passdiscardPreviousto preserve the stale-ctx contract (earendil-works#2860), while user-driven switches keep the previous runtime live in the background registry. background_processes_updateRPC event: headless/RPC mode now streams background bash-process snapshots to clients (desktop) so they can show running bash commands live, alongside the existingsubagents_updateevent.- The MCP client now negotiates the
rootscapability and reports the session's working directory toroots/list(root defaults to cwd; resource-loader passes the session cwd). Roots-aware servers like chrome-devtools-mcp scope their file-writing tools to the project instead of falling back to the OS temp directory, sotake_screenshotwith afilePathinside the session's project works; paths outside stay denied.
TUI
/contextvisualizes the context window split (System prompt / Tool definitions / Conversation history / Free space) as proportional bars with token counts and a low-space hint./diff [n]shows the git working-tree status, shortstat and a budgeted colored patch plus the file-history section: what rewinding the last n user turns would change./memorypicker: lists global MEMORY.md, project (workspace) MEMORY.md and the current session's memory file with "(new)" markers for files that don't exist yet; Enter opens the selected file in your external editor (new files get a minimal# Memorytemplate), and the agent reads the file fresh on its next turn./permissionscommand: interactive manager for the "auto" permission-mode policy rules (allow / soft-deny / hard-deny) backed by the existingPermissionPolicyConfigengine. Lists every configured rule grouped by category; select a rule to remove it (with confirm) or use the "Add …" rows to add a new rule (e.g.bash,edit,mcp__server:*,$defaults), so policies can be edited without hand-editing settings.json./rewindnow survives a session resume: file-history snapshots are mirrored into the session transcript asfile_history_snapshotentries (invisible in LLM context; hidden in the default tree view, labeled checkpoints in "all" view), restored on load and re-hydrated when navigating session-tree branches, so rewind targets the active branch's checkpoint chain./output-style <name>now offers fuzzy argument completion over registered style names (the active style is filtered out).- Output styles: switchable system-prompt overlays (
default/Explanatory/Learningplus custom.mdfiles under<agentDir>/output-styles/and<cwd>/.a-coder-cli/output-styles/) that reshape how the agent answers without changing its tools. Switch at runtime with/output-style [name](opens a selector with no arg); the choice is persisted tosettings.outputStyleand applied on the next prompt. /think [level]slash command (with argument completion) next to the existing keybinding cycling, plus thinking-keyword escalation applied at the session layer — "ultrathink" raises to the model's highest supported level, "megathink"/"think harder" to high, "think hard" to medium (raise-only, never lowers, reasoning models only); works in interactive, print, and SDK prompts.- Session picker 1-9 quick keys: with an empty search field, pressing 1-9 jumps straight to that row and resumes it.
- Bash tool cards gain intent tags:
[Git] $ git status,[Test·npm test] $ npm test,[Build] $ tsc -p .,[Search·"pattern"] $ rg …,[List] $ ls src— a wall of bash cards reads as recognizable actions while the full command stays visible for approval transparency. - Tool cards show a "waiting for approval" phase while their permission prompt is open: the session emits
tool_permission_updateevents around the user prompt, and the pending card renders a warning badge until the call executes. - Background-task notifications render as compact status pills instead of raw multi-line notes in the user bubble: a completed/failed/killed note collapses to one colored line (glyph + command/subagent summary + duration); the wake turn renders pills only, with the boilerplate instruction line suppressed from display. The model still receives the full note text.
- Historical thinking folds away: only the latest round's thinking trace renders — earlier assistant messages' thinking is hidden from the live transcript so scrolling reads as an activity stream. The verbose transcript (Ctrl+Shift+T) temporarily unfolds everything, and the global hide-thinking setting still takes precedence.
ask_user_questiongains an implicit "Other" row: an extra choice after the model's options that opens a free-text input — type a message and press Enter to send it as the answer (single-select advances, multi-select adds it to the staged selection), Esc returns to the options. The tool description now tells the model the UI provides Other automatically.- Nested slash-command suggestions: typing
/officesuggests the verbs the command consumes (hire/huddle/tell/say/stop/errands) with usage descriptions, and/exportsuggests the output formats; both filter as you type. - Running-tasks viewer (Claude Code-style): press Down from an empty editor (also Shift+Down / Ctrl+Shift+B, and
/subagents) to open a unified picker over running background bash processes and in-process sub-agents. Enter drills into a live view (bash output tail or sub-agent transcript), Esc/Left goes back,kkills. Sub-agent records now carry theirgoal(spawn prompt) andmodel, shown in the rows and detail view. Replaces the two separate sub-agent / background-process viewers (a-coder-cli sub-agents are flat — they cannot spawn children — so the list is flat, not a tree). The agent timeline is fully scrollable: ↑/↓ page back through the complete event history (3 events per tick) with a hidden-events count and a "(↓ returns to live)" affordance, instead of a fixed 12-event tail. statusLinesetting: setstatusLinein settings.json to a shell command and its first stdout line renders as an extra row above the footer. The command runs on a 300ms trailing debounce on session events with a 2s timeout, receiving a JSON context on stdin (model,cwd,permissionMode,contextPercent,tokens) — Claude-Code-style custom footers without writing an extension.- Reduced-motion setting (
terminal.reducedMotion, envA_CODER_CLI_REDUCED_MOTION=1, toggle in/settings): spinner frames render a static frame, the message shimmer sweep and in-flight tool blink dots go solid.
Plan mode
- Entering plan mode now surfaces a persisted session plan file (
<agentDir>/plans/<sessionId>.md) that the model can write while planning (the only write auto-approved in plan mode); obvious read-only bash commands (pwd/ls/cat/head/tail/tree/wc/stat/du/df/which/rg/grep/find/git status|diff|log|show, guarded against redirection,&&/||chaining, and destructive flags like-delete/-exec) run without an approval prompt while planning; andplan_modeexit acceptsplan(content persisted to the plan file) andallowedPrompts(pre-approved commands, e.g.npm test), which become arg-scoped session allow rules taking precedence over the permission mode without triggering the auto-mode classifier. - "Auto-accept rest of plan": when the agent requests permission for a mutating tool while plan mode is on, the prompt offers a third option — "Yes, auto-accept rest of plan" — which approves the call and auto-approves subsequent plan-mode mutations until plan mode is disabled. The flag resets whenever plan mode turns off (via the model's
plan_modetool or the user toggle). - Exit-plan approval dialog: when the model leaves plan mode, an interactive dialog previews the plan file and offers "Yes, proceed", "Yes, switch to ask mode" (exit + permission mode switches to ask so every edit still prompts), or "No, keep planning" with typed feedback that is returned to the model while plan mode stays on. Headless/RPC sessions without the handler exit directly, as before.
Office
turn_endactivity events now carry the coworker turn's stop reason and awillRetryflag, so clients can chime on natural turn ends only — aborts (office Stop), in-session errors and retryable failures stay quiet.- While a coworker's turn runs, the engine pushes
office_activityRPC events (turn lifecycle, tool start/end with tool name, completed assistant speech — never streaming deltas) so clients can render live office scenes; failed turns surface as a system line in the huddle log with the reason instead of reading as a silent pass. - Supervised coworkers route tool approvals and questions to the user as office prompts (
office_respondanswers them); auto coworkers run with the auto permission mode. Turns that outlive their window are harvested late instead of lost. Coworker side runtimes are created via the newAgentSessionRuntime.createSideRuntime, outside the active/detached registries so they never count against background-session caps.
Tasks & agents
- Sub-agent
permissionModefrontmatter is now enforced at spawn (planenforces read-only,autoapplies policy rules and the classifier under the normal auto path,defaultinherits the session mode as before). The before-tool-call pipeline is shared between parent and sub-agents so the override covers hooks, permission resolution, file-history tracking, and extension handlers. - Teammate mail is no longer spawn-only: a running named teammate drains its inbox after each turn chain and, when mail arrived mid-run, wakes for another turn to act on it (turn budget still respected; mail that arrives after the budget is spent stays unread for inspection). Mailbox writes/drains and team-file member updates are serialized through a per-file keyed in-process mutex, so a
send_messagelanding while a teammate drains cannot interleave read-modify-write and drop messages.
Memory & skills
- Persistent-memory auto-injection (opt-out via
settings.memory.enabled): global and workspaceMEMORY.mdcontents are folded into the system prompt as a<persistent_memory>section on prompt (re)build, capped per scope (default 2,000 chars,settings.memory.maxCharsPerScope). The section notes the snapshot can lag mid-session writes and to re-read via the memory tool; unreadable/missing files are skipped silently. - Skill
allowed-toolsandpathsfrontmatter:allowed-tools: Bash(git commit *), Read(CSV string or list) grants those entries as arg-scoped session allow rules when the skill is invoked — by the model via the skill tool or by the user via/skill:name; entries match the permission-policy rule syntax.paths:(gitignore-style patterns; glob values starting with*must be YAML-quoted) makes a skill conditional: it stays out of the model's skill listing until a read/write/edit/find call this session touches a matching path (relative to cwd; matches stick for the rest of the session), after which it joins the listing on the next prompt. Conditional skills stay invocable by name throughout.
Tools & integrations
- Grep tool fallback to grep(1) when ripgrep cannot be provisioned (offline mode, Termux, failed download): the search runs via
grep -RInE(with-F/-i/--include/-Cmapping) and returns the samepath:line: textoutput shape, with a notice that.gitignorerules are not applied. Also exposed asrunGrepFallback/buildGrepFallbackArgumentsfor tests and remote backends.
Telemetry & dependencies
- Opt-in product analytics via PostHog: when
enableAnalyticsis on in settings.json (asked during the experimental first-time setup; the desktop Settings panel also exposes the toggle), the CLI captures anonymouscli_session_start/cli_session_endevents (version, mode, OS/arch, model/provider, aggregate token/cost/tool-call counters; never prompt content, paths, or personal data) with thetrackingIdUUID as distinct ID, pluscli_model_usage— one event per (provider, serving model) pair actually used in the session, with per-model turns/tokens/cost, so mid-session model switches are counted accurately (requested_modelrecords the picked model when the provider serves a different concrete one, e.g. OpenRouter auto-routing) — and acli_installevent alongside the existing install ping. Events fire in interactive, print, RPC (desktop engine), and ACP modes; RPC end-of-session is captured on engine shutdown. Gate overrides:A_CODER_CLI_ANALYTICS=1/0; offline mode always disables. Ingest key is baked intocore/analytics.tswithA_CODER_CLI_POSTHOG_KEY/A_CODER_CLI_POSTHOG_HOSToverrides for self-hosting/testing (an explicitly empty key disables the client; tests rely on this to stay hermetic). - Upgraded Composio SDK to
@composio/core0.18.0 +@composio/experimental0.2.3 (matching pair), silencing the SDK's runtime "Upgrade available" banner (0.17.0 reported 0.18 behind; the experimental provider base changed shape in 0.18, so both move together).