Repository navigation
What's New in v0.12.0
BREAKING
POST /approvals/{id}/decisionnow acts only on the first decision of an approval (found while adding the approval webhooks, #911). A repeat of the same verdict answers200with"resuming":falseand neither writes a second audit entry nor starts a second resume; the opposite verdict, or a decision on an entry that had already expired, answers409with the currentstatusand leaves the audit trail and the one-shot as the first decision left them. Before, a repeat allow audited twice and resumed twice (and answered202again), and a deny after an allow overwrote the audit withdenywhile the one-shot stayed granted. If the first decision's audit write failed (a500), a retry of the same verdict still writes the audit and starts the resume. Clients that read the202of a repeat allow should accept200, and handle409for a flip.verifyandturnendare sandboxed BY DEFAULT, asoptional(#748, owner decision of 2026-11-16; ships with the next minor release). When[sandbox.consumers]does not setverifyorturnend(an absent key, including a user config written before this change, with no file migrated;--no-configgets it too), the mission--verifycommand and theon_turnendstop gates run in thecommandsandbox (the workspace writable,.gitand.toleread-only, no$HOME, no network, rlimits) wherever bubblewrap works; before, they ran unsandboxed.run_command,job_startandcronstay off by default.- What can break. A sandboxed command has no
$HOME, so a--verifyor gate that needs the toolchain under~/.cargoor~/.rustup(cargo test,rustc) exits 127 on EVERY run (a mission endsverify_failedafter three strikes, a gate is denied three times); one that needs the network or writes outside the workspace fails too; and a git write inside it (git add,git commit) fails because.gitis read-only. A workspace layout thecommandprofile refuses is now averify_refusedmission or a denied gate for default users too, where it used to run: a symlinked.git, a sessions directory inside the workspace but not directly under it, a linked worktree or uninitialized submodule inside the workspace, or a working directory that is or holds$HOMEwhile--workspacepoints elsewhere (the sandbox binds the process's working directory, not--workspace).tole doctorwarns by name when~/.cargo/binor~/.rustupexists. - Why
optionaland notrequired.requiredwould make a sandboxedcargoverify fail on every such project and a host without a sandbox refuse every verify; it is not the default and a later release may move there, which is the owner's call. - No sandbox on this host (Windows, macOS, Linux without bubblewrap or user namespaces). The default degrades instead of refusing: the command runs unsandboxed with
tole: WARNING: verify runs UNSANDBOXED: no sandbox is available on this host (...)on stderr, asandbox_fallbackline (kindsandbox,consumer,default: true,reason) in the plugin ledger next to the user config, and a WARNING intole doctor. This is the one exception to "no unsandboxed fallback for verify, turnend and cron", and only for the implicit default: a WRITTENoptionalorrequiredstill refuses without a sandbox, and so does the default when a backend exists but cannot sandbox the run (a workspace layout the profile refuses, a failing launcher, a program not onPATH):verify_refused, or a denied gate. - Opt out, per consumer, in the user config:
[sandbox.consumers]withverify = "off"and/orturnend = "off".required(no fallback anywhere) is the strict choice. - How the backend is found (stricter for everyone, explicit modes included):
bwrapmust be an executable regular file in an ABSOLUTEPATHentry (a relative or empty entry, which means the working directory, is skipped), the first candidate that works is used (a broken earlier one does not decide), the probe runs at start-up wheneververifyorturnendis only the default (before the model runs a command), a definite answer is cached for the process and a transient spawn failure (no process slot, no memory, a signal) is retried and not cached. Where this is stricter an explicitoptionalorrequiredrefuses where it already would. - Embedders:
tole_core::sandbox::command::Consumershas two new public fields (verify_implicit,turnend_implicit), so aConsumers { .. }literal without..Consumers::default()no longer compiles;Consumers::default()is still all-off, thetolebinary usesConsumers::host_default(), and an embedder that never callsset_consumerssandboxes nothing. tole config checkprintssandbox.consumers.verify: not set, so optional (default) ...for an unset key, so it is not read as off.- Related: the
gittool's hardening (hooks off, config vet) still follows a consumer you WROTE, not this default, and an unresolvable sessions directory is a warning, not a refusal to start, for a default consumer.tole doctorshowsverify optional (default)for the default andoptionalfor a written value. Design and the three-state rule:docs/sandbox-design.md§9.4 ("The default flip").
- What can break. A sandboxed command has no
Fixed
tole servewebhook events: a destination that hangs no longer stalls the others (#980). Theapproval_requested,approval_resolvedandturn_finishedevents were sent one after another on a single thread, so a destination that never answered (up totimeout_secs, at most 30 s, for each of up to 256 queued events) held back every other destination and the 30 s approval expiry timer, whoseapproval_resolved(expired) events were then late. The queue is now drained by one worker thread per destination that lists one of these events (a fixed count, from the loaded config) with one request in flight each, plus a separate timer thread; a worker that hits a transient failure waits for its next look. Retry schedule, queue bound and overflow rules are unchanged. A retry that comes back to a full queue is now given up and reported on stderr with the destination name andqueue_full; before, it was dropped without a report.tole serve: evicting an idle session no longer orphans its pending approval (#979). Behavior change: the live-session map (256) now evicts the least recently used idle session instead of an arbitrary one, and never one with a pending approval; andPOST /approvals/{id}/decisionwithallowfor a session the server does not host and no cron run is parked on (evicted earlier, or the server restarted) now answers409with"resuming":falseand an expliciterrorinstead of202 {"resuming":true}while nothing resumed. The decision is still audited and recorded; reopen the session withPOST /sessions {"resume":"<id>"}and send a new prompt. The normal path keeps its202shape. The refused allow also withdraws its one-shot grant, and a session stays held for 30 seconds after an Allow until its resume claims the turn. An unanswered approval holds its session's slot for up to 15 minutes (EXPIRY_SECS), so 256 pending approvals make every new session answer503until they expire (a self-inflicted denial of service by an already trusted token holder; accepted).- Every
uteketole spawns (memory loop,uteke_recall,uteke_document, the skill indexes, child-agent mailbox cleanup) now runs withUTEKE_HOME=<CODECORA_HOME>/utekewhenCODECORA_HOMEis set, so an isolated run no longer reads or writes the store under the realHOME(#992). Behavior change: the whole uteke home moves, not only the store: the embedding model (models/, about 188 MB, downloaded again on first use or a failure when offline or sandboxed),uteke.tomland the logs are looked up under<CODECORA_HOME>/uteketoo, so an existing~/.codecora/utekelooks lost.tole doctorwarns about exactly this; keep the old home withexport UTEKE_HOME=~/.codecora/uteke(an owner-setUTEKE_HOMEalways wins), or copy or symlink it. A relativeCODECORA_HOMEnow makes these spawns fail with an error instead of using the real-HOMEstore. Threat model: "uteke store location (#992)".
Added
-
Outbound webhook event
turn_finished(#962, designdocs/turn-finished-event.md): when atole servesession's turn ends (a prompt, or the resume after an Allow), a destination that liststurn_finishedin itseventsgets one signed event with ids and a status word only:session_id,status(completed,failed,cancelled,budget_exhausted,blocked,approval_pending),last_seq(theseqof the newest log entry, the cursorGET /sessions/{id}/entries?after=pages by) and, when they apply,approval_idor a fixedcode(provider,storage,loop,unknown_tool,stop_gate,internal,approval). It never carries transcript text, tool output, the prompt, an error or provider message, a tool name, a profile or a model: the end is a typed value built inside the session host with every payload string dropped. Opt-in: the defaulteventsis unchanged (["cron_run_finished"]), so an existing destination does not start receiving it. Same v2 HMAC, headers, address policy and redaction as the other events; the id isturn:<session>:<hash>:<last_seq>:<settle>: a retry repeats the same id, every settle of a session within one process gets a different one (<settle>is an in-memory per-session counter, needed because a turn that fails before it appends anything settles at the samelast_seqas the turn before it), and across a restart the counter restarts, so a receiver also compareslast_seq. It uses the volatile in-memory queue of the approval events (256 per destination) with a 15 minute retry horizon (2 s, 10 s, 30 s, 2 min, then every 5 min); when the queue is full the new event replaces the oldest queued one of the same session, counted; an event that is lost is reported on stderr with the destination name and a closed code. A receiver reconciles through the authenticated session routes. Serve sessions only: missions, cron runs (which havecron_run_finished), ACP andtole mcpemit nothing. Confirmed: the owner confirmed the decisions D1-D9 of the note, and D10 (the settle counter in the id), as the defaults on 2026-11-19; they are implemented as the note's recommendations, and each is one constant or seam inwebhook_out/turn.rs. Downgrade: an older binary rejectsturn_finishedineventsand refuses to load that config, by design. -
tole skills fetch <registry-id> --pinned-sha <sha256> [--source-url U] [--workspace DIR](#878, step 3 of #973; needs uteke >= 0.24.1). Owner-only approval of a third-party skill the owner already placed in a skills directory: it resolves the id throughuteke skill showand approves only when the package hash tole computes over the local directory equals BOTH the pinned value and the hash uteke recorded; either mismatch refuses and writes nothing. It records--source-url, the registry id and the pin in the same ledger line a manualtole skills approvewrites (#591). It downloads nothing: uteke 0.24.1 exposes no skill body (skill showanswers a manifest, the hash and the ledger; the remote dropssource_path), so the bytes arrive by a channel the owner chose and can inspect (git cloneat the commit, a copy), and the pin is the packagesha256(a 40-digit git commit id cannot be checked against bytes and is refused). The uteke answer is stated data that can only make the command refuse; no body ever comes from it. Refused under any agent session (TOLE_UNDER_SESSION, a child agent; #684) and without a terminal on stdin, with no--hashbypass, soserve,acp, cron and scripts cannot reach it; it is a CLI subcommand, never a model tool and never read from project config.tole skills approveandfetchnow share one approve-and-record routine. The approval listing now shows file and directory names with every control character removed (also intole skills approve), so a name written by a model cannot forge or hide a line. Caveat: uteke records its hash from the same directory, so the pin must come from a source you trust apart from it. Threat-model row "Skills loading" anddocs/skills-registry-design.mdupdated. -
TOLE_SKILL_INDEX=utekerecalls through the uteke 0.24 skill surfaces (#973, step 2; needs uteke >= 0.24.1): newUtekeSkillIndexcallsuteke skill search(limit clamped to 1-50, query at most 2000 chars, still capped at 1000 by tole), withuteke skill list(1-200) anduteke skill show(name and recorded hash only, never a body) available to the owner-side registry fetch (#878, a later step). A uteke without theskillsubcommand falls back to theuteke docadapter with one startup note, never a crash; a 429 /busyanswer is retried with backoff (3 retries). SameSkillIndextrait,select()semantics andlocal/utekelabels; the index still returns names only, and every description and body still loads from owner-approved local bytes (#591).tole skills index|retireare unchanged (they still write through theuteke docadapter). The JSON shape ofuteke skill *(a bare array keyed byslug; uteke's own draft / approved / stale status is not used to filter, onlyvalid: falsehits are skipped) was read from the uteke v0.24.1 source, checked against a real 0.24.1 binary, and is pinned by a fakeutekein tests; recall uses--mode semanticso the cosine floor (TOLE_SKILL_FLOOR) keeps its meaning (uteke's default hybrid mode scores by rank fusion, about 0.03). -
tole serve: model, effort, context window and name in the session status, and a snapshot that survives a running turn (#573, part of #523). Behavior change:GET /sessions/{id}/statusgainsmodel,effort,contextWindow,contextUsed,name,snapshotAtandstale, read by the same code astole statusand the TUI footer; unknown values arenull. While a turn runs the route still never waits for it: it answers with the last-known snapshot (refreshed when the session opens, when a turn settles, when a register changes and on every idle read) andstale: true. Existing fields (id,entries,busy,usage_report) keep their names and meaning, includingentriesandusage_reportbeingnullduring a turn. The context window of a model the owner did not configure is asked of the provider's/modelsoff the request path and cached per model. Seedocs/mobile-control.md. -
tole serveandtole acp: MCP client servers for server sessions, behind the plugin lock (#946, step 4 of #941). Behavior change: a server session now attaches the MCP servers the OWNER configured, so a chat or desktop client can use the cora review tools and the plugins the owner approved. The rules: (1) the list is the--mcp-serverflag oftole serve/tole acpormcp_serverin the USER config, read once at start-up (the owner's own flag is allowed, like the user config); never a request body, header, ACPmcpServers, session override or file of the served repository; (2) there is NO PATH-based auto-preset: thecorapreset the CLI attaches when acorabinary is on the PATH is never attached on a server face; (3) every server goes through the CLI's plugin lock (approval bound to source, binary and secrets, #599) and sandbox rules (#601, #810) withoptionalcounting asrequiredonserve(unattended; onacp, attended like the CLI, anoptionalsandbox with no backend starts the server unsandboxed with the stderr warning and a ledger fallback line), an unapproved, changed or revoked server is never started, and the session opens without it with oneerrorentry per refused server in the session log (notice: mcp_server_not_started, naming the server and the reason, never a secret; read it withGET /sessions/{id}/entries); (4) all MCP tools stayWriteand queue in the approvals queue like any Write, and the ReadOnlymcp_readis not offered on a server face; (5)tole serveandtole acpnow refuse at start-up anmcp_serverfrom the PROJECT config (before, they refused anymcp_server, including the flag and the user config);tole mcpstill refuses the flag and attaches none,--transport mcpdoes not re-export client tools through its own tool surface (itstole_session_newsessions use the owner's list), andPOST /missionsand cron attach none. With no configured server a server session behaves exactly as before. The review guidance (#945) is active on a server session when the owner configured the cora review tools. Threat-model row "MCP client servers on server faces" indocs/threat-model.md;docs/faces.mdupdated. -
tole serve: list past sessions (#572, part of #523). Behavior change:GET /sessions/index?limit=&cursor=answers the sessions on disk of the server's own sessions directory, newest first, as metadata only (id,name,folder,lastActivity,entries,turns,parent,live,busy), so a client can resume after a restart or from a second device (GET /sessionsstill lists only live sessions). It reads no request path, returns no transcript text, and its cost is bounded (page size capped at 100 with a cursor, at most 10,000 directory entries, 200 files, 16 MiB per file and 64 MiB per request; a torn, unreadable or oversized file is skipped). With--sessions-dir, a session recorded outside the workspace is not listed. A badlimitor cursor is400, no token is401. Seedocs/mobile-control.md. -
tole serve: list the models a client may pick, set the session model and the thinking level (#574, part of #523). Behavior change:GET /modelsanswers{models, default};POST /sessions/{id}/model {"model"}writes thefact/modelregister the TUI/modelwrites (it survivesresume);POST /sessions/{id}/effort {"effort": level|null}sets or clearsfact/reasoning_effortlike/thinking.404unknown session,409while a turn runs,400for a bad value,401without the token. The owner decides which models may be picked: the list is the configured default model plusTOLE_MODELS(the ACP picker's variable), read at start-up; an id outside it is a400, the request cannot name a provider URL or key, and with noTOLE_MODELSonly the default can be picked. Seedocs/mobile-control.md. -
tole serve: start a session in plan mode (#947, step 5 of #941). Behavior change:POST /sessions {"plan_mode": true}opens the session with the same plan-mode registry filter as--plan-mode: mutation tools are absent from its tool list (absence on the wire, not approval), and the answer carriesplanMode: true. A request can only turn plan mode on;falseor no field keeps the default, and a process started with--plan-modecannot be relaxed by a request. A non-boolean is a400, and so isplan_modetogether withresume. Seedocs/mobile-control.md. -
tole serve: missions over serve (#947, step 5 of #941). Behavior change:POST /missions {goal, max_steps?, max_minutes?, max_tokens?}starts a mission as its own session on a background thread (202 {id, status}), running the same loop astole missionover the serve workspace root;GET /missions/{id}reads its status andfact/missionsummary;POST /missions/{id}/cancelcancels it. One mission runs at a time per server (409). The route is/missions, not/sessions/{id}/missionas the issue sketched, because a mission cannot run on a live serve session (writer lock, different pinned prompt). The verify command is the owner's configuration, never a request field: it is read at start-up from[mission] verifyandverify_timeoutof the user config, and a request with averifykey (or any key but the four above) is a400; budgets default to and are capped at thetole missiontier (a larger request is a400). Write approvals queue inGET /approvalsunder the mission id. Embedders and the CLI:mission::run_mission_outcomereturns aMissionOutcomeandtole missionoutput and exit codes are unchanged. Seedocs/mobile-control.md. -
tole serve: request a compaction and rename a session (#947, step 5 of #941). Behavior change: two new routes behind the existing auth, each writing exactly what the TUI writes through the samesession_settingsfunctions.POST /sessions/{id}/compactrecords the forced compaction pass of #481 (the TUI/compact): the session's next prompt compacts first when compaction is enabled, and answers200 {"id", "compaction": "requested"}; no model call runs in the route.POST /sessions/{id}/name {"name"}sets thefact/session_nameregister (the TUI/name) and answers200 {"id", "name"}; a missing, blank, control-character or over-120-character name is a400. Both answer404for an unknown session and409while a turn runs on it. Seedocs/mobile-control.md. -
tole serve: fork a session and read its family tree (#947, step 5 of #941). Behavior change: two new routes behind the existing auth.POST /sessions/{id}/fork {"at"?: <seq>}forks the session at a settled entry (theseqthatGET /sessions/{id}/entriesshows; default the last settled one) through the sameJsonlStorage::forkas the TUI/forkandtole branch, and answers200 {"id", "forkedFrom", "at", "seq"}; it writes only the new session file and the session-index line the TUI writes too, never the source, and the fork is not made live (POST /sessions {"resume": "<id>"}opens it).404for an unknown session,409while a turn runs on it,400for anatthat is not a settled entry.GET /sessions/{id}/treeanswers the session's family (parent chain and every fork below) from the same reader astole sessions --tree, read from the files so it works during a turn. Seedocs/mobile-control.md. -
docs/faces.mdand a face-parity test (#948, epic #941): the table of what the CLI,tole mcp, aserve/ACP session and cron share and the few differences that are deliberate.cargo test -p tole-cli --test face_paritybuilds each face with the same inputs and fails when a face gains or loses a tool or the default prompt without a row in the table (a stale row fails too).AGENTS.mdasks "does this exist on one face only?" in review. No runtime change. -
tole serve: a prompt that stops for an approval answers200 {"stopReason": "approval_required", "approval": {"id", "tool", "status": "pending", ...}}instead ofrefusal(#571, G0a of the gateway epic #910). Theapprovalrow has theGET /approvalsshape. The route snapshots the approval queue before the turn and names only an entry of THIS session and tool queued strictly after that snapshot, so another session's approval is never returned, an older undecided entry is never mistaken for this stop, and theidis the onePOST /approvals/{id}/decisionaccepts; if that entry expired or was decided before the lookup the answer is stillapproval_requiredwithoutapproval(fall back toGET /approvals?session=<id>). A stop that queued nothing is arefusal: a pre-tool hook denial, a blocked stop gate, an unknown tool, a provider failure and a loop. A turn resumed after anallowdecision has no HTTP response, so a further approval stop there is only visible throughapproval_requestedframes orGET /approvals?session=<id>(seedocs/mobile-control.md). Compatibility:stopReasongains a value on the serve prompt route only; a client that matchedrefusalexactly to detect an approval stop must matchapproval_required(none known: uteke-mobile pollsGET /approvals). ACP'sstopReasonvalues and the MCPtole_session_promptstop_reasonare unchanged. Embedders (tole-clipublic API): newtole_cli::session_host::run_session_turn_detailedand#[non_exhaustive] TurnResult; newApprovalQueue::mark,ApprovalQueue::queued_sinceandapprovals::approval_required_body;PendingApprovalgains aseqfield, so an external struct literal must add it. -
Secrets tole never knew are now masked (#597, owner decision of 2026-11-11).
SecretSet::redactandredact_valuerun the shareduteke-privacy0.24.1 shape detector (the ruleset uteke uses on its write path) AFTER the known-value pass, at every sink the set already covers (provider request, session log, live events, MCP arguments, web queries, memory loop, and the rest): AWS, GitHub, npm, Slack and Google keys,sk-keys, bearer headers, JWTs, PEM private keys, URL passwords andNAME=valuesecrets becomeprefix[REDACTED:<kind>]. It runs for an empty set too, leaves a known value's«NAME»marker alone (a second pass can only mask more, never less). Aweb_fetchURL carrying such a shape is refused. False positives: the user-config listredaction_allowlist(regexes, user layer only). A JSON object field is masked by its name too ({"api_key": "<random>"}), a log entry listsshape:<kind>inredacted, and aweb_fetchURL that looks like a secret is refused with its own wording. A«NAME»marker is kept only where it is the whole secret position (user:«NAME»@,--password=«NAME»,-u user:«NAME», an assignment value), never when glued to other text. Caveat: false positives exist (token = "abc123def456ghi789jkl",https://{user}:{pass}@host), so anedit_fileold_stringcopied from masked output will not match; keep them withredaction_allowlist. A project config'sredaction_allowlistis ignored with a warning. Migration: docs/migrating-0.11.md. New dependency:uteke-privacy(Apache-2.0, depends onregexonly). Embedders:SecretSet::redacton an empty set is no longer a no-op;tole_core::secrets::shape::{set_allowlist, check_allowlist, redact_shapes}are new. -
tole serve --auth basic: HTTP Basic auth, first slice of #742 (owner decisions of 2026-11-17: Basic first, one user with many devices, no session bound to an identity, TLS stays at a reverse proxy, the static token unchanged).--basic-user(orTOLE_SERVE_BASIC_USER) plus the password HASH from--basic-hash-file(orTOLE_SERVE_BASIC_HASH; there is no hash flag and never a plaintext password) make the credentials; the newtole serve-hashreads a password from stdin (a terminal is asked twice, without echo) and prints a salted$pbkdf2-sha256$i=600000$...hash (--iterations, at least 10000; a stored hash below that is refused). OneAuthenticatornow decides every serve route for the bearer token and Basic alike, in the REST face (event stream and uploads included) and in--transport mcp; webhooks keep their signature gate. With Basic on, a bearer token that is set keeps working (optional there);--auth tokenis the default and behaves as before (token required, a401withoutWWW-Authenticate). A wrong user, a wrong password and a malformed header get one identical401withWWW-Authenticate: Basic realm="tole", charset="UTF-8"(the hash is always computed, compared in constant time, a credential over 512 bytes is not hashed); failures count in the existing per-IP limiter (429after 10 a minute); a verified header is cached for 5 minutes by its SHA-256; the hash is a secret held by role and no error, log line or argument carries a credential.--auth basicwith a non-loopback--bindis refused unless--allow-insecure-basic(TLS terminates at a reverse proxy; Basic over plain HTTP is for loopback or a trusted network). Dependencies:ringandbase64are now direct dependencies oftole-cli; both were already in the lockfile at these versions (no new package). Not built: OIDC (a later issue), the read-only / full scopes (every credential is full authority), a[serve.auth]config table (flags and environment only), more than one user. Seedocs/mobile-control.mdand the threat model. -
tole sessionsshows the serve profile a session recorded (#740): aprofilecolumn, only when some listed session has one (a malformed recorded name shows as?, never as written; without any profile the output is unchanged).tole doctoraddsserve profiles: name (room <room>, <n> allow), ...from the user config: names, rooms and counts only, nothing printed when no profile is defined. This completes #740. -
tole serve: a per-sessionprofileonPOST /sessions, create and resume (#740, owner decisions of 2026-11-16). The request names a[profiles.<name>]table of the user config (never a project config; an unknown or malformed name is a400) and the session uses its persona, model, allow list and memory room. The choice is fixed while the session lives, is recorded in the session log as afact/profileregister, wins over the recorded one on resume (409when a live session or a removed recorded profile conflicts), andGET /sessionsshows it. The allow list follows the CLI precedence: an--allowflag pins the daemon's list and the profile cannot widen it. A request that setsmemory_roomis refused. Withoutprofilenothing changes. Seedocs/mobile-control.md. -
Plugins, #600 slice 3b,
tole plugin audit [NAME] [--json]: a read-only report per MCP server (tier, state, approved against live manifest hash, binary integrity, secret grants, sandbox profile approved and live, scanner findings of the live tool list or of the stored snapshot, the last threesandbox_fallbackledger events) and per skill (status includingapproved, unrecorded in the ledger, hash on disk against the approved one, stated source, last ledger lines). It starts only whatlistwould start, never under an agent session, and prints only whatplugin diffalready shows plus scanner findings; every field is redacted, terminal-safe and one line. Writes nothing. -
Plugins, #600 slice 3a, the skills pin: third-party skills are pinned by approved hash with a stated source, in an append-only ledger.
tole skills approvetakes--source-url,--registry-idand--pinned-sha(40 or 64 lowercase hex), recorded as data and never fetched or verified. Each skill approve, revoke and draft promotion is now a line of the new append-onlyskill-ledger.jsonl(written before the approvals file); a skill whose last ledger line is a revoke, or whose approved hash is not the ledger's, stays refused even whenskill-approvals.jsonwas put back by hand. Residual, stated plainly: an approval the ledger never names (made before the ledger, or afterskill-ledger.jsonlwas deleted) still loads and is reported once at startup as unrecorded, and deleting the ledger makes every approval unrecorded, so it forgets every revoke. An unreadable or over-16-MiB ledger fails startup with the remedy; a ledger torn mid-line by a crash is repaired by the next append. API note: the publictole_core::skill_approval::Approvalgains asourcefield (external struct literals must add it;Approvals::approveis unchanged).tole skills revokeandtole skills drafts revokeare now owner-only. Not built: fetching skills from the uteke registry (no verifiable registry API here), and MCP Registry namespace verification (skipped by the owner).tole plugin auditfollows as slice 3b. -
Sandbox operability, the logging slice of #750 (design
docs/sandbox-design.md§11). The start-up line of a sandboxed MCP server now names the profile it runs in (its own binding, not always the default) and the first 12 hex digits of the profile hash, and is one line whatever the names hold. AnoptionalMCP server that starts unsandboxed (a human attached, no working bubblewrap or a wrapper that cannot be built) is recorded as asandbox_fallbackline in the plugin ledger (server, profile name and hash, reason, time; appended once per server and session, never changing an earlier line; none forrequired, a skipped or remote server, or an unattended run, which refuses).TOLE_VERBOSE=1prints the command line of each sandboxed launch (MCP servers and command consumers) to stderr, redacted by the secret set and by secret-shaped flag andNAME=VALUEnames, never into the session log.tole doctormarks.config/gh,.config/glab-cli,.config/op,.password-store,.npmrc,.pypircand.cargo/credentials*asSENSITIVEtoo. -
Opt-in sandbox for cron script jobs and
command:deliveries, third slice of #748 (designdocs/sandbox-design.md§9.5).[sandbox.consumers] cron=off(default, nothing changes) |optional|required, in the user config only, with the samecommandprofile, network and limits as every other consumer;tole config checkandtole doctorshow it. A script job or a delivery runs asbwrap ... -- argvwith the job'sworkdiras the workspace (writable, the top-level.git,.tole,.tole-worktreesand.gitmodulespaths read-only, data dir and$HOMEabsent, no network unlesshost, rlimits); stdout capture, exit codes, the delivery stdin andTOLE_CRON_*variables, the timeouts and the[secrets]scrub forcronare unchanged. A cron job is unattended, sooptionalcounts asrequiredand there is no unsandboxed fallback: no backend, a workdir or layout the profile refuses and a launcher that fails or cannot be spawned refuse the job, which settleserrorwithusage.sandbox_refusedand the reason inusage.errorand the run log (neverok), or records the deliveryfailed; nothing extra is printed to stderr per tick. One launcher (cron/launch.rs) builds every processcronstarts. Cron agent jobs still followrun_commandandjob_start. A job whose workdir holds the cron dir (TOLE_CRON_DIR), or is inside it, is refused too, since a writable bind of either would let the script edit its own ledger and run log. With the cron sandbox on, a path-qualified program (./job.sh) is refused as it always was at save time, so a script runs assh job.sh. Public API change for crates.io embedders (a further break is avoided, no#[non_exhaustive]):tole-coreConsumerhas a newCronvariant (ALLhas five entries),Consumersa newcronfield andsandbox::command::command_in_diris new;tole-cli'sScriptOutputgainssandboxedandrefused, andcron::tick::run_scriptandcron::deliver::RunInfotake the cron dir. Fixed in the same change: the once-per-process fallback warning had one slot per consumer for four consumers. -
Opt-in sandbox for the mission
--verifycommand, second slice of #748 (designdocs/sandbox-design.md§9.4; theon_turnendstop gates are the next entry).[sandbox.consumers] verify=off(default, nothing changes: the spawned command is the old one) |optional|required, in the user config only, with the samecommandprofile, network and limits asrun_command. Thesh -coftole mission --verifyruns asbwrap ... -- sh -c <string>: the workspace (the process's working directory, as before) writable, the top-level.gitdirectory and.toleread-only (the #849 protection of thecommandprofile, nested gitdirs included), the data dir and$HOMEabsent, no network unlesshost, rlimits, no inherited descriptor above 2; exit status, output capture, the--verify-timeoutand the[secrets]scrub forverifyare unchanged. A mission is an unattended run, so anoptionalverify counts asrequired; with no working sandbox, or in a workspace layout the profile refuses (an uninitialized or nested submodule, a linked worktree inside the workspace, a.gitlink chain it cannot protect: the refusal says which, and anoptionalverify does not fall back, since a mission is unattended), the verify is REFUSED, never a pass: a check before the first turn ends the mission with statusverify_refusedand a non-zero exit before any model turn is spent (verify_failuresstays 0; the session stays resumable). A sandbox that passed the check but fails to start the command (a spawn error ofbwrap, or a non-zero exit for whichbwrap --json-status-fdreported no exit code of the command) is refused the same way and not blamed on the model. A sandboxed verify can fail every time for environmental reasons that three strikes will not fix: a toolchain under~/.cargoor~/.rustupis invisible (exit 127), the network isnoneunlesshost, andmemory_mblimits address space;tole doctorsays so whenverifyis on and warns when those toolchain directories exist.tole doctorlists the consumer (an error for arequiredone, or anoptionalone, with no sandbox) and now says the stop gates, cron scripts and deliveries are not sandboxed yet;tole config checkshows the key. It stays off by default; makingverify(andturnend) sandboxed by default is a later phase (plan in the design note). A sandbox never replaces an approval. CI'sSandbox (bubblewrap)job runs the new tests. -
Opt-in sandbox for the
on_turnendstop gates, last command consumer of the second slice of #748 (designdocs/sandbox-design.md§9.4).[sandbox.consumers] turnend=off(default, nothing changes: the gate is spawned as before) |optional|required, in the user config only, with the samecommandprofile (top-level.gitand.toleread-only, the #849 nested-gitdir protection, data dir and$HOMEabsent, no network unlesshost, rlimits) asrun_commandand verify. Each gate runs asbwrap ... -- program argsin the workspace; its stdin payload, timeout, output capture and the[secrets]scrub forturnendare unchanged. A gate may be a program path (./gate.sh,/opt/bin/check): it must be an executable file and its directory is bound read-only. A stop gate is unattended (nobody answers while the model finishes), sooptionalcounts asrequiredfor it. A refusal is a DENY, never a pass: no working sandbox, a workspace layout the profile refuses (uninitialized or nested submodule, linked worktree inside the workspace), or a launcher that fails to start (a spawn error, or a non-zero exit for whichbwrap --json-status-fdreported no exit code of the command) denies the turn with the reason and counts toward the 3-denial cap (stop gate blocked, exit 6); a gate that ran and failed is an ordinary deny with its own output. A sandboxed gate can fail every time for environmental reasons (a toolchain under~/.cargoor~/.rustupis invisible, the network isnoneunlesshost):tole doctorwarns about it.tole doctorlists the consumer and now says only cron scripts and deliveries are not sandboxed yet. It stays off by default; makingverifyandturnendsandboxed by default is a later phase (plan in the design note). A sandbox never replaces an approval. -
--sandbox <profile>and--no-sandbox(part of #750). Global flags, owner at a terminal only.--sandbox <profile>selects a built-in (server,strict) or user-config profile for every stdio MCP server in that run (per-server bindings included); it cannot define a profile (a project config's[sandbox]is still ignored; it may pick a wider profile the user config defines), cannot turn the sandbox on when[sandbox] modeisoff, and an unknown name is a startup error.--no-sandboxstarts stdio servers unsandboxed for the run, and is refused when the run is unattended (tole serve,tole acp, any run without a terminal on stdin and stderr) while the mode isrequiredoroptional. Both flags are refused under an agent session (TOLE_UNDER_SESSION, a child agent, #684) and ontole cron,tole hook,tole sandboxandtole plugin; the two flags conflict. The flags only change what this run's stdio MCP servers start under (sandbox::session_policy); the configured policy (sandbox::policy: first-party names, theplugin addprobe) and the command consumers never see them. As a second layer the core ignores--no-sandboxonce the process is marked unattended. The startup line andtole doctorsay that a flag overrode the config. Model-command consumers ([sandbox.consumers]) are not affected by either flag. -
Lazy start of locked, sandboxed stdio MCP servers (part of #750), opt-in with
[sandbox] lazy_start = truein the user config (default off; a project config cannot set it). A server whose lock entry stored a complete snapshot that still hashes to the entry'smanifest_hashregisters its tools from the snapshot and starts on its first call; any other server (no snapshot, a cut, redacted or stale one,skip,--no-sandbox, HTTP) starts at session start as before. The first call runs the same steps an eager start runs, in the same order: the lock's pre-start decision again (a binary swapped since registration is never started), the normal launch (sandbox plan, startup line logged once,max_servers), and the check of the live manifest and version; a refusal stops the server, is ledgered like an eager one, and refuses every later call of the session, so no call reaches an unapproved server. The per-call approval is unchanged. A lazy server offers no resources or prompts.tole doctorsays when it is on. -
Sandbox profiles per server (#810, part of #750). The user config can define named profiles (
[sandbox.profiles.<name>]:workspace,network,read,write) and bind an MCP server to one ([sandbox.servers.<name>] profile), and[sandbox] profilecan name a defined profile. Newtole sandbox list,tole sandbox show <server>andtole sandbox set <server> --profile <p>(user config only;setkeeps the rest of the file and refuses under an agent session), andtole config checkprints the effective profile of each server and its source. A project config still cannot set anything under[sandbox], so it can never loosen a profile. -
The sandbox profile in the plugin lock entry (#750, part of it; lock format version 4, an older tole refuses it). An approval records the profile name and a hash of the effective profile (workspace mode, network, the extra read and write paths after symlink resolution) next to the entry, and at every start, before the server is launched and again after it lists its tools, the profile it would run in now must be exactly that one: a profile edited in the user config after approval (a wider network, another grant, a retargeted link), a renamed one, or a sandbox that no longer applies (mode off, a skip entry) blocks the server with the new
Admission::ProfileChangeduntil the owner re-approves, at a terminal only (a script's--hashis refused for a changed profile; agent sessions cannot approve at all).tole plugin listshows the profile andchanged (sandbox profile),plugin diffprints approved against now. The plugin ledger is the authority: each approval is followed by asandbox_profileline, and a lock whose profile record differs from it (hash edited, record dropped or added) is treated as revoked, so editing the lock cannot loosen a profile; a project lock can pin the profile but never replace or loosen it. Migration: an entry approved before is reported (list,doctor: approved before approvals recorded their sandbox profile), not blocked, and its profile is compared only after its nexttole plugin approve. The check reads the profile the server will actually run under, flags included:--sandbox <p>with another profile than the approved one, or--no-sandboxfor a server approved with a sandbox, blocks it for that run, and an approval records the configured profile, never a flag's. Whether the profile moved is decided by the ledger's record, not the lock file alone: a lock hash edited to match a widened profile is itself a move, and a script's--hashapproval cannot approve past it. A profile applies only where a working sandbox backend exists (Policy::applied_profile, shared by approval, admission,listanddiff): a server approved with a sandbox is blocked when bwrap is missing now in modeoptional(it would run unwrapped), and an approval without a working sandbox records no sandbox.tole plugin listandaddnow also name the per-server profile ([sandbox.servers.<name>]) in the sandbox status instead of always the default. -
tole-core(embedders):web::vetted_postwithPostParams,PostResponse,PostErrorandAddrPolicy, andwebhook::short_digest(#911, first piece of the outbound signed webhook delivery target; nothing intolecalls them yet).vetted_postis one POST to a destination the owner configured, withvetted_get's guarantees: the connection's resolver vets-and-pins the addresses, redirects are not followed (a 3xx isPostError::Redirect), the environment proxy is off, andTOLE_WEB_ALLOW_PRIVATEis not read. The address policy is per call:httpsis required except for a loopback host (the namelocalhostor a literal loopback IP) withAddrPolicy::loopback, a loopback address is accepted only for such a host, every other non-public range needsAddrPolicy::private, and a host with several addresses is refused if any is out of policy. A policy refusal (RefusedAddress) and a DNS failure (Dns) are different errors; errors carry fixed codes and no URL, header or receiver text. The response body is never read; only the status and aRetry-Afterof at most 64 characters come back. The unspecified address (0.0.0.0,::) reaches this host, so it needs the loopback flag like loopback itself; the private flag does not unlock it.PostParams,PostResponse,PostErrorandAddrPolicyare#[non_exhaustive](build withPostParams::newandAddrPolicy::new(loopback, private)), andMAX_POST_BODY(16 KiB) is public.webhook::short_digestis the first 8 bytes of SHA-256 as 16 hex digits, for event ids. -
Outbound signed webhooks are complete (#911, step G0b of the gateway epic #910): destinations in the user config (
[webhook_out.<name>]withhmac_key_envorhmac_key_file,events,allow_loopback,allow_private,allow_agent_jobs), a finished cron run (deliver = ["webhook:<name>"]) and approval requests and resolutions posted to them, signed like the inbound gate, retried with the same id and body, with a durable outbox for cron events,tole webhook test, a doctor section, and threat-model rows. Public changes along the way:tole-coregainedweb::vetted_post,PostParams,PostResponse,PostErrorandAddrPolicy;DecisionOutcome::Decidedgainedtransitionedand is#[non_exhaustive];ApprovalEventandApprovalInfoare#[non_exhaustive]; the description inGET /approvalsand in the approval events is now redacted.POST /approvals/{id}/decisionnow acts only on the first decision, usingtransitioned(see the entry on that route). -
Outbound webhooks on the real
tole serve, part 5d-2 of #911: end-to-end tests of cron delivery with a receiver that checks the v2 signature over the bytes it got: delivery and its ledger row, a 500 retried with the same id and body, a final 4xx, a receiver that never answers (the server stays responsive), a redirect that is not followed, a closed port, a killed server that resumes the event after a restart, a forged outbox line that is not sent, and a destination that cannot load. Each checks that no key or URL token reaches the receiver, the outbox, the ledger or stderr. -
Outbound webhook destination URL tokens, part 5d-1 of #911: each query value and long path segment of a destination URL is now held as a secret next to the whole URL, so a token a job prints on its own is redacted (found by the end-to-end leak check). New end-to-end test of the approval path on the real
tole serve: a queued write is announced asapproval_requested, its denial asapproval_resolved, both signed and checked by a receiver, with the key in the tool call's path redacted. -
Approval events are sent, part 5c-2 of #911:
tole servestarts one sender thread when a destination listsapproval_requestedorapproval_resolved(absent, nothing changes), installs the notifier on the approval queue, and sends each event signed with the same native v2 scheme as every other: one due event per destination at a time, oldest first, retried 2 s, 10 s, 30 s and 2 min after a transient failure and then given up, never sent past its deadline (a retry that would land after it is dropped),Retry-Afteron 429/503 raising a wait up to 2 min, no retry on another 4xx, a redirect or a refused address. A timer asks the approval queue every 30 s to expire what nobody answered (an idle serve would otherwise never announce an expiry), which announcesapproval_resolved/expired. A failure is one stderr line with the destination NAME and a closed code; a full destination queue logs how many events it dropped. A slow or dead receiver cannot delay an approval: the notifier only pushes under the queue's own mutex, and a send runs with no lock held. The sender only tells a gateway that an approval exists: the way to decide staysPOST /approvals/{id}/decisionwith the serve credential, and no event carries a credential, a link or a token. -
Approval events, part 5c-1 of #911:
webhook_out::volatile, the bounded in-memory queue and the notifier that fills it (no network yet). Approval events are volatile on purpose: the approval queue is in memory and empty after a restart, so replayingapproval_requestedwould announce something that can no longer be decided (a gateway reconciles withGET /approvalswhen it starts). At most 256 events wait per destination; a new one is dropped and counted when it is full.volatile::notifieris the callback forApprovalQueue::set_notifier: for each destination that listsapproval_requestedorapproval_resolvedit builds the schema v1 body with every text field redacted (no storage path, no URL) and pushes it, holding only the queue's own mutex for the push, so an approval is never delayed by a slow receiver. A request is worth sending until it would have expired (900 s); a resolution for 900 s from when it happened. Events are taken one per destination, oldest first, and one waiting for a retry does not hold back the ones behind it. An approval id that is not a valid delivery id is never built. Nothing sends them yet. -
Approval notifier hook, part 5b of #911 (the approval path of
tole serve):ApprovalQueue::set_notifiertakes an optional callback that is told when a request is queued (ApprovalEvent::Requested) and when an entry leavesPending(Resolved: approved, denied or expired), with anApprovalInfo(id, session, tool, description, time, sequence; no storage path, no call fingerprint, and itsDebughides the text). It is called after every queue lock is released, on the thread that caused the event, and must never block (a stall would delay the fail-closedDenyand the operator's reply); a panic in it is caught, and an approval is never changed or failed by it; theDenyofQueueApprover::decideis untouched. No ordering is promised:Resolvedcan arrive beforeRequestedof the same id (a receiver keys by id andresolvedwins). Only the first decision of an entry is announced:DecisionOutcome::Decidedgainstransitioned(false for a repeat or an entry that had already expired; public API:Decidedis now#[non_exhaustive], so an external pattern on it must add..;ApprovalEventandApprovalInfoare#[non_exhaustive]). An expiry is announced exactly once with the full entry even though the same call also drops it, andApprovalQueue::expire_duelets an idle serve announce it on a timer instead of waiting for the next lazy call. With no notifier nothing changes. Also: thedescriptionof an approval is now redacted inapproval_jsonwith the process secret set plus the${NAME}secrets ofweb_fetchheaders (also masking token-shaped strings), which servesGET /approvals, theapproval_requested/approval_resolvedserver-sent events and theapproval_requiredprompt body; it was the one place a tool call's text left the process unredacted. Nothing sends a webhook for an approval yet. -
tole webhook test NAME, part 5a of #911: sends one signedwebhook_testevent to the destination NAME of the user config and prints what the receiver answered, so a gateway operator can check the wiring without a cron run (tole doctorstill makes no network call). The destination is a name only (there is no flag for a URL, a header or a secret), the event is sent directly and once (no outbox, no retry, no ledger row), it is signed with the same native v2 scheme as every event, and the output is the destination name, the event id (test:<16 hex>, so it can be found in the receiver's log) and the HTTP status or a closed code (timeout,dns,transport,refused_address,redirect_refused,bad_destination), never the URL, a header, the key or any text the receiver sent. Exits non-zero unless the receiver answered 2xx.Event::WebhookTestis not inEvent::ALL, so it cannot be listed ineventsand a forged outbox line cannot name it. A name typed on the command line is printed only as printable ASCII. -
Outbound webhook reconcile pass, part 4e of #911:
cron::webhook::reconcilecloses the two gaps a crash leaves between the ledger and the outbox. It queues a run that settled in the last 6 h, names a configured destination and has neither an outbox event nor a ledger row of any status (askippedorfailedrow counts, so a silent run is not queued again), and it writes the ledger row of an event that reacheddoneordeadwithout one. It leaves a run younger than 10 minutes to the live tick (whose event is queued after its other targets), never guesses "silent" from a kept output file that is missing (a run settled at claim time, or recovered as interrupted, has none and is not announced), and reads the file without following a symlink or blocking on a FIFO, up to 64 KiB. A webhook row is now written once per run and destination by the live tick as well. It runs at the start oftole serveand every 5 minutes (a panic is caught), and before the drain of a standalonetole cron tickortole cron run. At most 100 events are queued per pass. A job whosedeliverlist gained a destination within the window can announce runs that settled before the change (bounded by the window and the cap). -
Outbound webhook sender for
tole serveandtole doctor, part 4d of #911:tole servestarts one sender thread whenever a destination is configured (with or without--cron; a webhook route can run a job without the ticker). It looks at the outbox file length every 5 s and runs passes when the file grew, a retry is due or the lock was busy, back to back while something is sent (a backlog drains in a burst, not one event per look), writes the ledger rows of what it settles, backs off (5 s doubling to 5 min) and logs once on a persistent error, survives a panic, rides out a lock that looks held for a few milliseconds because a child forked by another thread briefly holds a copy of the descriptor (a shorttry_lockretry), and logs one stderr line per failed delivery with the destination NAME and a closed code only.tole doctoradds the outbox: pending count and the age of the oldest (a warning past 10 min), events given up in the last 24 h with the last code, unreadable lines, the file size against its 64 MiB cap (a warning from 32 MiB, an error at the cap), and an error for a runnable job (not a paused or removed one) that delivers to a destination that is not configured. Counts and names only, never a URL, a body or a secret; a destination name or a result code read from the outbox file is printed only when it is valid or from the closed set (elseother). The reconcile pass for a crash between a result and its ledger row is the next part. -
Outbound webhook delivery of cron runs, part 4c of #911: a
webhook:<name>target is now delivered. The tick (and an approval-resumed run, which goes through the same path) no longer sends anything itself:cron::webhook::enqueue_runbuilds the redactedcron_run_finishedevent and appends it to the outbox, so a dead receiver cannot slow a tick, and the sender writes the ledgerdeliveryrow when the event settles (sent, orfailedwith a code from the closed set). A silentokrun recordsskipped; a failed run with no output still notifies. A refusal to queue recordsfailed(queue_full,enqueue_failed,bad_destination). A row is written only for a run whose job really names the destination, and only once per run and destination. The destination's URL (which can carry a token) is redacted like its key, so a run that prints either cannot put it on the wire or the disk. The standalonetole cron tickandtole cron runsend for about 20 s after their jobs (a soft bound: a send in flight is not cut, and no new pass starts with less than the longest destination timeout left; a retry waiting longer is left for the next tick or atole servesender, which is the next part). Events of a destination that is no longer configured are never sent and never make a drain wait.deliver::deliverstill fails closed for a webhook target (not_implemented), neversent. -
Outbound webhook sender, part 4b of #911:
webhook_out::send::drain_pass, one drain pass over the outbox. It leases one due event per destination (through the store), sends with no lock held, and appends the result under a short lock. Before every send the line is re-validated against the destination of the LOADED config and signed with the key that destination names, so a forged line cannot choose a destination, an event type or a key, and the key is not read for a line that fails validation. The result line and its terminal line are one write, so no second drainer sees the event unleased and due in between, and a send must end inside its lease. Retry on connect/TLS/DNS/timeout, 5xx, 408 and 429 (2 s, 10 s, 30 s, 2 min, then 5 min steps with +/- 20 % jitter until the 6 h deadline;Retry-Afteron 429/503 raises the wait up to 10 min); no retry on another 4xx, a redirect or a refused address. Result codes are a closed set (http_<status>,timeout,dns,refused_address,redirect_refused,bad_destination,expired,bad_line) and nothing a receiver says is stored or printed. The network, the key source and the clock are injected, so a pass is deterministic in tests. Nothing calls it yet, so awebhook:delivery still recordsfailed/not_implemented. -
Outbound webhook outbox store, part 4a of #911:
webhook_out::store, the only code that opens<cron dir>/outbox.jsonl. Appends take the blockingoutbox.lockfor the short write only;enqueueis an atomic check-then-append that refuses a duplicate and refuses at 10 000 pending per destination or 64 MiB;lease_duetakes the lock withtry_lockand leases one due event per destination (marking past-deadline eventsdead:expired). The file is private (0600), never followed through a symlink, never blocked on (a planted FIFO), read only as a regular file and refused when far over its cap, and a torn tail is ended before the next line. A ledger row is only offered for a fire whose event id matches the body.Destinationgains akey(the NAME of the variable or the path, never the secret) so the sender can re-read it per attempt, and the fold bounds a result line'snext_atlike a lease. Nothing calls the store yet. -
Outbound webhook outbox, part 3c of #911:
webhook_out::outbox, the format of<cron dir>/outbox.jsonland its fold, on bytes only (no file, lock or clock; the sender is a later part). One append-only JSONL line perenqueue(the redacted body once, so every attempt is byte-identical),lease,attempt,doneanddead, all keyed by (destination, id). The fold treats the file as untrusted: a line over 32 KiB or unparseable is counted and skipped, a torn tail is not consumed until it is complete, a line with noenqueueor after a terminal line is ignored, the firstenqueuewins, and a lease claiming more than the largest timeout + 5 s + 60 s ahead is ignored.duegives one event per destination, oldest first;expiredlists events past their 6 h deadline;validatere-checks a line before every send (size, schema v1, the line's destination, which must be configured and list the event type, the id, and the age ofat). Nothing calls it yet. -
Outbound webhook events, part 3a of #911:
webhook_out::event, the pure builders for what a destination is sent (no network, no file, no clock).cron_event_id(cron:<readable>:<hash16>, a pure function of the fire id and always a valid delivery id),approval_event_id, thecron_run_finished,approval_requestedandapproval_resolvedenvelopes (schema v1), and the caps: 16 KiB envelope, 4 KiB cron summary, 512-byte approval summary, 256 characters for any other text field. Redaction runs on the whole text before the cut, so a secret cannot be split into a piece the redactor misses; an envelope over the cap drops the summary and setstruncated.cron_is_silentapplies the silent rule to anokrun only, so a failed run with no output still notifies. Nothing calls these yet; the signing, the outbox and the sender follow. -
Outbound webhook signing, part 3b of #911:
webhook_out::sign::request_headersbuilds the headers of one attempt (Content-Type, the fourX-Tole-*headers andUser-Agent), signed with the existing native v2tole_core::webhook::signso inbound and outbound cannot drift. The timestamp, and so the signature, is taken again for each attempt; the id and the body are not. A test vector (key, timestamp, id, event, body, signature; computed with an independent HMAC) is pinned intole-coreand in the design note so the gateway can pin its verifier to the same bytes. Nothing calls it yet. -
Outbound webhook destinations, part 2 of #911: the
[webhook_out.<name>]table of the USER config (url,hmac_key_envorhmac_key_file,events,allow_loopback,allow_private,allow_agent_jobs,timeout_secs) and the cron delivery targetwebhook:<name>. A destination is declared in the user config only (a project config's[webhook_out]is ignored with a warning and marked IGNORED byconfig check, which shows names and never a URL or a secret value); no job, skill or agent text can name a URL, a header or a secret, a job refers to a destination by name. The secret is an environment variable or a file (a regular file, no link, at most 4 KiB, at least 16 bytes), never inline, and is held as a role secret so it is redacted and scrubbed from children.httpsis required except for a loopback host withallow_loopback = true; a destination that cannot load stopstole servebefore it listens with its name and the fix, andtole doctorshows names, events and flags (webhook destinations: ...).eventsdefaults tocron_run_finished; the approval events are opt-in and reserved for the next parts.deliver::checknow takes the destinations the host loaded at start (TickOptions::webhooks, a new public field: an externalTickOptions { .. }literal must add it or use..TickOptions::standalone(n);deliver::checktakes a second argument): a job naming an unknown or unlisted destination is blockeddelivery_invalid, and a job created by an agent is blockeddelivery_untrustedunless the destination setsallow_agent_jobs. Not sending yet: the sender is a later part, so awebhook:delivery recordsfailedwithnot_implemented, neversent.hmac_key_filemust be an absolute path. A literal IP inurlis checked againstallow_loopback/allow_privatewhen the config loads; a DNS name is checked against what it resolves to when a request is made. Other public API changes:cron::deliver::Targetgains aWebhookvariant,config::Configgains awebhook_outfield, andtole_core::web::check_destination_urlis new. A runningtole servekeeps the destinations it loaded until restart. The config keys arehmac_key_*because the config parser refuses any key containingsecret.
Changed
- Faster requests on long sessions (#908, follow-up to #597):
SecretSet::redactremembers its result for texts of 1 KiB and more, keyed by the exact text, the set (immutable, so a new set starts empty) and the allowlist generation, so the history re-redacted on every provider request costs a lookup instead of a regex pass (10 MB of ordinary text: about 190 ms to under 5 ms per repeat request; 10 MB ofx:spam: about 1.5 s to under 5 ms). Output is byte-identical; installing an allowlist empties the memo at once; memory is capped at 64 MiB per set. - Server sessions are routed to a model (#945 capability 2, step 4 of #941, #586). Behavior change: when the owner's config has
[router] enabled = true, a session oftole serve,tole acpor the MCP session tools is routed once, at its first prompt and before the first provider call, exactly as a new CLI session is: the router picks a tier from the prompt's size and the owner's keywords, the user config maps it to a model, and onlyfact/modeland the redactedfact/routeregister change. Routing stays off unless the owner enables it. A session that already has a model (set by a client throughPOST /sessions/{id}/model, by a profile, or by resume) is left alone, a resumed session is never routed again, a request cannot add tiers or rules or turn routing on, and a broken router (or a user config that no longer loads) fails that prompt with its remedy, redacted, before any provider call. Budgets, allow lists, plan mode and secrets are untouched. - Server sessions get the default prompt and the review guidance (#945 capability 1, step 4 of #941, finishes #536). Behavior change: a session created by
tole serve,tole acpor the MCP-over-HTTP host with no explicit prompt (no profile persona,TOLE_SYSTEM_PROMPTor trusted config) now pins the built-in tool-discipline prompt thattole chatuses, so the desktop client and the chat gateway talk to the same agent; before, such a session had no system prompt at all. Its oneContext:line names the SESSION workspace, not the process working directory; plan mode adds the plan-mode sentence as on the CLI; and the cora review guidance follows the prompt (an explicit one too, as on the CLI) only when both cora review tools are in the session. An explicit prompt still wins, exactly as--systemdoes. The prompt is pinned in the session header, so a session created before this change keeps its stored prompt (none stays none) when resumed, and a resumed server session without an explicit prompt keeps its header-pinned one (an explicit prompt, such as a profile chosen on resume, still takes over as before). Skills, model routing and MCP clients on server faces are unchanged (later capabilities of #945).docs/faces.mddrops the(system prompt)row; the face-parity test now compares the prompt text. - Server sessions load approved skills (#945 capability 3, step 4 of #941; the owner's go for skills). Behavior change: a NEW session created by
tole serve,tole acpor the MCP-over-HTTP host now goes through the sameapply_skillsastole chat: the skills index is appended to its pinned system prompt and the ReadOnlyload_skilltool joins its registry. Only APPROVED skills load (#591): a skill the owner has not approved, whose bytes changed since, or whose approval was revoked is listed as(unavailable: not approved by the owner)andload_skillrefuses it, on these faces too;TOLE_SKILL_APPROVAL=off(environment only) opens the gate as on the CLI. Skills are discovered in the SESSION workspace (the directory the tool jail uses, plus the owner's user-global skills directory, as on the CLI), never from a request: no request field, header or MCP tool argument names a skill file, a skills directory or an approval.--skill <file>is a process-level owner choice.tole serveandtole acpused to refuse--skilland--no-skillsbecause they loaded no skills. Now allowed:--skill,TOLE_SKILL, a profile's skills and the USER config'sskill(an owner-named file loads without an approval record, as on the CLI; each file is checked at startup and at each session creation: regular file, at most 1 MiB, body at most 16 KiB, a bad one fails startup naming the file), and--no-skills/no_skillsfrom any source (loads none; noload_skill). Still refused on these faces: askillnamed by the PROJECT config (its file sits in the served repository and the config trust does not bind that file's bytes, so agit pullwould change what loads without an approval: remove it or pass--skill), and--skill/--no-skillsontole mcpandtole mission(unchanged). Opening a server session without the startup choice having been set is an error for embedders: callsession_host::set_server_skillsfirst. The sections are pinned at creation, soresumekeeps the stored prompt (a session created before this change gains no skills section; one created with the index getsload_skillback on resume). A broken--skillfile fails the session creation, not silently. Model routing and MCP clients on server faces are unchanged.docs/faces.mdmakes the skills row one path. - Every turn outside
tole-corenow runs throughturn_runner(#944, epic #941): the CLIrun,resumeandchat, mission and thetole doctorprobe no longer call the core turn functions directly (cron and the server faces already went through it). No behavior change; a source-scan test (tests/turn_entry_points.rs) fails if a new direct call appears. Compaction stays at the call sites for now, because those faces keep one compactor across turns so its context-window lookup is cached. - The tool roster of every face is now built by one function,
session::assemble::roster_for, which reads what differs between faces from aFacePolicy(where shell tools run, which child-agent tools, whether MCP client servers are allowed) instead of four separate constructions (#943, epic #941). No behavior change: each face keeps the roster it had, pinned by tests. The new-session routing step (route_session) moved into the same module, so any face can call it; the delegation wiring is aFacePolicyfield. - The number of participants in a discussion is a recommendation, not a limit (#856).
tole discuss startand thediscusstool no longer refuse more than 8 participants: 8 isRECOMMENDED_PARTICIPANTS, and above it the CLI printsN participants: more than 8 voices mostly add cost and dilute the debate; 3 to 8 is the sweet spoton stderr (start and--dry-run) and the tool result carries the same line in anadvicearray (absent at 8 or fewer).MAX_PARTICIPANTS(tole-core) keeps its name but now means the technical ceiling, 16, measured: the most voices whose worst-case round (8000 characters each in 4-byte characters, the scribe's digest refused) fits one 512 KiB ledger record; a contract above it is refused with a message that names it. The cost plan (and--dry-run) now shows the floor a round reserves for that many voices and how many rounds the budget covers, and the advice warns before anything is spent when the budget cannot fit one round (still allowed); a round-1 budget escalation now says why. The budget stays a hard cap and nothing else changed: every call is reserved first,max_rounds, "every voice must appear", no tools for inline voices, pass-1 sanitizing, user-config profile names only. [discussions] request_timeout_secsnow has a floor of 10 seconds (#813 item 4): 1 to 9 is a startup andtole config checkerror naming the key and the floor, the upper bound (3600) and the default (120) are unchanged.TOLE_DISCUSSION_TIMEOUT_SECSmay still go down to 1 second, as the documented test hook. A config that set 1 to 9 must raise it to 10 or more.tole doctorprints a hint when delegation is in use (the user config has a[delegation]table, or this workspace's delegation log records a run) and[delegation] approvalsis unset: without an approver an unattended delegated Write is denied, andapprovals = "owner"(or"chain") makes the owner the approver (#813 item 1). The default staysoff; an explicitoffsilences the hint.- CI: a PR whose every file is excluded from review by
review.excludein.cora.yaml(docs and changelog only) no longer gets the Cora comment "Review could not complete" (#914). TheCora Reviewjob skips the review step, ends green and says "Nothing to review" in its summary; AGENTS.md section 2 names the evidence such a PR needs instead of a Cora verdict. The decision isscripts/cora-all-excluded.sh, read from the base branch together with the patterns, so a PR cannot edit the check or widen the exclusion to skip its own review; it fails closed (any reviewable file, any lockfile, or any doubt runs the review).scripts/test-cora-all-excluded.shis its self-test and runs in theFormatjob.
Fixed
tole discussno longer cuts a long--questionto 2000 characters without a word (#922). The cut question went to every participant and into the ledgercontractas if it were whole, so a panel judged a partial packet. A question over 2000 characters, or an acceptance criterion over 400, is now refused before anything starts, with an error that names its length and the limit; nothing is dropped and no tokens are spent. The limits are unchanged, and the same check covers the model-callablediscusstool.- The sandbox backend lookup is stricter and its probe more robust (#748, hardening before the
verifyandturnenddefault flip; found by an independent security review).bwrapmust be an executable regular file in an ABSOLUTEPATHentry: a relative or empty entry (the working directory, which a model can write) is skipped, so a planted./bwrapcan no longer decide what the sandbox is, and a non-executablebwrapearlier onPATHno longer shadows the real one; the first candidate that works is used. A probe failure that may pass (a spawn error of kind WouldBlock, Interrupted or OutOfMemory, or bwrap's own EAGAIN, ENOMEM or EINTR message while it creates the namespace) is retried three times and, if it persists, answered but not cached, instead of being cached for the whole process; a clean refusal (user namespaces not permitted) is still a cached negative. For an explicitoptionalorrequiredthis only makes the sandbox refuse where it already would; it changes nothing else. GET /sessions/{id}/eventsno longer sendsreadyafter a replay that could not read the session log. A read error on a stream's first replay was retried on the next pass, butready("the replay is complete") went out anyway, so a client resuming fromLast-Event-IDor?after=could be told it was caught up while it had missed entries.readynow waits for a pass that read the log (heartbeats still run meanwhile); streams whose log reads fine behave as before. A plausible cause of the one-off CI failure ofserve_events::a_reconnect_after_a_seq_is_lossless_and_exact(left: [] right: [6, 9]; the flake itself was not reproduced). A failed read is now logged once per stream with its error kind only.- The
gittool with a command sandbox on no longer loses its fixed search directories when the account home (or$HOME, or the workdir) is/(containers, some service accounts): every path is under/, so the avoid set swallowed/usr/binand the rest and git was refused as "not found in the trusted directories". A root there now counts as no usable home; the fixed binary andPATH(/usr/local/bin,/usr/bin,/bin,/opt/homebrew/bin) are kept and nothing outside them is trusted. Also moves a misplaced doc comment ofpaths::account_home(no behavior change). - The skill ledger can no longer be deleted to forget a revoke (#879, hardening of the skills pin).
skill-approvals.jsonnow records aledger_checkpoint(the ledger's byte length and SHA-256) with every owner write; at load, a ledger that is missing, shorter, or whose recorded prefix hashes differently blocks every approval (skills are listed unavailable) with anERROR:startup note naming what is wrong and the remedy, andtole skills approve|revoke|adoptand draft promotion refuse to write instead of quietly re-recording. A ledger that only grew is valid (a crash between the ledger append and the approvals write is harmless; on power loss with reordered, unsynced writes the result is still a fail-closed fault, never a silent pass). A ledger over 16 MiB blocks everything,recheckpointincluded: trim or rotate it by hand (only old lines of skills that no longer exist, since revokes in the removed part are forgotten), then runrecheckpoint. An older tole ignoresledger_checkpointand its next save drops it, returning the file to the legacy format. A cron run blocked by a ledger fault records theERROR:note in theskill_not_approveddetail. The owner-only guard is environment-marker defense in depth; the real boundary for a script is the command sandbox keeping the data dir out of its write grants. New owner-onlytole skills recheckpoint [--sha256 <digest>]shows the ledger and, after you confirm, records it as the new checkpoint (it changes no approval and restores no lost revoke). Approvals files from before this change keep loading, with one startup note while a ledger exists, until the first owner write adds a checkpoint. Residual, stated plainly: a process that can rewrite BOTH the ledger and the approvals file forges a matching checkpoint (same as the plugin ledger); this catches only the ledger being deleted, truncated or rewritten alone. API note: additive intole_core::skill_approval:LedgerCheckpoint,Approvals::{load_with_checkpoint, save_checkpointed, accept_ledger},read_ledger_bytes,ledger_path,adopted_ledger_line,verify_checkpoint_at,fault_message;Approvals::savekeeps an existing checkpoint but, likeapprove, writes no ledger line (documented: an embedder that skips the ledger leaves the approval unrecorded; append aledger_lineand callsave_checkpointedto record it). No public signature changed. tole skills adopt <NAME ...|--all>(owner-only, #879) records the approvals the ledger does not name (made before the ledger, or while it was missing) as ledgerapprovelines notedadopted(hash and source as stored) and refreshes the checkpoint; it shows what it adopts and leaves recorded skills alone. The startup note for unrecorded approvals now names it.tole plugin list(text) put a newline or tab inside a lock key on one line, likeplugin audit(#879): a hand-edited lock could forge a line.--jsonis unchanged and escapes the key.- The
gittool ran whatever the repository config and hooks named, on the host (#748). With the command sandbox on,.gitis read-only for a sandboxed command (#849), so a model commits through thegittool (status, diff, add, commit;Risk::Writethrough the Approver), which runs OUTSIDE the sandbox and had no hardening: acore.fsmonitorcommand in the repository config, acore.hooksPaththat points at scripts inside the writable workspace (husky style), afilter.*.clean, agpg.program, or the hooks and config of a repository a sandboxed command created withgit init, executed on the host. The rule now: with any command consumer on ([sandbox.consumers]), no host-side code execution is reachable from state a sandboxed command can write, whenever and by whomever the repository was created. Every call passes-c core.fsmonitor=false. With a consumer on it also pins-c core.hooksPath=/dev/nulland passes--no-verifyto commit, so no hook runs for a commit made through the tool, the owner's own pre-commit and commit-msg included (a human's owngit commitstill runs them); setsGIT_CONFIG_NOSYSTEM=1and gives git a fixed binary andPATHand an allowlist environment instead of the tole process's (the git binary and itsPATHare FIXED:gitis looked up in/usr/local/bin,/usr/bin,/binand/opt/homebrew/binonly (a directory under the workdir, the temp dir,$HOMEor the account home is never searched), and that list is also thePATHgit's helpers (sh,gpg,ssh,git-*) resolve in; the inheritedPATHis never used, because a tole started by a sandboxed command inherits whateverPATHthat command set; nogitthere means a refusal naming the directories; an embedder with git elsewhere sets an absoluteGitTool::with_bin(its directory is added), the CLI has no setting, so an owner links git into a trusted directory; locale,TZandTERMare kept;HOMEcomes from the account's passwd entry (never$HOME; no entry means no global config);GIT_AUTHOR_*,GIT_COMMITTER_*,USER,LOGNAMEare dropped so the identity comes only from config or the passwd entry;TMPDIR/TEMP/TMPare dropped (git uses/tmp); no file descriptor above stderr is inherited (close-on-exec, Linux 5.11+), stdin is/dev/null), soGIT_CONFIG_GLOBAL|SYSTEM|COUNT|KEY_n|VALUE_n|PARAMETERS,XDG_CONFIG_HOME,GIT_EXEC_PATH,GIT_ATTR_SOURCE,GIT_PAGER,GIT_SSH*and the rest inherited from a tole started by a sandboxed command cannot give git config the vet does not read; passes--no-ext-diff --no-textconvto diff and--ignore-submodules=allto status and diff; and, before every op, asks git which git directory it uses and refuses unless that is a plain.gitdirectory at the work tree root (not bare, not a linked worktree or a submodule, no separate git dir), then reads that directory'sconfigwithout running anything and refuses, with an error that names the key and the way out (run git yourself, or remove the key), if it holds any key outside a small allowlist of inert ones (core.repositoryformatversion,filemode,bare,logallrefupdates,ignorecase, ... ,user.name,user.email,remote.*.url,branch.*.remote, and a few more):filter.*,include.*,alias.*,core.fsmonitor,core.hooksPath,core.sshCommand,core.worktree,gpg.*,commit.gpgsign,credential.*,diff.*.textconv,merge.*.driver,submodule.*,extensions.*and everything else that can name a program or a file are refused.addis also refused while the index holds a submodule entry (git runs git inside a dirty submodule, whose config nothing vets). The tool needs no start-up snapshot and no trust in a repository's age. With no consumer on the tool behaves as before apart fromcore.fsmonitor..gitstays read-only in the sandbox, with no writable-.gitoption. Residuals: a still-running sandboxed process (ajob_startfrom an earlier turn, a long command) that writes the config between the vet and the spawn can get that SAME call to execute it, because the spawned git re-reads.git/configafter the vet (later calls refuse); the window is narrow (.gitis read-only in the sandbox when it existed at the work tree root at sandbox start, so it takes a repository the sandbox created itself plus a still-running background job); a sandbox-written.gitattributesor.git/info/attributeswith* filter=lfstriggers the OWNER's globalfilter.lfs.*command (git-lfs also reads a worktree.lfsconfig): the program is the owner's but its input is attacker-influenced;gc.autodetachcan leave a detachedgit maintenance run --autoafter a commit that outlives the vet (it runs with the hardened-coptions and nothing executable is found on its path; another instance of the race window); a program the owner's own (global) config names is looked up in the fixedPATH, andHOMEcomes from the passwd database, so a process run with another$HOMEuses the account's global config (a sandbox grant that holds the account's passwd home is refused as$HOMEis, so~/.gitconfigcan never be sandbox-writable whatever$HOMEsays); an owner (global) configinclude.paththat points at a workspace file is the owner's choice and is not vetted;GIT_CONFIG_NOSYSTEM=1drops/etc/gitconfig(safe.directory, credential helpers, user.*, policy) and can cause "dubious ownership" or a commit failure. Therun_commandandjob_startsummaries now tell the model, when their consumer is on, that git writes fail inside the sandbox and to use thegittool, andtole doctorsays the same, including that the owner's hooks do not run for the tool's commits. --no-configand the policy-loosening flags depended only on the session marker (#867).TOLE_UNDER_SESSIONis an environment variable, so a script that ranenv -i(orsudo) and then a copy of tole looked like the owner:--no-configdropped the user config's sandbox, consumers and secret release, and--allow,--trustor the hook flags replaced its lists. Now, when the USER config sets[sandbox](mode, profiles, servers, consumers) or a non-empty[secrets], both need a terminal (stdin AND stderr, the same rule as--no-sandbox), marker or not:--no-configis refused with--no-config needs a terminal ... because the user config sets [sandbox] and/or [secrets] ... (issue #867), and the #865 narrow-only check applies to an unmarked process with no terminal. A tole that tole itself started (it carries the child variables) is exempt on that second path, as areserve,acpandmcp(--no-configstays refused there as in #855). The user config is read only to decide, fail closed: a file that cannot be inspected or parsed keeps the strict rule. Behaviour change for scripts: a CI job without a terminal that passes--no-config, or an--allow,--trustor hook flag that loosens a list the user config sets, against a user config that also sets[sandbox]or[secrets], is now refused; put the pattern in the user config, or run it from a terminal. A user config that sets neither key is unchanged. The marker and the terminal are NOT a security boundary (a deliberate pty, a copied binary run with a cleared environment, or a forged child variable gets past them): the boundary is the command sandbox, which masks the data dir ([sandbox.consumers] run_command = "required"). No new marker was added.- Under an agent session a flag or
TOLE_TRUSTcould replace the owner's policy lists (#865). The resolved lists followflag > env > configand a higher layer replaces the whole list below it, so atole run --allow '*',--trust workspace,TOLE_TRUST=workspaceor--on-turnend x.shstarted by a script thatrun_commandorjob_startran replaced the user config'sallow,trustor hook lists (dropping the owner's stop gate and deny patterns). Now a process that carriesTOLE_UNDER_SESSION(set byrun_commandandjob_starton what they start, and by nothing else; the child variablesTOLE_AGENT_DEPTH,TOLE_AGENT_IDand the delegation variables are inherited by a child's ownrun_commandscripts and do not exempt them), and is notserve,acpormcp, is refused at start-up when, for a key the USER config sets, its flag or environment would loosen it:allowentries must be exact entries of the user's list and every user deny pattern (!x) must be kept (adding a deny is fine),trustpresets (flag, elseTOLE_TRUST) exact entries of the user's, and a hook list must contain every hook of the user's (adding hooks is fine). The refusal names the key, the user-config value and the way out (change the user config yourself, or run from a terminal).plan_modehas no off switch on the command line or in the environment, so nothing needs refusing. Unchanged: an owner at a terminal (no marker),tole serve,tole acp,tole mcp, a key the user config does not set, the project config and--config(owner-trust-gated, not inputs of the guard), and the child tole itself starts (agent_start, a delegated child: it does not carryTOLE_UNDER_SESSIONof its own, and its scope is enforced in the parent, wherelist_coverskeeps it inside the parent's own allow list, which can be wider than the user config after an owner's--allow). A child inherits the marker when its PARENT is itself marked (agent_startand delegation scrub secrets only), so a child in a chain that already contains a script-started tole is guarded too: if its flags are glob-covered by the parent but not exact entries of the user config (a script runstole run --allow 'read_*'and its model callsagent_startwithallow=["read_file"]) it is refused; that fails safe and only happens in chains that already contain a marked process. Not covered:--profile(a profile'sallowreplaces the allow list when no--allowflag is given, and a user config that sets a key only under a profile is unconstrained here),--yes, the MCP server flags and--workspace. This is keyed on the same environment marker as #867 and is NOT a boundary: a copied binary run with a cleared environment, a deliberate pty or a forged depth marker is not stopped; the boundary is the command sandbox ([sandbox.consumers] run_command = "required"masks the data dir). - A sessions directory inside the workspace but outside the workspace's
.tolewas writable by a sandboxed command (#866). The default.tole/sessionsof the sandbox's workspace root is protected through.tole, but the location is relative to the working directory and can be moved (-s,sessions_dir):-s ./sessions, or the default.tole/sessionswith--workspace /repostarted in/repo/sub(reproduced:job_start, whose sandbox workspace is--workspace, wrote into it;run_commandwas not affected), was part of the writable workspace, so a sandboxedrun_command,job_start, verify command or stop gate could rewrite or delete past entries and break the append-only record that resume, the audit and the cost report read. The host now tells the sandbox where the sessions are (tole_core::sandbox::command::set_sessions_dir, a new public function: absolute path, set once per process, so an embedder with several sessions protects only the first and one that never calls it gets no protection for a non-default directory; thetolebinary calls it with the effective directory, forserve,acpandmcponly when-sis given), and the existing protect plan binds the directory read-only like.gitand.tole: a command can read the entries but not write, create, rename, remove or replace anything in it, while tole itself keeps writing sessions. A sessions directory the sandbox cannot protect is refused like the other layouts of the plan (the consumer's policy decides,requiredrefuses and nothing runs): one deeper than a direct child of the workspace (its parent could be renamed and a planted copy put in its place; run tole from the workspace root, use./sessionsor a directory outside the workspace), a symbolic link, a file, the workspace itself, or a path that reaches the workspace through a link. The path is resolved the way the operating system resolves it: a..after a symbolic link means the link target's parent (it was collapsed as text, which named another directory and protected nothing), and the same resolution is now used for a gitdir file's target, the gitdir whose worktree registry is read, and a linked worktree's back-pointer. When the sessions directory cannot be told to the sandbox (the working directory is unknown), a required command sandbox, or an always-unattended consumer (verify, stop gates), stops the start; anoptionalrun_commandorjob_startwith a human attached gets a warning. Outside the workspace is not in the sandbox's view, and a directory that does not exist yet is not protected (like.tole). - A missing or unreadable user config was silent (#864). The user config is the only source of
[sandbox],[sandbox.consumers],[secrets],[delegation], hook routes, profiles and the approval allow and trust lists, andPath::existsread every I/O error (permission denied, a parent that is a file) as "no file", soCODECORA_HOMEpointing at a directory the process cannot read, or at a file, silently ran with defaults. Now: a user config path that cannot be inspected is a startup error naming the path and the ways out (fix the path or its permissions, fix or unsetCODECORA_HOME, or--no-configfor one run at a terminal), on one line (a newline or escape sequence in the path, which comes from the environment, is shown as\nor\u{..}and the path is cut at 200 characters, so it cannot forge a stderr line); an absent file is still "no user config". The other readers of the user config that also usedPath::existsnow go through the same check:tole serve(hook routes: the server does not start),tole doctor(an ERROR finding on the router line, as for a file that does not parse),[curator](reported, defaults apply, like a parse error) andcron.tz_source(one warning, the default source applies); none of the last two is a security setting. And an absent file is announced once on stderr,tole: no user config at <path>; the defaults apply (sandbox, approvals and secret release use their defaults), but only where it may be a wrong directory rather than a choice: the root comes fromCODECORA_HOME, the data directory cannot be resolved (HOMEunset, or a relativeCODECORA_HOME: a different line says so),TOLE_UNDER_SESSIONor a child-agent depth marks a session, or the command isserve,acpormcp. An owner on the default path with no config, andtole cron tickthere, stay silent (an OS cron mails stderr). This makes the situation visible, it does not make it a boundary: a process that controls its own environment can still pointCODECORA_HOMEelsewhere; the boundary against that is the command sandbox, which masks the data directory ([sandbox.consumers] run_command = "required", see the threat model). tole cron runandtole cron tickran jobs without the owner's user config (#863).cronis on the config skip list, so the startup code applied defaults for everything that comes from the user config:[sandbox] mode,[sandbox.consumers], the[secrets]release and[sensitive_files]. A cron agent run (its stdio MCP servers,run_command,job_start) was therefore unsandboxed even when the owner had setrequired, while the same job throughtole runortole servewas sandboxed; the OS-cron path (crontabcallingtole cron tick) was affected. These two subcommands, and only these, now load the USER config (never the project config) and take the normal startup path, and a user config that does not parse stops them instead of running with defaults.cron create|list|status|edit|pause|resume|remove|runs|canceland the other skip-list commands (config,hook,sandbox, ...) still skip it, so they work when the file is broken. Thetole: using user config <path>line these two commands print is dropped when stderr is not a terminal (an OS cron launchestole cron tickevery minute, and a line on every run would be one mail a minute underMAILTO); an owner at a terminal still sees it, and every error, including a user config that does not parse, stays on stderr.--no-configis unchanged (owner at a terminal; refused under a session, #855). A cron SCRIPT job is still not sandboxed (third slice of #748).- A stop gate that timed out inside the sandbox passed the turn (#860). With
[sandbox.consumers] turnendon (required, oroptional, which isrequiredfor a gate), a gate killed at its 30 s budget madeProcessHook::run_rawreturn anErr, whichturnend_deniallogs as a non-blocking infrastructure failure, so code the agent wrote could make the gate time out on purpose and approve the final message. A gate that went through the launcher and timed out (or was lost while running) is now a DENY: exit 126, "the stop gate timed out after Ns inside the sandbox and was killed; a timeout is not a pass", counted toward the 3-denial cap like any denial. The unsandboxed path (turnend = "off") keeps the #110 non-blocking contract unchanged. Docs say that a gate script inside the writable workspace (./gate.sh) can be rewritten by the agent, outside the profile's protection, and thattole serveandtole acpbind the process working directory (a gate there is refused when it is$HOMEor/). API note fortole-coreusers, against the last published release (v0.11.0, the workspace version):sandbox::command(with the enumConsumer, nowRunCommand,JobStart,VerifyandTurnEnd) andhooks::SANDBOX_REFUSEDare new public items since v0.11.0, so an exhaustivematchonConsumerneeds an arm for every variant (it has no wildcard to fall back on). InProcessHook::run_rawonly the timeout and the lost-child cases of a sandboxed gate are newly exit codeSANDBOX_REFUSED(126) with a reason (this fix); a gate the sandbox refused or failed to start was already 126 in #859.ProcessHook::with_timeoutis a hidden test seam, not supported API. - The
commandsandbox profile (run_command,job_start) did not really protect.git/hooksand.git/config(#849). They were bound read-only as leaves, but a mount point's ancestor can be renamed (mv .git .g && cp -a .g .gitgave a plain writable copy), and a writable.gitmount point is no better: git honourscommondirand other redirect files inside the gitdir, so a planted gitdir in the workspace made a latergit commitorgit statusoutside the sandbox run its hook andcore.fsmonitor. The top-level.gitdirectory is now bound read-only (and.toleas before): when it existed at launch it cannot be renamed, removed, replaced or written, and its tree is unchanged. Nested gitdirs inside the workspace are read-only too where they can be named without scanning: a.gitgitdir file and the directory it points to (inside the workspace), every.gitmodulessubmodule path (and.gitmodulesitself, which the plan reads), and the whole.tole-worktreesdirectory (a sandboxed command cannot change files in a child agent's worktree); a symbolic link anywhere in that chain, a path leaving the workspace or more than 64 entries refuses the launch (optionalfollows its fallback policy), and the plan is checked again just before the command line is handed out. The listed layouts refuse the launch instead of being half protected: a linked worktree (git worktree add) whose.gitfile lies inside the workspace but not under.tole-worktrees(found through the registry of the gitdir in effect, including a separate git dir; a broken registry is refused too), a submodule listed in.gitmodulesthat is not initialized (no.gitto bind; initialize it withgit submodule update --initor remove it), a submodule with submodules of its own (nested.gitmodules), an in-workspace gitdir with acommondirorconfig.worktreeredirect (also the top-level.gitdirectory), a gitdir file whose in-workspace target does not exist, a.gitmoduleswith a second hard link. What git runs inside a protected gitdir is checked too (hooksandconfigare not links,configand the hook files have no second hard link, no hook entry is a link, a gitdir file has one name), and a FIFO in a protected name, an oversized.gitmodules, or a.gitmodulesthat git could read differently from the plan (a comment after a value, quotes, escapes, other sections: only plain[submodule "name"]sections are accepted) refuses the launch instead of blocking, being read in part or being guessed. Cost: inside a sandboxed command git writes fail with git's own "Read-only file system" (add,commit,checkout,branch,stash,rebase,gc,config,remote add;git stashexits 1 silently), reads work (log,diff,show,status,rev-parse); a model cannot commit from a sandboxed command. Still NOT protected, and documented: a gitlink recorded in the index with no.gitmodulesentry (an accidental embedded repository, also when its directory is empty or missing: a command cangit initthere and the host'sgit statusruns a plantedcore.fsmonitor), a linked worktree of a submodule elsewhere in the workspace (only the top-level worktree registry is read), a.gitor.tolethat did not exist at launch (agit initinside the sandbox, a detached job started before.gitexisted), a nested repository that is in neither.gitmodulesnor.tole-worktrees(a plaingit statusorgit add -Aon the host in the outer repository can fire acore.fsmonitorplanted there), and files outside.gitthat run later on the host (.envrc, Makefile, package scripts, CI configs,.gitattributes). A diff does not show.gitinternals: treat a workspace a sandboxed command wrote into as untrusted until its git config and hooks are inspected, or use a fresh clone. - The interactive preflight decided by the lock only after it had started every configured MCP server, with every secret the
[secrets]release binds tomcp(#848). A revoked, moved, rebuilt or profile-changed server was started before the preflight refused it,[sandbox] lazy_startwas a no-op in a terminal session, and the preflight connection (kept by the reactor under the same key) made the session ignore the narrower grant of its lock entry. The preflight now asks the lock first (Gate::unseen_admission, the roster's own pre-start decision, bundle and profile included): a refused server prints why and is neither started nor offered (a moved or rebuilt one is re-approved withtole plugin approve). The rest are started for the listing through the one-shot probe ofplugin add: no secret, its own process group ended before the owner is asked, killed by the kernel if tole itself dies mid-probe (LinuxPR_SET_PDEATHSIG; a Ctrl-C no longer reaches the probe's group), a third-party server nobody verified only inside the sandbox (asplugin add), so the session starts its own process with the grant of its lock entry. Which servers are started: a never approved one, and an approved one that starts eagerly, because the listing is how a CHANGED tool list is offered for re-approval; that is one extra start of each such server at every interactive session start (the starts run at once, each bounded by 30 s). An approved server that starts lazily (lazy_start, a complete snapshot) is not started by the preflight at all. A re-approval of changed tools keeps the entry's secret grants, bundle record and tier (it never widens them); a new third-party server holds no secret; the prompt says which secrets the server will receive. A bearer token is not sent to an HTTP URL that is not approved yet. - A server approved WITH a sandbox profile could run unsandboxed in mode
optionalwhen the wrapper could no longer be built (a granted path renamed away, no workspace, a refused program directory): the launch fell back to a direct start with a warning while the profile hash, which hashes a missing path as written, still matched (#848). The gate now treats a recorded sandbox that cannot be built asProfileChanged, before the start and at connect. A server approved without a sandbox keeps the meaning ofoptional. --no-configdropped the owner's user config (sandbox mode,[sandbox.consumers], secret release, approvals) for a child of an agent session, because unlike--sandbox/--no-sandboxit was accepted under one (#855). It is now refused under an agent session (TOLE_UNDER_SESSION, a child agent, #684) and fortole serve,tole acpandtole mcp, with a message naming the reason; an owner at a terminal keeps it. The refusals of those three faces for a config value they cannot honor no longer suggest--no-config: they say to remove the key from the config file.tole plugin approvecould be scripted past a changed sandbox profile by deleting the server's entry from the lock (#847): the move was decided only when the lock had an entry. It is now decided from the ledger's recorded profile alone when there is none, and still needs an interactive approval. The same holds for a server the owner revoked while it ran sandboxed: a script's--hashcan no longer re-approve it by deleting or editing the lock entry (a revoked unsandboxed server stays re-approvable by a script).tole plugin revoke --secretno longer adopts the remaining grants of a pre-#825 plain entry into the ledger without the owner at a terminal: a script, or a--hash, only narrows (a secret added to the lock by hand could otherwise be made permanent); the terminal prompt lists what is adopted.--sandbox <profile>was accepted without a terminal (#846): a script (noTOLE_UNDER_SESSION, stdin or stderr not a terminal) could pick a user-defined profile wider than the configured one, and a server whose lock entry recorded no profile then ran under it. It now has the same test as--no-sandbox: refused fortole serve,tole acp,tole mcpand any run without a terminal. As a second layer the core ignores a profile override once the process is marked unattended. New tests drive the real tool roster withlazy_starton against the fixture server (nothing starts at build; the first call runs the lock's pre-start check and the live manifest check; a swapped binary is never started).- A secret added by hand to a plain (non-bundle) plugin lock entry was not caught by the ledger (#825). A plain approval now writes
approvewith asecrets_recordedmarker and onesecret_grantline per granted secret, and the check of the lock against the ledger treats an entry that holds a grant the ledger does not show (or shows revoked) as revoked, as for a bundle entry. Entries approved before this keep working: they are reported (tole plugin list,tole doctor) as holding grants the ledger never recorded, and become tracked at their next approval or attole plugin revoke <server> --secret NAME, which records the grants that stay. tole plugin addandtole plugin approverefuse, with a message naming the file and the repair, when the plugin ledger exists but cannot be read, instead of treating it as empty;tole doctorandtole plugin list|diffsay that they refuse (#813 item 3).tole discuss startandtole discuss resumerefuse under an agent session like the other owner-only writes (#684);--dry-run,listandshowstay open (#813 item 2). Items 1 and 4 are decided below.- A discussion call that ended in a transport timeout settled at 0 tokens, so the discussion budget (a hard cap) could be exceeded without the ledger knowing, and the retry of #756 doubled the exposure (#804). A call that fails with no reported usage after the request may have left (a timeout above all) is now charged its reserved estimate, never more than its own carve, in the ledger and the goal's pot, like a crashed call; the settle record says why (
charged:timeoutorunreported, an optional field old ledgers and readers ignore). A failure that provably came before the request left (refused connection, DNS, a rejected URL, the TLS handshake) stays free, and anything the classifier cannot place is charged. The retry still goes through the budget: two timeouts cost two estimates and the discussion stops at the cap with the existing escalation; a resume never charges a settled call again.tole audit --discussionnow lists a round that never completed and shows its retries and charged calls (text and--json). - Security: the SSRF guard let NAT64, IPv4-translated and ISATAP addresses through.
ip_is_privatelooked for the NAT64 prefix64:ff9b::/96as the segments0:64:ff9b:0:0:0, which no address has, so64:ff9b::a9fe:a9fe(the cloud metadata address 169.254.169.254 behind a NAT64 gateway),64:ff9b::7f00:1and the private ranges embedded the same way were treated as public. It now reads64:ff9b:0:0:0:0, so those are refused byweb_fetch,web_search, the web backend tools and the built-in web hops exactly like the 6to4, Teredo and IPv4-mapped forms. The review of this fix found two more forms of the same kind, now unwrapped too: IPv4-translated::ffff:0:0:0/96(::ffff:0:a9fe:a9fe) and ISATAP (<prefix>:0:5efe:<v4>or:200:5efe:<v4>, e.g.::5efe:a9fe:a9fe); an ISATAP-shaped tail with a public v4 does not clear a 6to4 or Teredo prefix that embeds a private one. A public address behind NAT64 (64:ff9b::808:808) stays allowed. Reaching it needed a resolver that answers with NAT64 addresses (a DNS64 network or a hostile DNS answer).
Added
tole plugin add --bundleand per-plugin secret grants, part 2 of slice 2 of #600 (#811).tole plugin add --bundle <file or directory>shows thetole-plugin.tomlmanifest (every line behind a bar, as data), starts each server through the one-shot probe (no secret, sandbox required for an unverified one), shows the full tool text and the scan, and locks the servers after you typeadd <plugin> <first 8 hex of the manifest file hash>. Each requested secret is then asked separately (Grant secret X to server Y only?); a refusal still installs the plugin without it, and a script never grants one. A grant is the name of one environment variable, passed only to that server's stdio process, only while[secrets]also releases it tomcp, and only while the manifest file is the approved one. A changed or unreadable manifest shows aschanged (plugin manifest)inlistanddiffand blocks the server untiltole plugin approve <server>, which asks again for every secret (a script passes--bundle-hashand grants none;--manifestapproves from another path).tole plugin revoke <server> --secret NAMEwithdraws one grant and leaves the server approved; a running process keeps the value, so rotate the secret. Declared skills and hooks are shown but never loaded or run, and declared paths are recorded only.- Bundle manifests and a pinned secret grant, part 1 of slice 2 of #600 (#811; the commands that use them follow in part 2).
tole-plugin.tomlis parsed strictly (tole_cli::plugin_bundle: name, version, MCP servers each with a command line or https URL and the secrets it asks for, declared skills, hooks and paths; unknown keys, control characters, a remote server asking for secrets and names that are not secret-shaped are refused). A lock entry can now carry abundlerecord (plugin, version, SHA-256 of the manifest file, its path; lock format version 3, an older tole refuses it), and a server with one starts only while the file hashes to the approved value: any change (a comment included) or an unreadable file blocks it at connect with the newAdmission::BundleChanged, its grants do not apply, and the change is a ledger line. A bundle approval writesapprovewith the manifest hash and onesecret_grantline per granted secret, and the check of the lock against the ledger treats a bundle entry whose manifest pin or grants the ledger does not show (or shows revoked) as revoked, so a hand-edited lock cannot add or restore a secret. - The discussion provider request timeout is configurable (#786): env
TOLE_DISCUSSION_TIMEOUT_SECS> user config[discussions] request_timeout_secs> 120 (unchanged), a whole number of seconds from 1 to 3600. It is the global timeout of one provider call (connect, send and the whole reply, as discussions do not stream), so reasoning models that need minutes per round no longer die attimeout: global. The key is user config only (a project config's value is ignored and shown as IGNORED intole config check), an invalid env value stops startup naming the variable, andtole config checkandtole doctorprint the effective value and its source. The advisor keeps its own 120 s. tole doctorwarns about MCP servers, part 6 of #600: an unpinned launcher (npx,bunx,pnpm dlx,uvx,pipx run,docker/podman runwithout an exact version or digest), a third-party stdio server no sandbox applies to (mode off, skipped, no bubblewrap, not Linux), and a broad secret grant (any secret on a third-party server, or more than 3 on any). It reads the lock and the command lines and starts nothing; lock entries the plugin ledger blocks are reported with the existing notes.- A discussion participant turn or scribe call that times out is retried once (#756), where a timeout used to fail the turn (a whole resume cycle) or refuse the scribe's digest. Only the provider's own timeout counts (not an HTTP 4xx/5xx or any other error), at most once per call, and the retry is a call like any other: it is reserved against the discussion budget and the goal's pot (a retry that does not fit is the budget stop), settled, and recorded in the ledger as a reservation with
retry_ofnaming the timed-out call (older readers ignore the field; the ledger refuses a second retry of a call and a retry of a retry). A second timeout fails the turn as before. The checker is not retried; the gate,max_roundsand the dissent rules are unchanged.tole audit --discussionshows how many calls of a round were retried. tole plugin add name=<command line or https url>and trust tiers, part 5 of #600. It starts the server through the one-shot probe (inside the sandbox for a third-party server nobody verified: with the sandbox off, skipped or unavailable, such a server is refused before anything starts, and so is a server of that kind intole plugin approve), shows everything the model would read (server text behind a bar, as data), the scan report and any unpinned launcher, and locks the server after you typeadd <name> <first 8 hex of the manifest hash>(a bareydoes not count and there is no--yes). What is locked is what was shown: the tool list shown, the program hash taken before the start (a binary swapped while it ran is refused), the tierthird-party-unverified, the sandbox profile and no secret grant.addis interactive only and refuses under an agent session likeapproveandrevoke; it never installs under a first-party name (cora,uteke,nginjen,laya, or a name in[sandbox] skip) or under a name already in the lock, and it does not edit your config. Not built yet: bundle manifests, per-plugin secret grants, registry resolution, skills from the uteke registry (docs/third-party-plugins-design.md§9).tole plugin revokeis owner-only and a revoked server cannot be revived by editing the lock, part 2 of #600.revokerefuses under an agent session (TOLE_UNDER_SESSION,TOLE_AGENT_DEPTH, likeapprove, #684, #700), writes the ledger record before the lock (so a failed lock write still leaves the server blocked), says the server is not started again untiltole plugin approve, and lists the secrets it was granted so you can rotate them. A project-lock revoke is recorded asrevoke_projectand only narrows. New: the plugin ledger is checked against the lock. An entry the lock shows as approved but whose last ledger decision is a revoke, or whose manifest hash is not the last approved one, is treated as revoked at connect, inlistand indiff, with a note, until you approve it again; entries with no ledger approval at all are reported but not blocked. This is detection, not a boundary: the lock and the ledger are both your files, so a process that can rewrite both defeats it (it catches an edit of the lock alone,docs/threat-model.md).- A one-shot probe for servers that are not approved, part 4 of #600 (
tole_core::mcp::probe_manifest, not wired to a command yet;tole plugin adduses it next). It starts a stdio server on its own, lists its tools and stops it on every exit path (returned, failed, timed out, panicked): the server leads its own process group and the whole group is killed, so a launcher's grandchildren do not outlive it. The server gets no secret (empty grant, whatever[secrets]releases), its stderr is discarded, and withrequire_sandboxit starts only inside the sandbox (a launch that would run direct is refused before anything is spawned). Newtole_core::plugin_launcher::unpinned_launcher: reads a command line and says whennpx,bunx,pnpm dlx,uvx,pipx runordocker/podman runwould fetch a package or image without an exact version or digest (forplugin addanddoctor). - Description scanner for third-party MCP servers, part 3 of #600 (
tole_core::plugin_scan, pure functions, no network, not wired to a command yet).scanreads every tool name, description and input-schema string (keys included) and reports hidden-instruction markers (<IMPORTANT>, "do not tell the user", instruction-override phrases, chat-template tokens), mentions of other servers or tools (named as a tool or server, never a bare word), sensitive paths (.ssh,.env,.aws,mcp.json,/etc/passwd, ...), invisible and bidi Unicode, secret shapes and the value of any secret you hold, and descriptions over 1500 characters. Matching ignores invisible characters, case and whitespace, so a phrase split by a soft hyphen still matches. A finding names a pattern and where, never quotes the server's text, and the report says a clean scan is not a safety verdict. Tested against a corpus of hostile and benign descriptions. tole plugin listandtole plugin diffshow more and start less, first slice of #600 (part 1 of 5).listadds, per server, the source (command line or URL), the program hash, the granted secrets, the revoked flag, the sandbox status (wrapped with which profile, off, skipped, unavailable) and a trust tier (first-party,third-party-verified,third-party-unverified). The tier is data in the lock entry (tier), but a first-party claim only counts for a name on the first-party list (cora,uteke,nginjen,layaby default), so editing the lock file cannot promote a server.diffadds what changed in the source, the program hash and the secret grant (approved against released now), and prints everything a server sent behind a|bar, as data. Neither command starts a server the lock would not let a session start (revoked, unapproved, another command line or URL, another program file), and under an agent session (TOLE_UNDER_SESSION,TOLE_AGENT_DEPTH) neither starts anything. Revocation,add, the description scanner anddoctorwarnings follow in the next parts; bundle manifests, registry resolution and per-plugin secret grants are later slices.- Opt-in sandbox for the commands a model makes the host run, first slice of #748 (design
docs/sandbox-design.md§9.3).[sandbox.consumers]in the user config (a project config cannot set it) withrun_commandandjob_start=off(default, nothing changes) |optional|required,network=none(default) |host, and the bounded limitscpu_secs,memory_mb,processes,file_size_mb. A sandboxed command runs asbwrap ... -- program argsin the new built-incommandprofile: workspace writable with.git/hooks,.git/configand.toleread-only on top, the tole data dir and$HOMEabsent, private/proc, no network unlesshost, no capabilities, no nested user namespace, rlimits (CPU, address space, processes, file size) and no inherited descriptor above 2. Stdout, stderr, exit code, the 30 s timeout, output caps, the approval of the tool, the secret scrub andTOLE_UNDER_SESSIONbehave as before; a timeout or cancel leaves no process behind.requiredrefuses when there is no working sandbox (macOS and Windows have none);optionalruns unsandboxed with a warning when a human is attached and refuses in unattended runs (tole serve, cron).tole doctorlists the consumers and fails when a required one cannot run;tole config checkshows the keys.verify, the stop gates, cron scripts and deliveries are unchanged for now. - Delegation approvals are complete, part 6 of #714 (closes it). New user guide
docs/approving-delegated-work.md(how to turn it on, list and decide withtole delegation approvalsand/approvals, thechainmode and thedelegate_decidegrant, timeouts, what a denial looks like), threat-model rows for the approval queue (injection through a request text, a child asking for more than its parent holds, a parent approving on injected instruction, replay, confused deputy, a race between levels, orphaned requests, flood, a forged record),automation-design.md"as built", andtole doctornow printsdelegation approvals: off|owner|chain. An end-to-end test against the real binary and a mock provider covers a delegated child that asks for a Write: the owner allows and it proceeds, the owner denies, a timeout denies, and withapprovalsoff or unset it is denied at once as before. The default staysoff: withownera delegated child's non-allowlisted Write parks for up toapproval_secs(900 s) instead of failing at once, which would stall unattended missions for every existing user ofdelegate, so bothownerandchainare opt-in. Not built: theawaiting_approvalcount indelegate_poll, afact/approval_<id>register on the child's session, an SSE frame for serve, log rotation. - Agent levels can answer a delegated child's approval request, part 5 of #714:
delegate_pending(ReadOnly) anddelegate_decide(Write). They exist only with[delegation] approvals = "chain"(never inofforowner), wheredelegateexists (so never for a discussion participant, which stays read-only) and only for a level whose own allow list holds adelegate_decidegrant: you typed--allow delegate_decide, or a profile's pattern the parent's list covers (child_allowdrops the rest).delegate_pendinglists the requests whose current level is this node, with what the child wrote redacted, capped and fenced as data.delegate_decidetakes{request, decision: allow|deny|escalate}and nothing else (no node, level, pattern or text); the deciding node is the host's own, the record carries the level and the request's fingerprint, and a level can only act while it is running, is the request's current level and the request is pending, so it never allows beyond its own list (deny patterns win, the workspace guard holds), never sees an always-owner request, and cannot act twice.escalatemoves the request one eligible level up. With the defaultoffnothing changes. tole servelists and decides delegated children's approval requests, part 4 of #714.GET /approvalsnow also returns the pending requests of the durable queue (source: "delegation": id, goal, node, tool, target, redacted display, age, time left, fingerprint, the chain of levels and the CLI's fenced text), andPOST /approvals/dap-…/decisionanswers one with the same bearer token. The CLI's rules apply because it is the same code: the route refuses (403) when serve runs under an agent session,allowmust repeat the request id asconfirm(no "allow all"), only a pending request is decided (409 with the reason, 404 unknown), the decision is bound to the request's fingerprint and recordedvia: serve, and the owner can answer always-owner requests here. No session is resumed, and serve's own in-memory queue (apr-*ids, deny-then-resume) is unchanged; with no delegation requests (the default,approvals = "off") the list is exactly what it was.- The owner answers a delegated child's approval request, part 3 of #714:
tole delegation approvals list|show|allow|deny.listandshoware read-only and print redacted, capped data (the display and the input preview are fenced, control characters dropped);showgives the asking node and profile, the goal, the chain of levels with who can answer, the tool, target, workspace, flags, the fingerprint, the age and the time left.allowanddenyappend an owner decision bound to the request's fingerprint, refuse under an agent session before reading anything (#684, #700), and only decide a pending request (an unknown, expired, consumed, already decided or settled one is refused with its reason).allowneeds the full request id (no prefix, no pattern, no "all"): it shows the request and asks for the id typed back;--yesskips only the typing and--fingerprintpins the content.denyasks nothing. The child's one-shot consume still decides whether the call runs.tole audit <goal>now lists the goal's approval requests with who decided at which level and what became of each. Only a child started with[delegation] approvalson creates requests, so with the defaultoffnothing changes. - A delegated child can park at an approval, part 2 of #714 (off by default). With
[delegation] approvals = "owner"or"chain", a delegated child's non-allowlisted Write is appended toapprovals.jsonlnext to the delegation log (the request builder caps the display at 2 KiB and the stored input at 16 KiB, one open request per node and 32 per goal) and the child waits indecide, polling the log, until the request is allowed, denied or expired. The wait is capped byapproval_secsand the node's deadline and ends on the session's cancel token. An