Security Defense
Department grants and main employee access (Enterprise, v1.86.0)
Section titled “Department grants and main employee access (Enterprise, v1.86.0)”Department authority comes from an Admin’s explicit grant to an active Manager and the official org chart department, which must agree with the employee’s own settings. A member’s department label or an employee’s self-edited settings cannot expand it. The main AI employee and all personal employees are excluded from department grants; owners retain their existing personal-employee access. Missing or unreadable authority grants no access.
Grants work only in signed-in dashboard sessions, never through personal API keys or chat apps. They start empty. Adding or widening access requires reading a risk note and ticking I understand; every grant and revocation is audited, as are writes authorized through a grant. Stopping an account or changing it away from Manager revokes department grants automatically. Existing routines and saved rules are not automatically disabled.
The separate main AI employee access list also starts empty and requires risk acknowledgement when adding people. It permits conversation and ordinary work only in protected mode with isolated employee execution. Customer hosts cannot enable native Linux employee isolation yet, so in this release the list can be saved but does not take effect. Otherwise, only Admins can use these entry points; the settings response explains that the saved list is inactive. Personal API keys can never use the main employee. Scheduling, employee creation and settings changes remain Admin-only. Listed people may ask about remembered content, including Admin conversations.
When working for a listed non-Admin person, the main employee’s administrator tools are hidden and refused with “This action requires the administrator to perform it personally.” It can still delegate to other employees under its normal delegation rules; [delegation] human_principal = "enforce" is recommended to check the person’s access on hand-over. See Department managers for scope, rollout and known limitations.
Per-run caller identity
Section titled “Per-run caller identity”An AI cannot claim another identity by changing environment variables, parameters, or its working directory. Each gateway-managed run gets its own short-lived DUDUCLAW_RUN_CREDENTIAL. Local tools verify it over a versioned local IPC endpoint (DUDUCLAW_IDENTITY_ENDPOINT: a Unix socket in a private owner-only directory, or a current-user named pipe that rejects remote clients) or with duduclaw identity whoami --json. Before sending the credential, the client checks through the operating system that the process on the other end matches DUDUCLAW_IDENTITY_SERVER, the gateway’s PID and start time. The gateway answers only when the caller, identified by the kernel, is the CLI process it spawned for that run or a descendant of it, with the PID and start time checked on every parent edge (at most 64 edges). A process outside that tree is refused even when it holds the correct token, so a daemon started outside the run cannot use a copied credential. The gateway stores only hashes; run completion, cancellation, expiry or restart invalidates the proof. The earlier 127.0.0.1 HTTP listener and DUDUCLAW_IDENTITY_URL are removed with no fallback.
Known limits: on Windows, a program under the same account that deliberately sets its parent process can pass the ancestry check. On macOS, and on Linux kernels without SO_PEERPIDFD, a narrow PID-reuse window remains. Code injected into a legitimate descendant, a descendant that relays requests for another process, or a connected handle passed to another process acts as that descendant. Native Linux protected mode isolates employees as separate users, issues no run credential and uses its own capability records; existing agent tokens and MCP identity verification are unchanged. See Getting and verifying the caller identity.
Native Linux isolation integration (planned for a later release)
Section titled “Native Linux isolation integration (planned for a later release)”Not available in the current release. The code for the per-employee Linux isolation architecture has been included since v1.81.0, but it cannot be installed or enabled on a customer host. The protected service still installs, updates and runs employees as in v1.80 (
sudo duduclaw service install --protected-linux,sudo /opt/duduclaw/bin/duduclaw service upgrade --protected-linux). The paragraphs in this section, and the sections marked “planned for a later release” below, describe the development state of that planned release.
The protected ingress preserves the original verified WebChat/channel user and credential epoch, and rechecks live access before launch. Scheduled work, reminders, heartbeat and goal work now require the record owner’s identity, the exact stored work and a persisted Admin dashboard approval: decisions are due within 24 hours and authorization lasts at most 30 days. Pending work is deferred without consuming retries. Schedulers never refresh the original credential epoch; only an authenticated heartbeat settings save can request a new approval for stale authority. Delegation derives authority from the original live, verified run and refuses missing identity.
Composite readiness now exposes independent PTY and cache hooks and requires fresh evidence for the same installed generation. Each run registers and revokes its own egress identity while preserving the original conversation turn. Other packages must still supply their production readiness evidence; full gateway/CLI compilation, root acceptance and real Claude/provider acceptance remain pending. Missing or invalid evidence continues to refuse protected TEAM work; this is not an enabled or accepted isolation release.
Round 6 selects the v1.80.0 deferral: protected TEAM refuses fork_run, merge_or_select, and terminate_branch with a zh-TW/en/ja next-release message. Non-protected installations keep their existing behavior. Inspect and recorded-manifest diff remain owner-checked host reads; cost queries report unavailable/null rather than unmeasured zero. Partial clone/queue/pointer-CAS code stays behind the refusal because child capability/account/parent-budget authority and immutable result apply are unfinished. The A readiness hook checks the remaining installed producers, excluding exactly these three mutations; missing signed helpers still block it. Other composite gates, integrated compilation and native/provider acceptance remain separate. Round 5’s optional root workspace selector and retained directory fd contract is unchanged: root reopens the selected H directory and verifies UID/device/inode before mounting it at /work.
Fork status, output comparison and cost queries now require the fork owner before returning branch records; store errors no longer look like an empty successful result. In the isolation adapter, delegation enqueueing and selected discovery controls reuse the original caller, target and background-admission checks. Protected discovery status views use host-maintained records and report artifact verification as unavailable without reading employee output trees. Queue acceptance and logical cancellation do not prove isolated launch or process retirement. Program, Office create/extract and bounded code-map helper protocols now have conditional root-publication plans and authenticated asynchronous job status/cancellation. Office reads input snapshots and publishes output without replacing existing files; missing signatures, profiles or workspace grants refuse execution. Host hardware queries avoid subprocesses and model queries are explicitly limited to the bundled catalog. Discovery downloads verify an exact file against a host-published checkpoint manifest (protected downloads: 2 MiB maximum); historical checkpoints without a manifest refuse. Fork execution/promotion/cancellation, browser recording, signed packaging and native acceptance remain incomplete; protected TEAM startup stays blocked.
The conditional browser-recording producer now accepts explicit headless recordings only (1–300 seconds, default 30), using fixed Node/Playwright/Chromium digests and the root-derived egress proxy. It keeps Chromium’s sandbox enabled and has no host-display or ambient dependency fallback. Complete artifacts publish without replacement into the authorized employee workspace; only bounded metadata reaches the gateway. Trace screenshots/snapshots may contain secrets and remain sensitive raw content, not a redacted HAR. An owned stop request persists before delivery; it does not prove completion. Live dashboard Admins have independent status/stop RPCs while the employee is occupied. Early stop can return no recording; restart leaves unfinished jobs uncertain. Browser packaging, native sandbox/egress acceptance, human demonstration and skill distillation remain unverified; the three fork mutations are deferred as documented above. Remaining A producers have a conditional readiness hook; protected TEAM admission still requires every other component.
Protected TEAM now explicitly refuses Codex, Grok, generic CLI and OpenAI-compatible execution while their isolated runtime adapters are unfinished. The refusal directs the operator to check runtime support and does not retry under the gateway identity. Claude also refuses missing per-run authorization or unsupported execution options. The production Claude chain and PTY support remain incomplete; protected TEAM work is still unavailable. I1d development wiring now includes an isolated API worker with Chat Completions, Responses, Anthropic and Gemini adapters; Codex/Grok native adapters with root-owned private home/project config projections; and a versioned registered-adapter path for generic CLIs. All require a fresh signed root runtime publication, single-use host authorization and matching MCP acceptance. The native adapter reads only employee login state; the API worker reads only employee-owned provider credentials. Gateway keys are never copied into a run. Grok uses the I1e protected PTY API (merge required). The signed release/bootstrap paths can carry worker, adapter, vendor ELF and readonly policy artifacts; exact vendor digests bind native acceptance. Missing acceptance, external Codex configuration and unsupported modes still refuse. Native login renewal/startup-state behavior, generic vendor adapters, gateway compilation, production signing/install and actual runtime/provider acceptance remain unverified or incomplete; protected TEAM readiness is unchanged. See I1d handoff.
The protected boot path can now consume generation-bound root runtime publication and requires an actual per-run readonly MCP configuration receipt after descriptor delivery. The parser launcher retains a host-wide budget until process and cgroup retirement is proven; uncertain cleanup leaves the slot unavailable. Missing installation measurements or runtime acceptance still refuse work. These changes do not close the missing principal/policy integration, runtime contexts, PTY chain or full employee-turn acceptance.
Protected native Linux TEAM startup now installs a composite execution gate: every required component must have current, verified readiness before employee work is admitted, including API-only model calls and subprocess launches. Boot selects SpawndBackend as the protected execution backend; unavailable isolation never falls back to the gateway identity. The dashboard shows component status and remains available for administration and migration review. Ordinary installations and macOS/Windows receive no new gate. Trusted runtime publication, installation evidence, tool-boundary authority and production storage setup are still incomplete, so this integration continues to refuse protected TEAM work; it is not a deployable or accepted isolation release.
The development trampoline accepts newer Landlock kernel ABIs using exactly the known ABI-7 filesystem policy, while still refusing a missing minimum ABI or failed enforcement. Probe evidence distinguishes the detected kernel ABI from the selected policy. This compatibility change still requires native Linux re-validation.
Employee runtimes and subprocess helpers now share an execution backend. Ordinary installations retain their native command arguments, environment and working directory. Protected native Linux refuses execution unless the isolated service and trusted policy/capability context are available; a failure never falls back to the gateway identity. The process inventory guard checks every classified spawn path. Capability and worker integration, migration, remote compilation and native acceptance are still required; this change alone is not a deployable protected-mode upgrade.
The native Linux parser integration (planned for a later release) routes document extraction, configurable Office checks, typed tables, image transforms, HTML/CSS and expert ZIP expansion through a separately installed low-privilege worker. Required isolation never falls back to same-account parsing. Protected Linux TEAM startup now requires this worker path; other installations do not activate it automatically. Protected backup import and local model services still require their migration/execution integrations. Deployment, product-wide integration and three-distribution runtime acceptance remain unverified; this is not a product-wide isolation guarantee. See implementation and limits.
The duduclaw-isolation crate (included since v1.81.0, used by the isolation planned for a later release) defines shared contracts for per-employee execution, MCP capabilities, egress, isolated parsing, signed updates and migration confirmation. It does not establish per-employee Linux isolation by itself.
The development update path now routes protected dashboard requests through an Admin gate to duduclaw-updated; the CLI also submits a version and request id instead of installing directly. The root service authenticates the peer, accepts no caller-selected path or URL, and verifies signed metadata before staging files. Only a committed result is displayed as success. The Linux adapter now publishes one generation selector, restarts fixed services and compares live version, protocol and loaded-executable identity before advancing the version floor. Success also waits for work admission to resume. Cross-package drain, migration and readiness endpoints must be connected; missing or inconsistent readbacks fail closed. Provisioning, bootstrap migration verification, real FIDO2 testing and native Linux acceptance are still required. Do not deploy this partial update path to v1.79.3 or treat it as an active employee-isolation guarantee. See protected service status.
Installer integration now includes signed inactive-generation staging and an offline bootstrap inbox, read-only installed-file/account/unit checks, the fixed-plan migration handoff and first-administrator issuance through a root-authenticated socket and a loopback setup page. The durable migration manifest prevents reboot from reverting to ordinary administrator initialization. Staging never selects a generation or installs trust/state/slots; transition dual signatures, complete fresh installation and activation remain unfinished. The readiness CLI always refuses its still-missing composite adapter, and custom DNS drop-ins are not accepted yet. Coordinated fixed-path removal preserves unit backups and persistent masks, checks stopped processes/cgroups/known mount roots, then removes executables while retaining keys, data, identities, updater state/generations and version floors. Arbitrary custom storage roots still need an adapter. This round did not run live root install, migration or removal acceptance; these changes do not enable per-employee Linux isolation.
Personal employee data visibility (planned for a later release)
Section titled “Personal employee data visibility (planned for a later release)”In protected mode only, a Personal employee’s private data (conversations and run transcripts, memory, agent files such as SOUL.md and CONTRACT.toml, its own wiki pages, and its work record: tasks and their details, activity, timeline, open decisions, canvas and approval contents) is restricted by default to its owner, with the audited Admin read rules below:
-
Team grants: a manager no longer gets derived access to, or team history of, a subordinate’s Personal employee. Shared employees relay as before.
-
**Admin reads:**Admins can read a member’s currently assigned AI avatar conversations and memory directly, without an extra password or TOTP check. This includes conversation lists, conversation/memory search and their live updates. Every such Admin read records who read it, the avatar, its member and the operation; if the audit cannot be written, access is refused. Other members gain no access. A Personal employee that is not currently an avatar still requires the five-minute password + TOTP proof and
step_up_csrf. Removing the avatar assignment, losing its active owner binding, or being unable to read avatar state restores those stricter rules immediately. Writes, conversation restore, delegation, settings, files and Wiki access keep their existing rules. Approval-card contents and individual task reads or changes still require the audited step-up. Task totals count only visible rows. Other live events remain owner-only, and non-avatar Personal attachments have no step-up download path. -
Decisions and assignments: an approval card of a Personal employee (including mail send confirmations) is decided by its owner. An Admin who is not the owner can decide it on the dashboard only with the same step-up and
step_up_csrf; each such decision is audited. Without the step-up the refusal says one is needed. On chat channels (buttons, text replies, the Telegram mini app) no step-up is possible, so only the owner’s own verified account can decide. Only the owner can assign work to a Personal employee from the dashboard (new task, reassignment, goal, shared plan); an Admin is refused too. -
AI tools: another AI employee cannot use
agent_update,agent_update_soul,agent_removeor the other tools that name a different employee (status, evolution, skills, that employee’s wiki, mailbox, co-drive identity, schedules, reminders, feedback, audit trail, reliability, cost, org placement throughreports_to) on a Personal employee. It also cannot hand it work (spawn_agent,send_to_agent,create_tasksteps,tasks_create/tasks_updatewithassigned_to, discovery runs), read its replies (check_responses), its tasks, activity or plans (by employee or by task/plan id) or its task store (task_statusfrom another key), or name its memory namespace. Another Personal employee of the same owner may still hand it work.list_agentsdoes not show another person’s Personal employees to other AI employees at all. A Personal employee itself, and the temporary sub-agents it creates, keep working on it. The owner manages it from the dashboard. -
Further surfaces: the same owner-or-step-up rule now also covers profile exports, learned playbook entries, wiki trust history, the employee’s own skill files, its mail (audit category
mail), its shared plans and their steps, pending profile-file changes and run forks. Lists of plans, mail and forks leave out Personal employees the reader does not own. Assigning work is owner-only for every route: reassignment, delegation from the dashboard (including waiting for the answer), goal and discovery tasks, plan steps, sub-tasks and dependencies, and the employee the server picks to run a skill. AI employees also cannot reach its tasks throughtasks_claim,tasks_renew,tasks_complete,tasks_block,activity_post,capability_requestor task and goal links. The all-employee lists (tasks_listandactivity_listwith*, andgoals_list) leave out its rows, and their totals match. Except for the audited avatar session/memory updates above, every kind of live dashboard update is filtered the same way; an update that names no employee is held back from anyone with a hidden Personal employee, except a short list of updates known to carry no employee data. A reader who is not an Admin gets the same reply for another person’s Personal employee as for one that does not exist, both on the dashboard and on chat channels. An external MCP key whose client id is an employee id is refused. -
Refused by default (new default): Except for the audited avatar conversation/memory reads above, in protected mode, everything about another person’s Personal employee is now refused unless it is explicitly allowed. This also applies to Admins: being an Admin no longer opens it. Only these management actions still work for an Admin who is not the owner, and each is recorded in the audit log: its name and status (
agents.status, the preset name, the avatar, the employee list, which shows only its label, owner and status), pausing and resuming it (also its background autonomy), and the tombstone, restore, adoption and purge steps, which keep their own rules. Its private data and its settings or identity still need the Admin step-up described above, and each use is audited. Giving it work is for its owner only, with no step-up exception. This covers dashboard chat, scheduled routines, reminders, heartbeat runs, continuous responsibilities, skill synthesis and custom-skill generation, handing its work to another employee, sharing its skills, and stopping or taking over its live computer session. Watching that session needs the step-up. Data exports never include another person’s Personal employee, and an export created earlier that included one can no longer be downloaded. The live log tail is not available to someone who has another person’s Personal employees hidden, because it cannot be filtered line by line. Every list leaves out rows of such employees. Scheduled and queued work is checked again just before it runs, against the current owner. A routine, reminder or queued request made for someone other than the owner (including ones created before this change, and ones with no recorded creator) is refused at that moment. A refused routine run is recorded as failed, and a scheduled assignment is also paused. -
Chat channels and scheduled work: calling another person’s Personal employee with
@or handing it a task with/交辦(/assign) is refused on every channel and in WebChat, Admins included; the conversation’s default employee does not open it either. If its owner turned on[channels] public_triggerfor it, anyone may still talk to it, but only the owner can assign it work. A turn that reaches it without@is refused by the isolated runtime unless the sender is its owner (a verified channel account). Release note: legacy schedules and reminders on a Personal employee that have no recorded creator stop when they are due instead of running; the owner has to create them again. A queued job whose recorded requester is not the owner is refused before it runs, whatever employee it says sent it. Data-source grants of a hidden employee are kept as they are when an Admin edits a source’s grant list, and the change record does not name it. -
After a tombstone: a removed Personal employee’s data is kept sealed for 90 days, and its privacy lasts as long: it stays hidden from other people’s lists, an Admin who is not the owner still needs the step-up (audited) to read its conversations, memory, timeline or mail, and other AI employees are still refused. Only when the kept data is purged, or the label is adopted by another employee, does it stop being anyone’s Personal employee.
-
Skill installs: installing a skill into one employee (
skills.installwith an employeescope) is a settings change: for another person’s Personal employee an Admin needs the step-up, and it is audited. An install, or an approved install request, goes only into an employee that currently exists and is not removed or held; it never creates a folder for a removed or unknown employee. An approved request for a Personal employee runs only if its owner filed it, and is audited. -
Approval cards after a tombstone: removing an employee cancels all of its open cards, including ones already approved but not used yet. A card made in protected mode is tied to the employee’s current incarnation, and cannot be used after a restore.
-
Google service mailboxes: a service mailbox cannot be any address a DuDuClaw account has ever used to sign in (including addresses changed since, and accounts removed since); such an address is also refused when a tool uses it. Saving the list needs an Admin with two-factor step-up, and an audit row is written before the change. Every change of a sign-in email is audited. An address that never belonged to a DuDuClaw account cannot be recognised, so check the list carefully. Saving the list is the Admin’s confirmation that none of the addresses belongs to a person. If a colleague later changes their own sign-in email to a service mailbox or to an address an employee acts as, that address stops working (it is never handed to them); the Google page shows the conflict and the security audit log records it. A stored sign-in email that cannot be compared (for example
alice@customer.com.) blocks saving the list and stops the company Google sources until it is fixed; an address without a real domain, such as the first-setupadmin@local, is ignored. -
Google employee acting as a colleague: an employee set to act as a colleague’s address (domain-wide delegation) does so only after an Admin confirms, with the two-factor step-up, which DuDuClaw account the address belongs to (
google.delegation.attest_subject, audited). Matching sign-in emails is not enough, because anyone can change their own sign-in email. The confirmation ends by itself when that account’s sign-in email changes in any way, or when the employee’s identity is changed. Until it is given, the employee acts as nobody; this includes every delegate setting that existed before this update, so an Admin has to confirm those once. The Google page shows what is missing for each employee (tenant_subject). -
Company Google access: the token requested for a company Google source asks Google only for the scopes listed in the tenant settings, not for every scope DuDuClaw supports. A call uses the company source exactly as it was checked when the call was admitted; a settings edit or key re-import in between refuses that call, and the employee picks up the new settings on its next call without a restart.
-
GitHub sign-in renewal: GitHub’s renewal tokens work only once. When the company GitHub sign-in is renewed during a run that then loses access, the renewed sign-in is still saved and only that one call is refused, so the company connection keeps working. Renewals happen one at a time, so two calls at once no longer break the connection.
-
Imported website logins: when the website logins of an older installation are proposed as connector routes, the review card shows who created each one (
created_by). A login created by someone else is not proposed for another person’s Personal employee at all; it is counted as unproven. -
Outbound connections: employee network access never reaches this machine’s own addresses, including its public ones. The address list is read at start and refreshed every 30 seconds; if it cannot be refreshed for 10 minutes, connections are refused.
Ownership comes from users.db, plus, for a removed Personal employee whose data is still kept, the record of that removal: one read per dashboard request at most, reused across requests only while the ACL version (bumped by every ownership change) and the store files are unchanged. If it cannot be read, the request is refused; a call that targets the employee itself does not need that read. Installations without protected mode are unchanged, except that an employee id with leading or trailing spaces is now refused when assigning work instead of being trimmed. The dashboard does not yet prompt for the step-up on these pages.
Released in v1.80.x
Section titled “Released in v1.80.x”Non-admin members (Employee and Manager) see only employees explicitly marked selectable by agents.callable in the sidebar, conversation filters, command palette, WebChat @ suggestions and other employee pickers. The main AI employee stays hidden unless that response explicitly makes it selectable. The full roster is shown only after agents.callable confirms unrestricted: true from the live Admin identity, including the local Personal principal. Initial loading and failed permission reads show no employees for any account. Grants refresh every 60 seconds while the page is visible, when it becomes visible again, and when selection menus open. Refreshing preserves the same identity’s confirmed grants; a failed refresh clears them. File and settings pickers additionally require direct access; team calling rights do not grant file or configuration access. New conversations continue to use the server assignment resolver. This dashboard filtering does not change RPC authorization.
A misconfigured employee is refused at every entry (v1.86)
Section titled “A misconfigured employee is refused at every entry (v1.86)”Every way of handing an employee work now runs the same check first: find the employee, read its effective settings once (the preset-resolved profile when there is one, otherwise agent.toml), and check that they can run. When the check fails, the work is refused before anything happens: no model call, no saved attachment, no task or schedule row, no message accepted into the queue, no approval recorded.
What counts as misconfigured. The reason code shown to people who may see it:
model_provider_mismatch: the model does not belong to the engine.agent_config_unreadable: the settings file is missing, unreadable or malformed, a[runtime]/[model]field has the wrong type, the engine name is unknown, or an engine that needs a model (OpenAI-compatible) has none.runtime_unavailable: the engine (or a team role’s engine) is removed or not active.runtime_policy_refused: the product policy does not allow the engine or the substituted model.agent_not_found: no such employee.
An employee without [model] preferred keeps working as in v1.85: it uses the engine’s default model, and Kiro uses the model chosen in its own CLI settings.
Entries covered.
- Chat: ordinary messages on every channel and in WebChat; WebChat checks at arrival and again after waiting in the queue; AG-UI runs.
- Chat commands on all eleven channels and in WebChat. The check runs after the channel’s access check, so a blocked sender still gets silence, and a
/交辦command checks the employee it assigns to. - Attachments: checked before any file is downloaded or saved (Telegram, LINE, Discord, Slack, WhatsApp, Feishu, Google Chat, Teams, WebChat). A sender the channel blocks gets no files downloaded and no refusal text.
- Trigger words:
@employeeassignment, and a bare@employeethat would wait for the next message, are checked against that employee. - Task creation: the dashboard (tasks, goals, skill assignment, schedules), MCP
tasks_create(goals, board tasks, cron and reminders), A2ASendMessage, and chat/交辦and/goal. Reassigning a task to a misconfigured employee is refused the same way (dashboardtasks.update/tasks.assign, MCPtasks_update, and MCPtasks_claimby an employee); un-assigning a task or moving it away from a misconfigured employee is not affected. - Decisions: “approve”, “start”, “retry” and “continue” check the employee the task is actually assigned to (never the card’s label); “decline”, “cancel”, “abort” and “done” never read settings. A decision sent with a file still reaches the decision handler; the file is dropped.
- Background work: dispatch, the goal loop (including Team-as-Agent rounds), cron, reminders, heartbeats, the mail worker, automation rules, the workflow queue, scheduled assignments and the task sandbox.
Authorization comes first. A caller who may not hand work to an employee gets the existing refusal and learns nothing about that employee’s settings; a deleted, archived or unknown employee keeps the existing “employee unavailable” error.
What people see. Chat users get the same notice as the v1.84 chat refusal, with the reason code and a turn reference. Website visitors (Odoo live chat, website widget sessions and widget accounts) only ever get 「抱歉,目前暫時無法回覆,請稍後再試一次。」. The dashboard shows the operator notice. An AI calling MCP gets “Task creation refused: the target employee’s settings are broken or unavailable. An administrator must fix them before this employee can accept work.” (or “Task reassignment refused: …”). A2A callers get EMPLOYEE_CONFIGURATION_REFUSED. No message contains a file path or parser output; those go to the gateway log.
Commands that still work when settings are broken. !STOP, !STOP ALL, !RESUME, !STATUS, /takeover, /status, /help, /new, /pair and /model skip the settings check, so you can stop, resume, take over, start over, pair and repair the model. Skipping the settings check never skips the access and admin checks: !STOP, !STOP ALL, !RESUME and /model <name> still need an administrator, also when they arrive through a channel without its own command handling. A command with a file attached runs without the file.
Two more flows stay outside the check because they repair access or routing and never run the employee:
- Telegram
/start <token>: links a Telegram account to its dashboard account (shared bot only). It restores access, like/pair. - Discord native
/config,/sessionand/agent: channel settings, session management and choosing which employee answers. Choosing another employee is one way to route around a broken one.
One read per turn. A chat turn and a background run use the settings read at the start for the whole run: engine, model, fallback engine and model, local model, reasoning effort and minimal context. Editing agent.toml mid-turn affects the next message only and can never switch a running turn to another engine. Before v1.86, a file that became unreadable between two reads could make the rest of the turn run with Claude defaults.
Background work no longer falls back to Claude. Before v1.86, scheduled and dispatched work took the engine from a lenient read: a mistyped [runtime] provider or an unreadable file ran the work with Claude, and an engine/model mismatch on the Claude engine was started anyway. That work is now refused. The refusal is a configuration error, so it does not rotate accounts, switch to the fallback engine or count as an engine failure. A goal is parked as needing a decision (goal_loop.entry_refused in its activity, with the reason code) and is not retried; Observer mode does not close it while the settings are still broken. Cron and reminders record a failed run. A scheduled assignment whose employee is broken when it fires is paused as agent_unavailable.
Behaviour changes. Assigning or reassigning work to a misconfigured employee is refused at once instead of failing later. A scheduled assignment for a broken employee pauses. Team-as-Agent role members keep their frozen model and are no longer re-routed to another model tier. On Discord with automatic threads, a message with files downloads them after the thread is created (the new thread can be bound to a different employee); a thread for a files-only message starts with a temporary name and is renamed to the usual name after the download.
Known limits. An MCP server started before the gateway has ever run reads the raw agent.toml, because the preset-resolved profile is written by the gateway; an employee whose model comes only from its preset can then be refused task creation through MCP until the gateway has started once. The employee’s tool restrictions and account pool are still read from agent.toml at spawn time, outside the one-read rule.
code_map stays inside the employee’s own directory (v1.81)
Section titled “code_map stays inside the employee’s own directory (v1.81)”Before v1.81 code_map scanned any directory the MCP server could read (default: its working directory), so a caller could map source anywhere on the host and read its signatures. Now:
- Only an identified AI employee may call it: the shared internal key needs
DUDUCLAW_AGENT_ID, a per-employee key needs anagents/<id>/agent.toml. External keys, operator keys and scoped standalone keys are refused with an explanation;code_mapjoins the tools that act for an employee, so it is also hidden from theirtools/list(the standalone listing drops from 24 to 23 tools). rootdefaults to the employee’s own directory, a relativerootresolves under it,..is refused, and the resolved directory must sit inside the same roots as the data-file tools (<home>/agents/<id>, itsattachments,<home>/attachments,config.toml [files] allowed_roots).- Every file is read through a descriptor walk from the vetted root, one component at a time with
O_NOFOLLOW. Symlinks, non-regular files, files with more than one hard link and files over the size cap are skipped; the content comes from the descriptor that was checked. The walk refuses to cross a mount:st_devmust match on every component, and on Linux the kernel mount id must match too, so a bind mount of another directory on the same filesystem (samest_dev) is refused. Linux usesopenat2withRESOLVE_BENEATH | RESOLVE_NO_SYMLINKS | RESOLVE_NO_XDEVwhen the kernel has it, and compares thestatxSTATX_MNT_ID(or/proc/self/fdinfomnt_id) in every case; when neither reports a mount id the scan is refused. macOS relies onst_devplus the per-component no-follow open; Windows refuses reparse points (symlinks, junctions, volume mount points) and multiply linked files. - Each refusal writes a
tool_calls.jsonlrow (refused: true, the requested root and the reason) and nothing else.
Who may create employees (v1.81)
Section titled “Who may create employees (v1.81)”[permissions] can_create_agents is now true by default only for the main employee. For every other role, and for an employee with no recognisable role, a missing key means false. The MCP permission gate enforces this effective value for create_agent and spawn_ephemeral, so a non-main employee that never wrote the key can no longer create employees. An explicit setting still wins in both directions.
- New employees: the dashboard and
duduclaw agent createwritetrueonly forrole = "main"; the evaluator template and premium team kits writefalsefor every non-main role. - An employee created by another employee through MCP
create_agentalways getscan_create_agents = false. Only the current main employee, withcan_create_agentson, may create arole = "main"employee there; anyone else is refused before anything is written. - The v1.68 boot migration no longer turns
can_create_agents = falseintotrueon a non-main employee. - The admin-only check on
agents.updatecompares the same effective value, so a non-admin Owner can no longer switch creation on for a non-main employee by writingtrueover a missing key.
Behaviour change: a non-main employee whose agent.toml has no can_create_agents key could create employees before v1.81 and is refused now. To keep that, turn it on in the dashboard (「工具與權限」, admin only).
Team delegation keeps the employee’s restrictions (v1.81)
Section titled “Team delegation keeps the employee’s restrictions (v1.81)”- A planner packet’s
tool_scopecan only narrow an executor. A non-emptyallowedlimits the executor to those tools (plusteam_handoff); naming any tool the employee does not hold refuses that delegation and writes ateam_tool_scope_escalationWarning audit row.deniedis removed from the executor’s tools and added to the member’sdenied_tools. Role members (and ordinary ephemeral helpers) also inherit the employee’sapproval_required_tools,irreversible_tools,maybe_irreversible_tools,action_rules,policy,egress_guardandscoped_tools, so they face the same approvals as the employee.grant_ttl_secsis not inherited, because a longer parent TTL would extend the member’s grants. - Inherited approvals never block the team’s own channel. For a role member, the MCP gate skips the inherited
action_rules,policy, approval lists andscoped_toolsgrant requirement forteam_handoffonly (ephemeral::is_role_member_intrinsic_call; it requires a complete[team_member]record whose parent matchesephemeral.toml).scoped_toolsis copied complete, wildcards included, so every other tool a wildcard covers still needs a grant.allowed_tools, an explicitdenied_toolsentry,[permissions]and the egress guard still apply.
Customer company identity (v1.80.0)
Section titled “Customer company identity (v1.80.0)”Customer company name and logo are separate from signed distributor branding. company.get and company.update are explicit Admin RPCs; company.update accepts only the name and optional logo removal, and rejects the former logo_base64 field. Company names reject control, line-separator and Unicode format (Cf, including bidi override/isolate) characters. Updates repeat the live identity check under the existing configuration write lock. The company_info audit records actor, method and outcome without the image or name. Advanced settings navigation and routes are Admin-only; moving controls there does not relax their existing RPC permissions.
Logo upload uses only POST /api/company/logo with a raw PNG, JPEG or WebP body of at most 1 MiB. After admitting the peer IP and before reading the body, the endpoint validates the Authorization: Bearer access token and rechecks the current Admin account; it rejects unauthenticated or unauthorized requests with 401/403 without consuming the body. Cookie authentication is not accepted. A route-specific DefaultBodyLimit and a hard streaming byte limit both enforce the cap. Uploads are limited to six attempts per 60 seconds for each account and each TCP peer IP. The IP gate runs before JWT validation; excess requests return 429 without individual audit entries, preventing unauthenticated audit flooding. Requests admitted by that gate and their outcomes are audited. The account gate runs after JWT and live Admin validation. Forwarded headers are not trusted, so clients behind a proxy share its IP budget. The body has a 30-second timeout, with at most two concurrent upload jobs. The global WebSocket message ceiling remains 1 MiB.
The declared content type must match the image’s magic bytes. The gateway checks the complete image container, rejects trailing payloads, SVG, GIF and animation, sets the 4096 × 4096 dimension and 64 MiB allocation limits before initializing any decoder (including header/dimension reads), then re-encodes a metadata-free PNG thumbnail within 256 × 256. Files use a content hash, atomic publication and the normal locked config commit path for their reference, including another live Admin check and the existing audit.
Public /api/company exposes only the display name and logo URL. /api/company/logo/{sha256}.png accepts only a fixed lowercase hash filename. The reader opens the file once (O_NOFOLLOW on Unix), verifies on that descriptor that it is a regular file with exactly one link and a permitted size, and reads bounded bytes from the same descriptor. It validates the PNG content with a 256 × 256 dimension limit and 1 MiB decoder allocation cap set before decoder initialization, and checks the content hash before returning image/png, X-Content-Type-Options: nosniff and immutable one-year caching. Public company requests are rate-limited per TCP peer. Removing a logo stops its current display but retains old assets for cached pages and invitations; this is not a private-file or deletion feature. Invitation HTML escapes the company name and uses only the invitation’s validated origin and base path for logo URLs. These settings do not change employee authority or distributor signature verification.
Live browser and email acceptance for this change has not been performed; the implementation alone does not imply live-provider or platform acceptance.
All builds cap the management edition at the verified licence entitlement. DUDUCLAW_EDITION and the embedding host’s edition setting can only narrow it; attempted elevation is ignored with one warning per source per process. Missing or invalid licences resolve to Personal, including for users.* and departments.* RPC gates. The production resolver never permits elevation, even with debug assertions enabled. An explicit fixture API requires the non-default test-edition-override feature and debug assertions; release builds reject this feature.
Official GitHub updates bind the minisign trusted comment exactly to duduclaw v{version} {archive-file-name}, including the platform and architecture. Provider updates use duduclaw-pro for Pro archives and their own pinned signing key. Both the payload and the global signature covering the comment must verify. All archive installation paths require a verifier-created VerifiedReleaseIdentity bound to the archive digest, version, file and signed comment; an integrity-only check cannot authorize installation. Before replacement, the extracted binary must match the requested version. Protected upgrades inspect exactly one build-time record with fixed header NUL + DUDUCLAW_RELEASE_ID:V1:, a stable X.Y.Z, and suffix NUL + DUDUCLAW_RELEASE_END + NUL, without running downloaded code as root. Every occurrence of the magic DUDUCLAW_RELEASE_ID must be that complete record; missing, malformed, duplicate or conflicting records are refused. Older binaries without this record are refused too. Release signing checks the actual archived binary’s marker against the tag, including Pro packaging. Ordinary updates check the binary’s version output. Any mismatch aborts before replacement or writing the protected version intent/floor. These checks apply when the installed updater includes this fix; older updaters must first be replaced through an administrator-reviewed installation.
Provider integration: replace the integrity-only call with verify_release_archive_with_pubkey(bytes, checksum, signature, pinned_key, expected_version, expected_file) and pass its result to install_verified_binary(bytes, &identity). The expected version/file must come from the selected release, rather than the downloaded signature. The former single-argument installation API is intentionally unavailable.
Google Cloud meeting transcription uses a separate operator-installed, encrypted service-account key; it does not inherit employee or Workspace credentials. Credential set/clear RPCs verify the live Admin identity before extension dispatch; generic config updates reject these fields, and the raw editor only preserves masks or clears them. Audio is uploaded to the configured GCS bucket after a locked durable cleanup record is written. Failed deletions use bounded backoff and remain pending for startup and periodic reconciliation until success or HTTP 404. Cleanup requires valid credentials and bucket permissions; lifecycle expiry provides an additional backstop. Raw audio is not redacted before upload. See meeting transcripts.
Transcription settings and raw-config writes recheck live Admin authority under the commit lock and refuse writes when the user database is unavailable. Credential set/clear attempts record the actor, action and result without secrets. Cleanup only deletes from the currently configured bucket; mismatched records are retained with count-only warnings. Unix cleanup directories use 0700 and regular journal/lock files use 0600 with no-follow opens. OAuth token responses use typed zeroizing storage and wipe owned response buffers.
Gateway A2A access (since v1.80.0)
Section titled “Gateway A2A access (since v1.80.0)”POST /a2a reuses Dashboard Bearer JWT authentication, including active-account, credential-revocation and forced-password-change checks. It accepts neither the legacy shared admin token nor MCP HTTP-server API keys. A method authorization table, live employee permissions, input screening, per-peer and per-caller rate limits, and security audit guard task operations. The [a2a] exposed_agents allowlist defaults to empty and only narrows access; invalid or unreadable configuration denies access.
The signed public /.well-known/agent-card.json reveals only explicitly exposed employees’ enabled skills. A signature verifies card integrity, not caller authority. GetExtendedAgentCard requires authentication and grants no additional access. A2A reads, lists and cancellations require that the authenticated account created the task through A2A, the employee remains exposed, and current employee ACL and task-audience checks pass. Ownership is stored on the task and inherited by child tasks. The same owner restriction applies to ordinary Dashboard task lists, reads, edits, deletion, stopping, comments, attachments, activity and push events. Admin has no bypass, and no separate administrative override is provided. Ownership records retained after deletion continue protecting remaining evidence. External MCP callers without the Dashboard owner principal are refused; the authenticated employee assigned to execute the task retains necessary task access. Cancellation uses the existing task-tree stop fence; pending or uncertain stopping is not proof that an external process or side effect has stopped. These are product-path boundaries; direct host/database access remains outside them.
Public discovery, rejected authentication and authenticated RPC each have separate 120 requests/minute IP buckets. Their separate global limits are 600, 600 and 1,200 requests/minute respectively; RPC also retains the 60/minute caller limit. Anonymous traffic cannot spend the authenticated RPC budget. Each IP/caller limiter holds at most 10,000 keys; saturation refuses new keys, and stale-key cleanup is throttled.
The retained owner check also applies to forward.recent and forward.chain, including deleted A2A tasks; Admin cannot bypass another caller’s ownership. tasks.flow_metrics excludes other A2A owners’ tasks before calculating counts, timing and round statistics. Non-A2A task access remains unchanged.
Before any task-store schema migration, an existing A2A schema or receipt requires a readable task_access_principals table. If that table is missing or unreadable, opening the store fails; it is never rebuilt empty from surviving tasks. Restore the intact registry from a consistent backup. Fresh databases and legacy databases without A2A traces still migrate.
Existing keys/a2a-signing.ed25519 keys must be regular files, not symbolic links. On Unix they must belong to the gateway’s effective user and have mode exactly 0600; Windows skips Unix ownership/mode checks. Invalid files are refused without replacing them or changing their permissions. Peer-IP admission is recorded before the global bucket: requests rejected by the peer limit do not consume global capacity.
trusted_proxy_cidrs defaults to [] and accepts at most 32 valid IPv4/IPv6 CIDRs. Configure only the immediate proxies you control. A matching proxy must overwrite X-Forwarded-For with one client IP: a missing, duplicate, chained or malformed value is rejected. Headers from other peers are ignored. Without this configuration, clients behind one proxy share its peer-IP bucket within each traffic class. For example, use trusted_proxy_cidrs = ["192.0.2.10/32"] only when that address is your immediate proxy; it does not grant request authorization.
The authenticated account and messageId form a durable unique key. Resending the same full params object returns the original task; reusing the id with different parameters is rejected. JSON object key order does not matter. Deleting the task does not make the id reusable or recreate the task. Retries still require current authorization.
Only version 1.0 is accepted. An absent, empty or unsupported version receives -32009. Streaming, push callbacks, blocking completion and task continuation are unsupported. Setup and request examples: ACP and A2A.
WebChat rechecks access to the employee who actually answered after the socket becomes ready. A short BEGIN IMMEDIATE transaction verifies the ACL generation and covers synchronous start_send, giving ACL changes and frame admission a definite order. The transaction ends before asynchronous flushing; it never waits for socket readiness. When another delivery or an ACL writer holds users.db at that moment, the delivery waits for it (at most 250 ms in total, shared with the final publication of the assistant row) instead of refusing. Revoked or unreadable access, or that wait running out, refuses delivery; a reply refused at this stage is replaced by the fixed failure notice on the socket and in history, and a wait that ran out fails only that reply, not the socket’s other turns. The fixed failure notice is content-free (no reply or operator text) and is stored in history outside the access-generation transaction; its frame on the socket still passes the same account, ACL generation and policy checks. If the notice frame is itself withheld because users.db is still busy, it is retried with a growing pause; new attempts start for at most 10 seconds (WebChat’s send deadline), an attempt already under way then still finishes, and no connection receives it twice; a real access change, a closed socket or a cancelled turn stops the retries at once, and once a cancellation has been observed no notice is recorded or sent (a cancellation that lands just after the last check can still leave or send this fixed notice). If the database stays busy for the whole time, the notice remains in history only. If the account itself lost access, the notice is refused too and nothing is sent. Bytes admitted before a later revocation cannot be recalled.
For non-admin dashboard replies, the same final fence also takes the shared config.toml.lock used by config writers and a registry read lock. It re-evaluates the current default employee, role, status and callable policy, holding both locks through start_send or publication of the assistant row. Lock contention refuses delivery without waiting. This uses live validation under shared locks instead of a separate policy revision counter. Missing or invalid config.toml denies non-admin target authorization; bootstrap must create a valid minimal config explicitly. Admin and anonymous-widget routing rules are unchanged. These advisory locks cover cooperating product writers; arbitrary external edits that ignore them are outside this guarantee.
Assistant rows are inserted with a pending tombstone and excluded from history until the final authority and source checks permit publication. A refused row stays hidden even if clearing its content fails; granting access again does not expose it. A transport failure alone still preserves authorized replies. User rows persist client_msg_id so recovery can match the exact session and user-message identity even when turn_accepted was lost, without matching text or prefixes.
Codex external configuration gate (since v1.80.0): Employees, Explore, utility, Task Sandbox and Discovery may run when external layers are absent or define no MCP servers; detected MCP or unreadable/unparseable existing layers refuse launch with the source named. A refused explicit Codex judge fails acceptance without retrying the default judge. This checks a local/cache snapshot before launch, not complete isolation from subsequent cloud refresh. See checked sources and limits.
Enterprise team-history API (v1.76.0): live reporting-line checks are independent of ordinary agent access; external transcripts require read-time masking and every disclosure requires a durable chained audit. A disabled setting, uncertain origin, installed-model failure or audit failure cannot return transcript content. Regex-only operation explicitly reports ner: false and can leave names/addresses visible. Direct host/database access remains outside this product boundary.
Four live guards, where each one runs, and what none of them covers.
Dashboard MCP API keys are stored hashed (v1.82)
Section titled “Dashboard MCP API keys are stored hashed (v1.82)”Keys issued on Integrations → MCP API keys used to live in config.toml [mcp_keys] with the full key as the table name and expired after a fixed 30 days. They now live in <home>/mcp_keys.db: a random public key id, the SHA-256 fingerprint of the key (never the key), a unique name, scopes, creator, creation time, an Admin-chosen expiry (30 / 90 / 365 days, a date, or none after an explicit risk confirmation), disable / delete markers and a row version. The key is shown once at creation and never logged or audited. Every authenticator — the gateway’s Google bridge, the stdio mcp-server, the http-server and its OAuth consent check — reads the same store on every call, strictly read-only: an indexed lookup by fingerprint, then a constant-time comparison of the matched fingerprint. It refuses when the store exists but cannot be read, lacks its tables, or has an unexpected schema or user_version. Last use is written by those processes to a separate mcp_keys_usage.db, which authenticates nothing. Expired and disabled keys get the same external refusal; the log records which. A deleted key keeps its fingerprint as a tombstone, so a stale copy in a restored config.toml cannot bring it back. Management is by key id and Admin-only. Every create, rename, expiry change, disable, enable, delete and hint dismissal (and every refused attempt) writes a security audit record with the actor. A loosening change whose record cannot be written is undone: only the columns it changed, and only while the key is still at the version that change produced. A later disable or delete is never undone. Every refused credential on the stdio mcp-server and the http-server (all MCP routes, ?api_key= on SSE, and the OAuth consent’s operator key) is recorded with a closed reason (missing, bad scheme, malformed, wrong credential type, unknown, disabled, expired, deleted, unbound, store unavailable), a fixed route label and — for a stored key — only its key id; never the key, a fragment of it, its fingerprint, the query string or the User-Agent. A refusal of an existing key (disabled, expired, deleted, employee gone) is written to the hash-chained security audit at once as mcp_auth_failed — once per key and reason per hour, plus that hour’s count after it (at most 32 keys an hour; more are counted in the summary). Every other refusal goes into one mcp_auth_failed_summary per hour (count per reason, number of sources, unwritten records), so a client without a valid key adds at most one security-audit record an hour. The per-minute detail with the socket peer address lives in the owner-only ~/.duduclaw/mcp_auth_failures.jsonl (first failure per source, reason and key at once, the rest counted, at most 61 lines a minute; rotated at 4 MiB with one previous copy kept, about 8 MiB in total). The audit runs off the request path and never changes a decision, status or body; the stdio server writes at most one record per process and never blocks on it. Admins are told 7 days and 1 day before a key expires, and a notice counts only once it was delivered. An expiry change, disable or delete closes the key’s open notices in the same transaction, and each notice is re-checked (key id, expiry, row version, and the sweep’s own claim token) right before it is sent, so a stale date is never announced; a notice is recorded as delivered only by a compare-and-set on the same claim and key row.
A key issued for a client ID is always external and carries only the externally grantable scopes. Its client ID is never an AI employee or a reserved system name. An AI employee’s own internal key (agent_id, never admin) is behind the Personal-employee gate, is created by the employee’s id (its directory name, exact case — a display name is refused) and is bound to that employee at creation. On the http-server, whose default agent is one fixed employee for every caller, the rule is default deny: only the gateway’s own internal key may call the tools that operate on that default agent — working state, mail, wiki, canvas, messaging, Odoo and the rest of DEFAULT_AGENT_HANDLER_TOOLS ∪ PROCESS_AGENT_TOOLS. Every other non-external key is refused (and not shown) those tools, decided from how the key was authenticated, and every remaining tool runs as the key’s bound employee, never as the server’s. A non-external key with no binding, or whose bound employee no longer exists (removed, renamed or deleted), is refused every tool over HTTP and is marked Employee no longer exists on the keys page. So one employee’s key cannot reach another employee’s data (see MCP tools).
config.toml no longer grants keys. The gateway’s gateway-internal key stays there, but only the fingerprint the gateway recorded in mcp_keys.db when it provisioned or rotated that key is accepted. On the first start after the upgrade the gateway issues itself a new internal key and records only that one (every employee’s .mcp.json is rewritten with it in the same start); every gateway-internal entry already in config.toml, whatever its date, is ignored and reported by hint. A legacy entry dated more than a few minutes in the future is never accepted, selected or migrated. At its first v1.82 start the gateway records the existing [mcp_keys] fingerprints as pending, moves them into the store (each removed from config.toml only after the store holds it and its audit record is written), then writes a completion marker. After that, an entry added to config.toml is ignored and reported. The only time config.toml alone authenticates is while mcp_keys.db does not exist (no v1.82 gateway has run on the home yet). See Dashboard settings.
What the store does not protect against: someone who can read mcp_keys.db learns key names, client ids, scopes and fingerprints (not usable as keys). Someone who can write mcp_keys.db, or delete it before the gateway next starts and then write config.toml, can grant themselves access. The store is opened only as an owner-only, single-link regular file in a home that group/others cannot write, and it is the gateway’s own authority, like users.db. Someone who can read config.toml can still read the gateway-internal key there.
Remote MCP OAuth grants (v1.80.0)
Section titled “Remote MCP OAuth grants (v1.80.0)”OAuth code exchange, refresh and access-token validation recheck the original internal consent key and its metadata. Removed, expired, changed or unreadable keys cannot keep a grant alive; invalid refresh and refresh replay remove the whole token family. Requested scopes never exceed the consent key or the previous refresh token. Older tokens without lineage require authorization again. RFC 7009 /oauth/revoke uses the existing public-client policy, checks client binding and invalidates the entire family, including access tokens. Dashboard grant listing and revocation are Admin-only; mutations share the same transaction lock; lists contain no credentials. Revocation does not cancel in-flight tool calls. The CLI’s ddc_refresh_* credentials remain stdio-only; HTTP and SSE reject them. See Remote MCP. Shared-store unit tests passed; CLI/gateway/browser acceptance is pending.
OAuth issuance is bounded to 2,048 access/refresh records per family (including spent refresh digests), 16,384 token records and 1,024 grants overall, with a 16 MiB store limit. At capacity, issuance fails without consuming the current refresh token; spent digests are retained until expiry so replay and rotated-token revocation still work. HTTP requests are admitted before authentication: 120 requests/minute per TCP peer IP and 60/minute per Bearer value, followed immediately by the existing per-client gate. Forwarded IP headers are not trusted; clients behind a proxy share its peer allowance. Token exchange also has a 12/minute per-client allowance. Admission tables and blocking storage workers are bounded. Access validation is read-only; admitted use updates last-use telemetry at most once per minute in a blocking worker. Grant-list configuration errors are reported as unavailable, not an empty list. Dashboard revocation audits the actor, family, application, scopes and outcome without credentials or hashes; an audit-write failure is reported even if revocation already took effect.
MCP employee identity verification
Section titled “MCP employee identity verification”DUDUCLAW_AGENT_TOKEN binds the claimed DUDUCLAW_AGENT_ID to the installation’s identity.key with HMAC-SHA256. [delegation] require_identity_token now defaults to true, including upgrades where the setting is absent. Missing or invalid tokens reject MCP startup. Unreadable configuration, invalid TOML, or a non-boolean setting also reject the identity, even when the token is valid. System and reserved queue sender names are rejected by the shared verifier, so a signed dashboard or cron cannot acquire an employee namespace or pass MCP startup.
Delegation context. Audit attribution is separate from authorization: ephemeral workers inherit the authenticated worker’s capability envelope, and team handoff and co-drive authorize the worker. A host-signed context binds version, worker, sender, origin, depth, available run/task/turn identifiers, expiry and a random nonce. System/reserved senders are not employee identities. A known system source may be the signed origin only at depth zero with sender equal to worker; channel/dashboard sources come from the host-resolved requester. Before enqueueing the first delegation, the CLI normalizes that origin to the worker so later pause and lease checks retain the employee chain root. Missing, tampered, expired or replayed contexts cannot grant delegation headroom; ordinary tools continue as the worker. Each nonce can be claimed by only one MCP process; repeated calls in that process remain valid until expiry. Restart the employee to obtain a fresh context after an MCP child restart. Claims are retained under delegation-context-claims/ with no automatic cleanup yet. The proof is passed as a secret environment value, never an argument, and third-party MCP upstreams receive neither the proof nor delegation metadata. Claude injects it into only the DuDuClaw MCP child; older Codex versions without secret environment forwarding cannot delegate. This does not isolate processes with unrestricted access to the gateway OS account or its signing key.
Soft mode requires both require_identity_token = false and [delegation] identity_token_grace_until, a quoted RFC3339 UTC deadline (Z or +00:00) strictly in the future and no more than 30 days ahead. Missing, invalid, non-UTC, expired or overlong deadlines restore strict mode and log one error per process. Verification rechecks the deadline even when the caller cached soft mode. Unix also requires the opened file to belong to the effective UID and have exactly one hard link. macOS rejects every extended ACL entry using the opened descriptor; ACL query failures reject the file (ENOENT means no ACL). Other Unix extended ACLs are not checked. Once a home’s grace is observed expired or invalid, strict mode stays latched for that home for the rest of the process; moving the clock back or editing the deadline cannot reopen it. This latch is not persisted across process restarts.
Employee file guard identity and the upgrade transition. Claude Code runs the agent-file-guard hook with the Claude CLI’s own environment. Every employee Claude spawn (channel replies, dispatch, cron, heartbeat, goal loop, team roles) clears that environment to the allowlist and then adds the employee’s own DUDUCLAW_AGENT_ID and a hook-only proof, DUDUCLAW_HOOK_TOKEN = hex(HMAC-SHA256(identity.key, "agent-file-guard\0" + agent id)), minted for the directory whose hook settings the spawn loads (a team role member gets its own scaffold’s identity). Like DUDUCLAW_AGENT_TOKEN it is bound to the agent id only (there is no incarnation or token version); rotating identity.key invalidates both. The Claude CLI environment never carries DUDUCLAW_AGENT_TOKEN: an inherited one is removed. The hook takes the claimed id from its installed --agent and verifies the hook token for exactly that id against --home; there is no token argument. The hook is the only verifier that accepts a hook token. The MCP server identity check, the remote bridge, delegation contexts and the gateway’s internal routes verify HMAC(identity.key, agent id) and refuse a hook token (agent ids cannot contain NUL, so the two message spaces never overlap). The DuDuClaw MCP server still receives the full token from its own entry in the spawn’s frozen MCP config. Since v1.82.0 each third-party server wrapped by duduclaw mcp-proxy receives the same token, from the same host definition, in its entry of that per-spawn config only (an owner-only temp file deleted when the CLI exits; the employee’s <agent_dir>/.mcp.json is never written). The proxy needs it to sign its gateway requests (egress ledger, third-party tool gate) and to read the employee’s encrypted MCP credentials; it removes the token, the hook token and the turn/run identifiers from the wrapped server’s environment before starting it. Turn and run identifiers reach the proxy through the CLI environment, like the built-in server. Without a token source (no identity.key) nothing is added and the gate treats the turn’s data as unknown, as before. In v1.81.x the proxy got no token on the Claude path, so third-party tools needed confirmation on every call under ask and servers with stored credentials could not start. So an employee’s Bash command that reads its environment gets a credential that only satisfies its own file guard. For runtimes that still export the full identity token, the hook also accepts a valid DUDUCLAW_AGENT_TOKEN as the stronger proof. Grok installs DuDuClaw’s guard hooks as project hooks, so its spawn also receives the hook token; its existing DUDUCLAW_AGENT_ID / DUDUCLAW_AGENT_TOKEN export, which its MCP child may depend on, is unchanged. Codex runs no file-guard hook and is unchanged. A missing token, or one minted for another employee, is refused in strict mode, and writes into another employee’s folder stay refused. Until v1.80.x no proof reached the hook, so strict mode refused every employee’s writes to its own folder.
Upgrading never weakens strict mode automatically: no boot step writes config.toml. On each boot the gateway records, once, when this release first started on this home in identity-transition.json (the first start time, and whether a gateway had already created identity.key or its initialization marker). This record lives in the DuDuClaw home, a location employees cannot write. The file guard refuses it for every caller on the Write/Edit lane (an identity surface, like identity.key) and on the Bash lane (the basename rule and the home-state rule). It only drives a notice, so deleting or corrupting it at worst shows the notice again. For 30 days after that first start on an existing install, the dashboard shows administrators “Identity verification is now strict” and the identity refusals of the last 24 hours. If any refusals were recorded, an Admin can turn on a manual grace in one click. The dashboard first explains that the grace turns identity verification off for AI employees, so one employee could act as another, and when it ends. The system.identity_grace_start RPC requires the Admin role (re-checked against the user database), the caller’s own current password in the same request for the session’s credential epoch (plus an authenticator or recovery code when the Admin has two-step verification on; without it the refusal is MFA_CODE_REQUIRED), and the login rate limit. It writes require_identity_token = false and an identity_token_grace_until at most 30 days ahead (the existing bounded mechanism) through the locked, comment-preserving config writer. The audit event identity_token_grace_manual_enabled is written first, with the actor, deadline and refusal count; if that write fails, the setting is not changed. An Admin can end the grace at any time with system.identity_grace_end, which needs no step-up because it is the safe direction and is audited as identity_token_grace_ended. That call sets require_identity_token = true and removes the deadline. If this gateway process already latched strict mode after an earlier expired grace, hooks and MCP servers use the new grace immediately, and the gateway itself uses it after a restart. Each strict-mode identity refusal by the hook is recorded as hook_untrusted_caller_blocked in security_audit.jsonl, with the claimed id (at most 64 characters), the tool name (at most 32) and the UTC minute. Only one row is written per claimed id and minute: a matching row in the last 256 KB of the log suppresses the write, and two hook processes racing in the same minute may each write one. The 24-hour count reads only the last 8 MB of the log and is cached for a minute. system.status.identity_token reports the effective mode, any grace deadline and days left, the notice window and the refusal count. It is Admin-only: the RPC strips it for other roles, and the system.status_changed push removes it for non-admin and lock-screen connections. A gateway starting in strict mode because the setting is absent logs that it is the default.
Native remote MCP bridge. mcp-remote-bridge always requires a verified DUDUCLAW_AGENT_ID / DUDUCLAW_AGENT_TOKEN pair matching --agent, even during the soft-mode grace period. It verifies before reading the remote store, for each input frame, after refresh-lock waits, and immediately before HTTP dispatch. Missing or forged tokens and another employee’s valid identity are refused. The host supplies the signed pair in the effective per-spawn bridge entry, including when no proxy is otherwise needed; raw third-party entries cannot supply host identity. Restart existing employee processes after upgrading to regenerate their effective configuration.
In native Linux protected mode the grace never applies: every identity is strict. There, an employee label without a confirmed employee record gets no token and its claims are refused; a temporary sub-agent (eph-…) gets a v2 token tied to the employee that created it, so removing or restoring that employee also ends its sub-agents’ tokens.
Only an explicit require_identity_token = false with a valid grace deadline enables legacy soft mode; the gateway warns on every boot. With a usable key, that mode accepts unsigned or invalid employee claims and therefore permits impersonation. An absent key disables verification only when no initialization marker exists. Gateway startup records identity.key.initialized for both existing and newly created keys. Once recorded, a missing key rejects identities in both modes and is never regenerated. A malformed, unreadable, non-regular or unsafe key is always rejected; failure to initialize the key stops gateway startup.
Key creation uses a cross-process lock, an unpredictable exclusive temporary file, restrictive permissions at creation, a flushed file and atomic publication without overwriting the destination. Unix requires mode 0600, rejects final-component symlinks and flushes the parent directory. Windows opens the final component with FILE_FLAG_OPEN_REPARSE_POINT and checks the opened handle’s file type, reparse attributes, owner and DACL; access grants may name only the current owner, SYSTEM or Administrators. Legacy Windows keys with broader inherited ACLs must be repaired before startup; they are not silently rewritten.
Upgrade and recovery: retain the original 32-byte key and its initialization marker in backups. Restart the gateway to re-issue employee MCP configurations, then restart older employee processes. A new installation without an explicit setting is strict immediately; an upgraded one gets the one-time 30-day transition described above. If a short transition is needed otherwise, explicitly set false with a valid grace deadline, complete the restart, then restore true or remove the setting. Restore a lost/damaged key and its permissions instead of deleting the marker. The marker is flushed before a new key is published: interruption in that interval intentionally requires operator recovery. For a confirmed never-used fresh installation only, an operator may remove the orphaned marker and retry; never do this to recover an established installation.
The marker and lock are protected by the identity-file hook. This is not OS-account isolation: a process with unrestricted access as the gateway account can still change both files, read the key or mint tokens. Windows reparse/ACL tests have been cross-compiled but not run natively in this repair round.
Remote MCP protocol and OAuth boundaries
Section titled “Remote MCP protocol and OAuth boundaries”The dual-generation MCP client keeps existing tool filters and third-party effect
classification. Invalid x-mcp-header schemas are excluded. Initial discovery may
select a supported legacy revision; after connection, the bridge refuses -32022
and invalidates the connection without replaying the operation. Restarting the
conversation must negotiate, list tools and apply the gates again. The API client
also terminates tools/call on -32022 and refuses all further requests on that
client until its host creates a new connection, lists tools and applies the gates
again. Initial handshake and standalone list recovery remain available. HTTP+SSE
fallback confines the announced endpoint to the authenticated origin. Each new
API HTTP connection performs independent discovery with no global URL-only version
cache; the bridge retains only its own connection’s negotiation state.
OAuth callback issuer validation precedes code exchange and error display. CIMD uses an administrator-configured public HTTPS document with an exact client ID and allowed callback URI; a selected but invalid document is refused. Discovered and stored OAuth resources must exactly match the MCP endpoint’s canonical resource, including its path, with no query or fragment. Another path on the same origin is refused; mismatched saved credentials require reconnection. PKCE, encrypted per-server credentials and outbound URL screening remain in force.
The API client’s MRTR inputs require host-declared capabilities and never grant
automatic consent. The bridge declares no modern interactive capabilities and
refuses all input_required results, including state-only results, and downstream
requests containing requestState or inputResponses. Bridge MRTR remains disabled
until complete continuation payloads can pass egress and approval checks bound to
the original approved call generation. See MCP client protocol versions.
Company template management (v1.80.0)
Section titled “Company template management (v1.80.0)”Administrators can browse employee and team templates in either edition. Details and the mandatory review step show the full raw SOUL.md, CONTRACT.toml and every SKILL.md, including each team member. Text is displayed literally rather than rendered as HTML. Review all retained text for secrets and personal data before checking the confirmation box. Correct unsafe free text in the source employee first; company-template editing only narrows tools and skill selection.
Copy/export uses templates.copy with preview: true without saving a template. Confirmation must include reviewed: true and the returned review_digest; the server recaptures the source and refuses changed content. templates.save and templates.apply also require the literal boolean reviewed: true; company templates additionally require the reviewed revision. Each employee creation in a team rechecks the revision. If it changes or cannot be validated, application stops with template_changed and the already-created employee ids; those employees are kept and the remaining members are not created.
Copies retain projected effective preset configuration and reviewed personality, contract and skill instruction text. They do not read memory/history, .mcp.json, channel configuration or arbitrary custom skill assets. Account-pool restrictions cause refusal. Runtime credential/environment fields and nonportable sections are omitted; credential keys in retained policy sections are refused. The entire [fork] table is dropped, db_sources and recipients are emptied, git_credentials is disabled, and employee recipient_guard is forced to ask. Heartbeat and autonomous evolution start disabled. Recognized credential shapes in retained text are masked by the existing diagnostic redactor, which can retain the first/last four characters. Unknown tokens, short passwords, personal data and recipient identifiers embedded in free text are not reliably removed. This is mandatory human review, not a secret/PII removal guarantee.
Every raw SOUL, contract and skill document is scanned before saving, and the actual documents are scanned again before employee writes. The existing hidden-content and input-injection scanners reject findings; short HTML comments and single invisible/zero-width characters are rejected too. Scan failure refuses the operation with the filename. No flagged content is copied. A detection rule can also reject instructional examples; revise the source rather than bypassing scanning. Unix reads use O_NOFOLLOW and metadata from the opened descriptor, including the hard-link and size checks. This does not pin ancestor directories against same-OS-user replacement.
All five library RPCs (templates.catalog/get/copy/save/apply) require a current Admin. Company templates live under <home>/company_templates/, with atomic saves, one revision per team, and audit records without document contents. Built-ins are read-only; premium copies retain their license requirement. A team copy includes its leader and descendants (up to 50), preserving internal reporting relationships. Edits may remove skills/members, reduce explicit tool allowlists or add denials, never widen permissions; removing a leader requires removing their descendants. Disabled skills remain disabled. Custom scripts are excluded; pristine bundled office skills restore their bundled assets. Company copies exclude pack knowledge extras and evaluation suites.
License binding and refresh
Section titled “License binding and refresh”MAC-derived identities have three strengths. Hardware is a globally-administered unicast MAC. Instance is a Linux/Windows locally-administered unicast MAC that is not a known shared placeholder, including GCP, AWS and Docker NICs; status reports “cloud/container identity”. Both validate existing paid bindings and may be used for new activations and approved rebinds. Primary MAC selection prefers Hardware, then Instance. Weak includes absent or all-zero MACs, shared 02:00:00:00:00:00 and Npcap/KM-TEST 02:00:4C:4F:4F:50, broadcast FF:FF:FF:FF:FF:FF, multicast MACs and placeholder UUIDs. A matching Weak candidate leaves the installation at OpenSource until an approved rebind and is never proposed as a new binding. Linux and Windows retain the exact hostname + MAC hash used by older builds, including historical Instance candidates (legacy = true when not primary). These identifiers can be copied by an OS administrator; Instance describes local identity evidence, not hardware attestation. macOS historical locally-administered MACs remain Weak whether its UUID is readable or unavailable. Windows primary selection also excludes loopback, software virtual and tunnel adapter types and known loopback descriptions. macOS UUID v2 fingerprints and the UUID-failure guard are unchanged.
control_url remains outside the license signature for format compatibility and is only an untrusted endpoint hint. Before every Gateway/CLI refresh, rebind, status, CRL, distributor-brand or distributor-notice request, the shared transport requires HTTPS on port 443, no userinfo/query/fragment, and an exact hostname in the pinned allowlist (api.duduclaw.dudustudio.monster). A custom issuer requires the explicit local environment setting DUDUCLAW_CONTROL_URL=https://issuer.example.com; embedding a custom URL in a license does not authorize it. This setting permits only that origin and never relaxes HTTPS, port, IP-literal, localhost or DNS checks. Every resolved address must be public; the connection is pinned to those checked addresses. Redirects and proxy discovery are disabled. Failed validation sends no license request. Owner-gateway refresh reads the ledger and signs the license and v2 envelope inside one SQLite BEGIN IMMEDIATE transaction: a revoke committed first returns revoked, while a competing revoke waits until signing commits. Network delivery after that commit is outside the transaction guarantee.
Refresh validates the original subscription, original/proposed binding, nonce, signed license and deployment mode before applying a response. Active, revoked and pending responses require exactly signature version 2; the signed envelope covers status, reason, effective time, nonce, subscription, both bindings and the complete license digest, including control_url. Missing or legacy versions fail closed, and a revocation with a future effective time is refused. Gateway and CLI writers share a cross-process advisory lock and compare the complete license-file and revocation-marker digests after network I/O; Gateway also checks its memory revision. Unique temporary files and fsync protect persistence. Direct writes that ignore the advisory lock remain outside this boundary. See the issuer contract and limits. Live control-plane deployment/approval/signing, Windows native persistence and customer migration remain separately unverified.
Extension and third-party tool boundaries (since v1.80.0)
Section titled “Extension and third-party tool boundaries (since v1.80.0)”Core RPC methods always run through the core dispatcher. Extensions must declare their RPC methods under ext.<extension-id>.<method>; a conflicting, duplicate or invalid registration disables the extension RPC registration and logs a warning. Undeclared methods never reach the extension.
Extension HTTP routes must be explicitly declared under /ext/<extension-id>/…. Literal paths only are accepted; routes cannot capture core paths. Authentication, origin checks and a hard 2 MiB request-body limit run outside the extension handler. All routes require authentication and a declared minimum role; ExtensionRoute::new defaults to Admin. The core checks the live database role, including demotions after JWT issuance. Public mode has been removed. The old opaque extra_routes() router is refused at startup: extension authors must migrate before upgrading.
Managed third-party MCP tools pass through ThirdPartyGate, including [[mcp.external]] stdio and HTTP mounts. Tool annotations may raise the default Modify effect to Delete; read-only claims never lower it. Existing name restrictions and approval gates apply to both discovery and calls. Direct URL/type entries in an employee’s .mcp.json are refused instead of being handed to the runtime unguarded; use a managed remote MCP connection. This does not isolate native extension code or standalone operator CLI runs.
Managed Claude spawns use only a temporary, strict MCP configuration, even when it contains only built-in tools. Managed Grok spawns refuse unmanaged project MCP entries and global MCP definitions under the actual HOME or GROK_HOME; unreadable configurations also refuse the spawn. The effective Grok configuration root must be absolute; correct a relative HOME or GROK_HOME before retrying. Existing files are preserved: move the server definitions into the employee MCP configuration before retrying. Standalone CLI runs and native tools remain outside this boundary.
These changes do not add a universal feature-family switch. Odoo Live Chat polling, voice HTTP endpoints, channel audio, meeting jobs and operator commands keep their own guards. See the entry-point inventory for code references, migration requirements and validation limits.
Machine access and the person directing it
Section titled “Machine access and the person directing it”Giving an AI employee Bash or machine tools lets anyone bound to that employee direct those tools. Bind it only to people who should have that authority. Admin-granted native tools remain available to ordinary AI employees.
An employee using the system-operator preset is reserved for Admin accounts. The server identifies it from the resolved preset binding, never a client flag. Non-Admins cannot bind to it, chat with it, create tasks or goals for it, or have work dispatched to it on their behalf; agents.callable excludes it. Existing bindings are kept but refused when used. Non-Admins with an old binding or a team grant cannot read that employee’s history, tasks, memory, files, own knowledge collections or exports, or receive its live updates, run steps or approval cards; binding records are retained. Assignment schedules previously created by non-Admins no longer create tasks or goals for that employee; firing pauses them automatically, and resume is refused. Outbound approval cards (for both CLI built-in tools and MCP tools) are visible only to Admins; Managers no longer see redacted cards. Channels and the Mini App show only a plain notice, without outbound approval cards, summaries or action buttons. Admin access and authorized unattended work are unchanged. Personal has a single-owner exemption only when users.db is absent, empty, or contains exactly one active Admin account that has completed the first password change; suspended and offboarded accounts count too. Multi-account deployments still require a valid administrator even after a paid license lapses to Personal, as do deployments with an unreadable account store.
The person behind a run has three states: Human, Background and Unknown. A stored principal that cannot be parsed is Unknown and cannot authorize machine tools. An absent principal on an old row remains Background, preserving existing cron and autonomous work.
MCP cron schedules, agent-callback reminders and TaskSpec plans retain the host-carried on_behalf_of in their stored record and restore it when firing, including subsequent delegations. Non-Admin accounts can schedule ordinary employees; Main-role and configured-default targets are refused at creation and checked again at execution. A cron that fails this check is paused; a callback reminder fails. Old records with no principal remain background work. Discovery retains its signed-agent/operator access and existing approval flow; its MCP creation checks the protected target, but its independent runner does not yet restore a human principal.
Distributor branding checks license expiry and offline grace whenever the effective brand is read. An expired license or exceeded offline grace shows the original DuDuClaw brand, even if control-plane polls keep failing and the gateway has not restarted.
Employee health metadata (v1.80.0)
Section titled “Employee health metadata (v1.80.0)”The read-only agents.health RPC requires Manager or Admin and rechecks the live identity. Non-Admins see only directly bound AI employees; team grants do not widen this aggregate. Responses contain health counts and status metadata, never conversation bodies or raw provider errors. Health reminders go only to active employee owners and administrators through verified linked channel identities. A missing configuration file or omitted section uses conservative defaults (five failures or six hours). Other read errors or invalid settings disable reminders. These product checks do not change the existing boundary: an employee with unrestricted file access under the same OS user can still access local state directly.
Office parser limits and remaining trust boundary
Section titled “Office parser limits and remaining trust boundary”office_script runs only manifest-verified embedded Python wrappers. Immediately before each spawn (including the system-Python fallback), it reopens the execution root, workspace, disposable cache, trusted base and legacy opt-out cache without following symlinks, requires gateway-uid ownership and mode 0700, and rechecks the script’s single-link regular-file type, owner, 0500 mode, length and SHA-256. The verified file descriptor stays open through spawn, but uv/Python still reopen a pathname: this narrows the race without eliminating it.
All direct PEP 723 dependencies have exact versions. uv ignores project/config/env files, uses the fixed 2026-03-01T00:00:00Z package-upload cutoff, refuses source builds and automatic Python downloads, and uses bounded installer concurrency. For isolated runs, a host-only warm step invokes the verified wrapper with fixed --help in a separate temporary directory containing no user files; only this dependency step may use the network. Its shared trusted base is <home>/.office-execution/uv-base-v1/, with a marker bound to the wrapper digest and cutoff. The old parser-writable uv-cache/ and its markers are never promoted into this base. A cross-process lock serializes warm and snapshot creation. The sandbox receives the base read-only and uses UV_CACHE_DIR=<private-workspace>/uv-cache with UV_LINK_MODE=copy and UV_OFFLINE=1. Regular files are copied to new inodes; internal cache symlinks are rebased into the disposable copy, external links/special files are refused, and path-specific environments-v* are omitted so uv recreates the environment offline. No sandbox-writable cache persists across runs or agents. Workspace, output staging and cache are removed when the prepared run is dropped after publication or failure/cancellation. Cleanup restores directory permissions through the retained workspace descriptor without following symlinks, including parser-created mode-000 directories; filesystem/traversal failures emit office_workspace_cleanup_failed and require operator cleanup. Warm failure prevents document execution; a missing/evicted dependency fails offline without retrying the document online. To rewarm an evicted base, an operator can remove the affected office-warm-* marker from uv-base-v1/ before the next run. Explicit unsandboxed fallback retains the legacy uv-cache/, first-run downloads and successful-run offline markers; it never populates the trusted base. When uv is absent, isolated system Python checks every direct dependency’s installed version before running the wrapper; a mismatch or missing dependency fails.
Dependency limitation: no complete hash lock is bundled. Lock generation was blocked by unavailable package-index DNS and missing local metadata. Transitive versions and artifact hashes remain unresolved at build time; the cutoff limits candidates but does not authenticate package contents or freeze the dependency graph. System Python, its transitive/site packages, uv, LibreOffice and mutable cached packages are not covered by the wrapper manifest. Neither the warm marker nor exact direct pins establish their integrity.
office_script now refuses execution unless filesystem isolation, network denial and a memory bound are available. It reuses config.toml [container.sandbox] script_when_unavailable = "run_unsandboxed", the existing script-sandbox escape hatch (default fail). A missing/unreadable/malformed config or any other value is fail-closed. The task sandbox’s when_unavailable and employee sandbox_enabled = false do not opt office scripts out. An explicit opt-out only applies when isolation is unavailable; that fallback emits one office_script_unsandboxed warning per host process. It retains the environment, private staging, pipe/process cleanup and applicable resource limits, but does not promise filesystem, network or memory isolation. The tool probes before executing the document and never retries a started document unsandboxed.
On Linux, bubblewrap (bwrap) is required: an empty mount namespace exposes system/runtime paths read-only, only the disposable cwd/output/cache directory read-write, the shared base read-only, and the input snapshot/wrapper read-only. Network and PID namespaces are mandatory (--unshare-all --unshare-net); --die-with-parent cleans up the sandbox tree. Before building Linux mounts or the macOS profile, the runner canonicalizes DuDuClaw home, the private workspace/output, input, wrapper, both base/run caches and each existing runtime allow-root. It rejects equality or ancestor overlap in either direction between any private path and a runtime root (including its alias and canonical target), so custom homes such as /usr/local/share/duduclaw or /opt/homebrew/var/duduclaw cannot become implicitly readable through a runtime grant. The base must also be disjoint from the writable workspace, and the run cache must be strictly inside that workspace. Canonicalization errors also fail closed. No host-root or whole-home grant is made; only the private staging/cache and selected runtime binary are explicitly exposed. These preflight failures use the same explicit unsandboxed opt-out and warning described above. RLIMIT_AS must install a 2 GiB hard limit. A missing bwrap, denied namespace/mount setup or failed memory limit refuses the run unless the operator opted out. Namespace isolation alone without the filesystem boundary is insufficient. See the bubblewrap option reference.
On macOS, /usr/bin/sandbox-exec receives a generated deny-by-default profile with explicit deny network*. Read access is limited to system/runtime paths, the selected runtime binary, private cwd (including the input snapshot and disposable cache) and read-only base; writes are confined to the disposable cwd/output/cache, excluding the wrapper and input. Paths use escaped SBPL strings, with control characters/non-UTF8/non-normal absolute paths refused. The profile is passed directly as an argument, not reopened from a file. The child attempts 2 GiB RLIMIT_DATA, then RLIMIT_RSS if DATA cannot be installed or is ineffective. The verified resource is retained for the actual launch; a new installation failure refuses spawn without switching resources. Since Darwin DATA/RSS semantics are not an aggregate memory quota, a separate Python probe lowers the installed bound to 32 MiB and requires a 64 MiB allocation to be refused. Merely accepting a limit value is insufficient. If neither limit can be installed, or the allocation succeeds despite the limit, memory isolation is unavailable and the default is refusal. This can make default office execution unavailable on modern Darwin. Do not describe this as a verified aggregate memory cap.
The Unix child still gets its own process group, CPU 120 seconds, individual file size 256 MiB, processes 512, descriptors 256, and core dumps disabled; lower existing limits are preserved and non-memory limit failures always refuse spawn. Limits are reinstalled on the actual launch, inherited by Python/LibreOffice, and are per process/file, not aggregate cgroup quotas. RLIMIT_NPROC counts the real uid’s processes and privileged processes may be exempt. Each stdout/stderr pipe has a concurrent hard 32 KiB byte cap. Overflow, read/wait failure, the 180-second deadline and task cancellation terminate the process group; leader exit also triggers cleanup. Failed runs do not publish output.
Remaining boundaries: unrestricted same-UID host processes can still race pathname reopening or alter the shared uv cache. The transitive-dependency/hash-lock residual above remains; only embedded wrapper bytes are manifest-verified. macOS descendants deliberately creating a new session can escape process-group cleanup (sandbox restrictions are inherited). Separate UID/container isolation and verified read-only dependency artifacts would be needed to claim those stronger boundaries. Native positive sandbox acceptance is separate from decision/profile tests: this development environment rejected sandbox-exec with sandbox_apply: Operation not permitted and rejected DATA/RSS installation, so only its fail-closed path was available. Native Linux isolation, successful macOS sandbox execution, real LibreOffice compatibility and gateway/CLI integration still need separate acceptance. The clean real-uv warm/copy/offline acceptance test is also unverified here because PyPI DNS resolution failed; fake-uv and filesystem regression tests do not establish package-index or native-sandbox acceptance.
A note on history
Section titled “A note on history”Until 2026-09 this page described a three-phase shell-script defense: a deterministic blacklist, an obfuscation/exfiltration scanner, and a Haiku AI judgment layer, all living in .claude/hooks/ and orchestrated by a GREEN/YELLOW/RED threat-level state machine.
Those scripts were deleted in commit ba015a48 when .claude/ was taken out of the public repository, and .claude/ is gitignored today. Nothing in the shipped binary reads them. There is no threat-level state machine.
What is actually in the product is smaller and easier to reason about: two PreToolUse hooks — both Rust subcommands — that the gateway installs into every agent directory, one input scanner on the message path, and one field-level freeze over the files that decide who may command whom.
Guard 1 — agent-file-guard (PreToolUse, Rust)
Section titled “Guard 1 — agent-file-guard (PreToolUse, Rust)”duduclaw hook agent-file-guard is a real subcommand rather than a shell script, so it behaves identically on macOS, Linux and Windows. The gateway registers it in <agent_dir>/.claude/settings.json with the matcher Write|Edit|MultiEdit|NotebookEdit|Bash and re-registers it on every boot (agent_hook_installer), merging into whatever else the operator has configured instead of clobbering it.
Grok employees get the same two guards from a different file. Grok spawns turn off Grok’s Claude-compat hook scanning (so the OS user’s own ~/.claude/settings.json hooks never run in an employee’s turn), which also stops Grok reading <agent_dir>/.claude/settings.json. Before every Grok spawn the gateway therefore writes the agent-file-guard and data-file-guard entries, unchanged, to <cwd>/.grok/hooks/duduclaw-guards-<agent>.json, Grok’s project hook directory; Grok maps the Claude tool names in the matcher to its own tools and sends the hook the Claude tool_name / tool_input keys. There is one file per employee, so employees sharing a borrowed working root (team members) never overwrite each other’s identity; each loads every file there and a deny from any of them wins. A spawn with an employee directory whose file cannot be written is refused. In the employee’s own directory .grok/ is a frozen runtime-config directory, so the employee cannot edit it; a borrowed working root outside that directory is not frozen, so an employee with write access there could add its own hook file.
The installed command carries the agent id (--agent) and, since the release after v1.68.1, the DuDuClaw home (--home "<path>"). The installer writes --home for every agent directory of the form <home>/agents/<id> (or <home>/agents/.ephemeral/<id>) and quotes a path that contains shell-special characters. The Claude CLI’s environment does not include DUDUCLAW_HOME, so before this the hook fell back to $HOME/.duduclaw and, on a deployment with a non-default home, judged every path of the real home as “outside home”. Existing installs are rewritten in place at the next spawn or gateway start.
The hook takes its home from, in order: --home (absolute only); for a caller with no employee identity (no --agent in the hook command and no DUDUCLAW_AGENT_ID in the environment), the default home, as before; an explicitly set, absolute DUDUCLAW_HOME in the hook’s environment. The home is not inferred from the working directory. When none of these gives a home, every Write / Edit / MultiEdit / NotebookEdit / Bash call by that employee is refused instead of being judged against a guessed location. NotebookEdit joined the matcher at the same time; its notebook_path is judged like a Write target. The hook subcommand answers on stderr only and no longer writes a log file.
It exits 2 — which Claude Code reads as “block this tool call” — when:
-
an agent writes an agent-structure file (
agent.toml,SOUL.md,CLAUDE.md,.mcp.json, …) outside the canonical<home>/agents/<name>/tree. Scaffolding a new agent has to go through thecreate_agentMCP tool, which carries the delegation-authorization gate; -
an agent writes its own
SOUL.md, even in the right place. Personality is operator-managed. The hook has no opt-in: an agent explicitly opted in withagent.toml [permissions] can_modify_own_soul = truechanges its ownSOUL.mdthrough theagent_update_soulMCP tool, never by writing the file; -
an agent writes its own
CONTRACT.toml, even in the right place (decisionBlockedOwnContractWrite). The contract is the operator’s boundary on the agent, so there is no opt-in flag at all; the block message tells the agent to ask the operator, who changes it from the dashboard (contract.update, the employee’s Owner or an admin with the strict check, which does not pass through this hook); -
an agent touches another agent’s files at all;
-
an agent writes anywhere else under the DuDuClaw home. For an employee-identified caller (or one whose claimed identity fails verification) the only writable places under the home are its own agent directory and the shared
attachments/directory. This is an allow-list, so it covers the audit log (tool_calls.jsonl, which the grounding check, the judge digest and the recent-actions feed read),evals/including held-out sets and other employees’ suites, every SQLite store, breaker state, licence and org files, globalskills/and the shared wiki, and any store added later starts out protected. Their legitimate writers are the gateway and the gated MCP tools, which do not pass through this hook. Only a caller with no employee identity, meaning the hook command carries no--agentand the environment has noDUDUCLAW_AGENT_ID, is unaffected. The installed hook command always carries--agentand the hook prefers it, so an operator who runsclaudeby hand inside an employee’s directory is judged as that employee (and, where identity tokens are required, as an unverified caller). An operator changes these files from the dashboard or with an ordinary editor; -
the write target is a symbolic link that leads somewhere the rules above refuse. Write/Edit paths are judged twice, as written and at their real location (links and any
..after a link followed; a dangling link is always refused); a block from either wins. A relative path is resolved against the working directory in the hook input or, when the input has none, against the employee’s own directory. A path whose real location cannot be worked out is refused with the message “cannot determine where this write actually lands” (無法確認這次寫入實際會落在哪裡); -
an agent writes, moves or deletes anything under
agents/_trash/, where removed employees are kept (Bash by heuristic); -
an agent runs
duduclaw agent create <name>from Bash for a name that is reserved because a removed employee had it (see Delegation isolation); the refusal is audited asagent_name_reservedwithpath_kindcli_bash_agent_create. -
an agent writes its own
INSTRUCTIONS.md(decisionBlockedOwnInstructionsWrite). The file holds operating instructions an operator imported from another platform (agent-config import) and is loaded into every prompt, so like the contract it has no opt-in flag. It is also an agent-structure file, so the location guard andoffice_scripttreat it likeSOUL.md.
For Bash, the own-SOUL.md, own-CONTRACT.toml and own-INSTRUCTIONS.md rules are a heuristic: a write-shaped command that names the file, as agents/<self>/… or as a relative spelling such as CONTRACT.toml or ./CONTRACT.toml, is blocked. A caller whose identity fails verification is refused for a write-shaped command naming anywhere under agents/, the same as on the Write/Edit lane.
Bash and the home allow-list. The Bash lane judges the command text against the same allow-list. A “protected home target” below means anything under the home outside the caller’s own directory and attachments/, another employee’s directory, or the removed-employee area; for a caller whose identity fails verification, its own directory as well.
- The command is first read the way bash reads it: line continuations, backslash escapes and quotes are undone before any rule looks at it. Sending output or errors to
/dev/null(2>/dev/null,>/dev/null) and duplicating one descriptor onto another (2>&1) are not writes; redirecting output and errors together into a file is. - Commands on a short list of known read-only commands (listing, reading, searching, comparing and the like) are not checked on their arguments; their output redirects still are. A command that has an option able to write its output to a file or to run another command is kept off that list, or stops counting as read-only when such an option is used. An employee reading a file under the home with a command outside the list is refused; use a listed command or the matching MCP tool instead.
- Copy-shaped commands (copy, install, download, archive extraction) are judged on their destination only, so copying a home file into the caller’s own directory passes.
- Commands that change what their arguments name (move, delete, link, permission, ownership or timestamp changes, sync, database command-line tools, …) and interpreters and shells are refused when any argument, including inline program text, is a protected home target. An output redirect to a protected home target is refused for every command.
- Any other command, including one behind a prefix option the scan cannot follow, is refused when any of its arguments is a protected home target, whether or not the command writes anything. The known read-only list is the only way for an unlisted command to touch a protected home path.
- Database files under the home outside the agent directories and
attachments/(*.dband its-wal/-shm/ journal files,*.sqlite*) are refused wherever they appear in the command, even for reading. A database inside an employee’s directory orattachments/is not covered by this rule; another employee’s directory is still protected against writes. - Relative paths resolve against the working directory in the hook input (or the employee’s own directory when there is none), and
cd/pushdinside the command are followed. When the working directory cannot be worked out and the command names a protected home location anywhere, relative paths in judged positions are refused; when it names none, they are not judged. - Existing symbolic links in a judged path are followed and the real location is judged too; a judged path that cannot be resolved, a dangling link included, is always refused.
This is a speed bump, not containment. Real isolation is not giving the agent Bash; the limits are listed under “What these guards do not cover”.
Live forking (fork_run) respects the same files from the other side: branches can read the agent’s structure files, but promoting a branch back into the agent directory never copies SOUL.md, CONTRACT.toml, agent.toml, .mcp.json, .claude/ or the other agent-structure files over the parent’s copies.
Guard 2 — data-file-guard (PreToolUse, Rust, RFC-23 §14.4)
Section titled “Guard 2 — data-file-guard (PreToolUse, Rust, RFC-23 §14.4)”Guard 1 protects DuDuClaw’s own structure files. This one protects the customer’s data.
Read and Bash are built-in Claude Code tools, so cat customers.csv never passes the MCP redaction choke point that file_read / csv_read / xlsx_read go through. The installer registers duduclaw hook data-file-guard for the matcher Read|Bash; the decision logic lives in duduclaw_core::data_file_guard, shared by the CLI subcommand and the gateway’s installer tests. Same contract as Guard 1: exit 0 allows, exit 2 plus stderr blocks, and the stderr is shown to the model.
It stays inert unless the gateway sets DUDUCLAW_DATA_FILE_GUARD at spawn time, which it does only when redaction is actually active for that agent. A deployment with redaction off behaves exactly as it did before the guard existed.
Earlier versions used a POSIX shell script at <agent_dir>/.claude/hooks/data-file-guard.sh, and it was inert on a Windows host with no bash on PATH — the hook command failed, and Claude Code reads a non-2 exit (including “command not found”) as allow, so the guard went missing exactly where nobody would notice. The installer now deletes any leftover script on upgrade, so a stale copy cannot be mistaken for the live guard.
Stated limitation. The Bash check matches filenames. A command that builds its path dynamically (python -c "open(chr(99)+…)") walks straight past it. The real protection is the MCP tool surface; this guard lowers the odds of the model taking the ungated route. It is a heuristic, not a sandbox.
Guard 3 — input_guard (prompt-injection scanner, Rust library)
Section titled “Guard 3 — input_guard (prompt-injection scanner, Rust library)”duduclaw_security::input_guard::scan_input scores text 0–100 across eleven rule categories and blocks at or above DEFAULT_BLOCK_THRESHOLD (60):
| Rule | Weight | Instant block |
|---|---|---|
instruction_override |
40 | yes |
role_hijack |
35 | yes |
tool_abuse |
30 | yes |
data_exfiltration |
25 | yes |
system_prompt_extraction |
30 | no |
encoding_bypass |
25 | no |
termination_manipulation |
30 | no |
authority_escalation |
35 per signal, two different signals add up | no |
memory_poisoning |
30 per signal, two different signals add up | no |
role_provenance |
35 per frame, two different frames add up | no |
action_binding |
30 | no |
Besides these eleven categories, a message with more than three zero-width characters adds 20 points as unicode_injection; that signal never blocks on its own.
Patterns cover English and Chinese (Traditional and Simplified). Text is NFKC-normalized first (unicode_normalizer), so homograph and invisible-character tricks cannot slip past a pattern.
Chinese coverage (v1.67.1). Released versions matched Chinese instruction override only as four exact strings, so inserting a word such as 所有, 之前 or 的 got past it; in a live test four such sentences were stored through user_profile_record. Since v1.67.1:
instruction_override: an override verb (忽略/無視/忘記/忘掉/不要理會/不用理會/別管, and Simplified forms) followed, inside the same clause and within 12 characters, by an instruction noun (指示/指令/規則/提示詞/系統提示) with a scope word between them (先前/之前/以上/上面/上述/前面/所有/全部/一切/你的/原本/原來). Whitespace is ignored;。!?;and line breaks end a clause. Same weight and immediate block as the English phrases.system_prompt_extraction: an extraction noun (系統提示詞/系統提示語/你的系統提示/你的指示/你的設定) and an output verb (輸出/顯示/告訴我/給我看/洩漏/列出/重複) within 12 characters of each other, either order. Scored like the English rule: weight 30, not a block on its own. Bare 系統提示 is not an extraction noun, because it also means “system notice”.role_hijack: fixed phrases such as 你現在是管理員模式 / 開發者模式 / 越獄模式, 你現在不受限制, 進入越獄模式 and the bare word 越獄模式. Same as English.- Thresholds and the English lists are unchanged.
Known false positives. The rule matches by shape, so ordinary sentences with an override verb, a scope word and an instruction noun in one short clause are blocked too, for example 「請忽略之前寄的指示,以新版為準」, 「請忽略以上規則中的第三條,已經取消」 and 「忘記之前的規則了,可以再說一次嗎」 (pinned by the test known_benign_shapes_that_do_match). Any mention of 越獄模式 also blocks. The workaround is to say the same thing without the override verb, for example 「之前的指示作廢,以新版為準」; the close sentence 「之前的報價單請作廢,以新的指示為準」 is in the test list of text that must not match. The scanner is a phrase heuristic, not a classifier, and has not been measured against real conversation data.
termination_manipulation (LoopTrap, arXiv:2605.05846) is deliberately not an instant block: weight 30 sits below the threshold, so a single match warns and audits rather than blocking, which keeps ordinary “please continue” requests working.
Sentence-shape families (v1.68.0). The red-team ledger found four agent-specific techniques that scored zero. Each now has an English and a Traditional Chinese set of anchored regexes:
authority_escalation: asking the employee to act with its own authority instead of the user’s (“use your own service account / admin role”, “not my permissions”, “the system trusts you more than me”; 用你自己的服務帳號/管理員身分, 不要用我的權限, 系統比較信任你).memory_poisoning: asking it to store a standing entitlement (“remember this permanently”, “as a fact about me”, “I am always allowed to”; 永久記住, 記在你的記憶裡, 以後每次對話都照辦, 我一律有權限). Plain 「請記住…」, “remember to…” and “remember my name” do not match.role_provenance: a fake system, tool or operator frame inside a user message:[SYSTEM],<tool_result>tags,approval=granted, “policy update from the platform operator”, “restriction lifted for this session”, a note addressed to the AI inside quoted text and the instruction to hide it (平台營運方政策更新, 本次對話已解除…限制, 給 AI 助理的附註, 不要提到這段附註). Frame tokens match only as whole tags, so “our system sends a tool result” does not match; an opening and a closing tag count as one frame.action_binding: reusing one approval for a different action (“use that same approval to…”, “use the approval from step 1”; 用同一個核准, 用第一步的核准去…). 「既然已經核准預算,請安排會議」 does not match.
Weight policy: one signal warns and audits (30–35, below 60). A message is blocked when it carries two different signals of the same family, or one signal plus an existing rule such as instruction_override or system_prompt_extraction. Stacking applies to authority_escalation (“use your service account” plus “the system trusts you more” = 70), memory_poisoning (“remember this permanently” plus “I am always allowed to” = 60) and role_provenance ([SYSTEM] plus approval=granted = 70). action_binding does not stack with itself and blocks only with another rule. Two hits of the same signal count once: a single [SYSTEM], or one <tool_result>…</tool_result> pair, stays at 35. Known cost: an ordinary-looking sentence that happens to carry two signals is blocked too, for example “please use your admin account, not my permissions, to fix the shared folder” (pinned by the test known_benign_shapes_blocked_by_stacking). Say it with one signal, or ask an administrator to do it. Callers that drop text on any match (distillation, profile writes) now also drop text that contains one of these shapes. Positive and look-alike phrasings for each family are pinned by tests in input_guard.rs.
Code-call tokens for verified members (v1.84.0). In tool_abuse, the tokens exec(, eval( and system( no longer block on their own when the sender is a signed-in dashboard user in their own WebChat conversation, or a verified-bound channel member in a one-to-one chat: a conversation whose id is the sender’s own id (for example a LINE private chat), or a Google Chat direct message that the Chat adapter attested as one-to-one for this turn from Google’s space type. In that case the rule still adds its 30 points and is audited, so it blocks together with any other rule that reaches the threshold (for example eval(x) plus a request to show the instructions scores 60). Everything else is unchanged for everyone: the destructive commands in tool_abuse (rm -rf, sudo rm, delete all files, format disk, drop table) and the other instant categories still block at once. Website visitors (WebChat widget, Odoo Live Chat), group chats and threads, unbound or unidentified senders, and every caller other than the inbound chat check (MCP arguments, distillation, profile writes, imports, mail, reminders) stay on the strict rules. Teams, Feishu and Discord server channels are not treated as one-to-one here, because their conversation ids are not the sender’s id; Google Chat counts only with that attestation. The relaxation only stops these tokens from blocking by themselves; it does not make code in a message safe to run.
Where matching is applied:
- Inbound chat messages (
channel_reply,scan_input_with_audit_inwith the sender’s trust level): a blocked message is not passed to the AI. Since v1.84.0 the sender gets a notice in the employee’s fixed-message language (zh-TW by default, zh-CN, en or ja-JP) saying the message was not passed to the AI and naming the kind of content in plain words, without the score or rule names; website visitors get one generic sentence asking them to rephrase. On a brand-new WebChat or AG-UI conversation the notice is shown instead of “reply not delivered” and nothing is written to the conversation history (the audit record is still written); the same applies to the other fixed early replies (failsafe stop or restriction, circuit breaker, kill switch, budget stop, redaction failure). These notices still pass contract enforcement and channel sanitising. Theprompt_injectionaudit record now carriessession_id,turn_id,channelandrelaxed_rulesnext to the score and rules. It never contains the message text and has no separate user field; the session id is recorded, and for a one-to-one chat the session id contains the sender’s id. - MCP tool calls (
mcp_dispatch,scan_input_with_auditover the serialized arguments): a call whose arguments quote a blocked sentence is refused and audited. - Conversation-fact, profile and knowledge-routing distillation (
wiki_ingest,profile_distill,knowledge_route): content is dropped on any rule match, including the non-blocking extraction rule. user_profile_record: the predicate and the value are scanned; a block-level hit is refused.duduclaw migrate fromimports skip blocked items; expert-pack installation refuses a blocked pack.- Agent Mail: an inbound mail that matches is stored but flagged, and a flagged mail never triggers the agent.
- Reminders: a reminder whose prompt is blocked does not run.
Guard 4 — org_field_guard (organizational authority freeze)
Section titled “Guard 4 — org_field_guard (organizational authority freeze)”The A2A delegation predicate (delegation_policy::can_delegate) decides who may command whom by reading [agent] reports_to / department / name from agent.toml, plus [delegation] and [acp] from config.toml. Both are plain files, so an agent holding Edit could rewrite its own reports_to to point at a victim and then claim the “subordinate → ancestor” rule. The judged party owned the evidence.
org_field_guard runs inside the same agent-file-guard hook and compares the reconstructed post-write content field by field against what is on disk. A change to a protected field or section is denied. The [capabilities] table is frozen as a whole table rather than as a key list, so a capability key added in a later release is protected the day it lands instead of the day someone remembers to extend a list.
The employee’s own security settings. For an employee-identified (or unverifiable) caller the rest of its own agent.toml is frozen by allow-list: only the editable sections may change, and any other section, including one added in a later release, is protected by default. The editable sections are [agent], [model], [prompt], [heartbeat], [proactive], [research], [goal_intent], [memory], [skills], [sticker], [cultural_context], [preset] and [planner]. Inside them, [agent] role, [prompt] cli_bare_mode (it makes the Claude CLI skip hooks) and [model] account_pool stay frozen, as do the org fields [agent] reports_to / department / name; [capabilities] is frozen as a whole. The allow-list applies to every caller with an employee identity, which includes an operator running claude by hand inside an employee’s directory (see Guard 1); the older org-field and [capabilities] rows apply to every caller, as before. An operator changes these sections from the dashboard or with an ordinary editor.
The employee’s own .mcp.json and CLI configuration. An employee-identified (or unverifiable) caller may not write any .mcp.json in its directory, at any depth (Write, Edit, MultiEdit, NotebookEdit; the Bash rule already refused the top-level one). The gateway starts the Claude CLI with that file, and the CLI starts every server it lists, so a single added entry whose command is an interpreter would run arbitrary commands as the operator’s OS user at the next spawn, without any Bash grant. This affected every released version: employees used to be allowed to add “unrelated” servers. New MCP servers now come from the dashboard, an approved MCP install request filed in the dashboard (mcp.install_request, installed after an Admin approves), an expert pack, or the operator editing the file; none of these runs through the hook. The same caller may not write the CLI configuration of its directory either: anything under a .claude/ directory (settings, hooks, slash commands, subagents, skills) or named .claude.json, at any depth, and the Codex, Grok configuration directories at the top (.codex/, .gemini/, .grok/, .agents/) and .cursor/ (Grok loads .cursor/mcp.json from its working directory, 2026-10-20). Names are compared case-insensitively. Behaviour change: a project cloned inside an employee directory is a place the CLI starts too, so the employee can read that project’s .claude/ but not write it. An operator keeps the older rules (only the identity keys of .mcp.json are frozen). Before every spawn that hands an employee’s .mcp.json to the Claude CLI (channel reply, dispatch, heartbeat proactive check, live duduclaw eval, and a live fork’s parent directory before its branches are copied) and at start-up the gateway also regenerates the DuDuClaw entry whole (command, arguments, environment), keeps other entries as they are, and refuses the spawn with an audit event (mcp_config_unverified) when the file cannot be confirmed (not a regular file, unreadable, invalid JSON, or the duduclaw binary path is not absolute). That refusal is about the file, not the account: it does not put the account on cooldown, no other account is tried, and a channel reply does not fall back to a local model or the Direct API; the person sees a sentence naming the employee whose settings could not be confirmed. The lock all .mcp.json writers share lives under <home>/locks/, not in the employee directory, so a file or directory the employee creates there cannot block it. Entries added before the upgrade are kept: duduclaw doctor lists every entry DuDuClaw did not write (its name and the file name of its command, never arguments, environment or URL) so the operator can confirm or remove each one. Promoting a live-fork branch into an employee directory never brings back .claude.json, .agents/, .codex/, .gemini/, .grok/, .cursor/, or a .claude/, .claude.json or .mcp.json at any depth. Limits: this is a hook, so an employee with unrestricted Bash can still change the file; the Codex control-file lock described below is separate from this hook. Grok, other CLI runtimes and Windows are not covered by that lock. Not verified with the real CLI: whether Claude Code reads a .claude.json from the employee directory (frozen anyway).
Fail-closed by construction: unparseable new content, unparseable existing content, and an unreconstructable write intent all deny. An existing agent.toml, config.toml or .mcp.json that cannot be read is denied too (it used to be treated as a new file). A file that does not exist yet is allowed, because creation goes through create_agent and its own gate.
Legitimate changes keep every route they had: the MCP agent_update tool and the dashboard agents.update RPC, neither of which passes through the hook.
Codex employee control files (Unix, WorkspaceWrite). Normal employee runs use the duduclaw-employee permission profile in addition to the existing sandbox mode. The employee directory’s top-level agent.toml, SOUL.md, CONTRACT.toml, INSTRUCTIONS.md, .mcp.json, .codex/, .grok/, .claude/ and .agents/ are read-only, including paths that do not exist yet. Absolute paths keep these exclusions tied to the employee even when the working root is overridden. MEMORY.md, CLAUDE.md, ordinary workspace files and temporary files remain writable. Codex CLI 0.164.0 or newer is required; older or unprobeable versions and a missing employee directory refuse the spawn. The version probe is cached per binary path. The dashboard shows Admins a one-click update banner for older or unprobeable Codex versions; updating through it clears the support cache and re-probes, so no gateway restart is needed. A shadowing old binary is reported with its path instead of success. Settings can still be changed through agent_update and the dashboard. ReadOnly, explicitly granted FullAccess, explore and utility paths keep their existing arguments. This control-file lock does not cover Grok, other CLI runtimes or Windows (unverified); other CLI runtimes have no OS sandbox unless native_sandbox is enabled. The permission profile was verified live on macOS with Codex CLI 0.164.0; native Linux acceptance remains unverified. In Docker the profile needs the current compose files, which apply a narrowed seccomp profile, apparmor=unconfined, no-new-privileges and cap_drop: ALL; Ubuntu 24.04 also needs an AppArmor profile loaded on the host. If the sandbox can’t start, shell commands fail and nothing is written; DuDuClaw never lowers the sandbox to work around it, and duduclaw doctor reports the cause. See docker.md. Because the container itself is relaxed for bubblewrap, in Docker the gateway adds a seccomp filter to every other child (Claude, Grok, other CLIs, MCP servers, configured commands). It restores Docker’s namespace limits and blocks ptrace, and the gateway turns itself non-dumpable so same-uid processes cannot reach its memory. Codex is exempt only where bubblewrap runs. Known limit: a Codex sandbox payload can still create a nested user namespace, and Codex has no option to stop that. Use VM isolation for multi-tenant deployments.
Forget by source needs an Admin approval
Section titled “Forget by source needs an Admin approval”duduclaw memory forget-source deletes memories for good, so it has three layers in front of it. The procedure is in Forgetting a conversation, a scheduled run or an imported file; the mechanism is in Memory Intelligence.
Dashboard approval. plan files one approval request (action_kind memory_forget_source) bound to the plan id and the plan hash. It can only be decided in the dashboard and only by an Admin; channel buttons and replies are refused. apply --confirm runs only when that request is approved, still names the same plan hash, and the plan has not expired. The request expires together with the plan (30 minutes by default, at most 24 hours). The card carries counts and source labels, never memory content, and says in fixed text that the request came from a local command line and that nothing proves who typed it. No setting turns this approval off. [memory] forget_source = false only stops new plans and applies.
Bash lane rule. For an employee-identified or unverified caller, the Bash lane of agent-file-guard refuses duduclaw and duduclaw-pro (also by path or as .exe) followed by memory forget-source or memory migrate-namespace, with any subcommand, including the read-only list. The decision is BlockedOperatorMemoryCommand and the message tells the employee to ask the operator. migrate-namespace was not covered by the Bash lane before. This is a speed bump, not a sandbox. It does not catch:
- a global option between
memoryand the subcommand, for exampleduduclaw memory --redact on forget-source …; - a binary named through command substitution, for example
"$(command -v duduclaw)" memory forget-source …; - the words handed to the binary through a pipe, for example
echo memory forget-source … | xargs duduclaw; - other spellings that avoid matching on the command name, and the evasions listed under “What these guards do not cover”.
AI session check. The command itself refuses to run when any variable that the gateway sets on a spawned employee process is present, even empty: the employee identity and token, the turn and session ids, the user-message pair of the turn, the dispatch session and run ids, the delegation sender, origin and depth, the hop depth and the reply channel, the MCP API key, the data-file-guard flag and the goal-round task id (the one list ai_session_guard::AI_SESSION_ENV_VARS, shared since 2026-10-06 by every operator command that files an approval). An operator’s own terminal carries none of them. This check is only a first line. It is not reliable for a command run directly from an employee’s Bash, because an employee with Bash can unset variables. Real isolation is not granting Bash, or running the employee in the task sandbox. An employee that runs as the same operating-system user, can execute arbitrary commands and deliberately evades the file guard can still rewrite the local databases (approvals.db, memory.db) directly.
Operator employee controls
Section titled “Operator employee controls”duduclaw agent pause|resume|freeze|unfreeze <agent> refuses whenever any shared AI-session marker is present, even empty. The agent-file-guard Bash lane also blocks these four subcommands for employees and unverified callers (BlockedOperatorCommand), using the shared operator-command matcher for duduclaw / duduclaw-pro, absolute paths, .exe, env / npx prefixes, joined quotes and line continuations. An operator can still run them directly in their own terminal; these commands do not require dashboard approval. pause / resume change [agent] status; freeze / unfreeze change evolution and heartbeat. Each edit uses the same locked, format-preserving atomic writer as agent_update and the dashboard, with file history and agent_file_changed audit records. Successful actions also record agent_pause, agent_resume, agent_freeze or agent_unfreeze; refusals record agent_cli_refused. This is a speed bump: unset variables, renamed binaries or commands assembled at runtime can bypass these checks, non-Claude runtimes do not run the hook, and unrestricted Bash can still edit files directly. Real isolation is not granting Bash, or running the employee in the task sandbox.
Operator command-line approvals share one gate
Section titled “Operator command-line approvals share one gate”Four operator commands change state from a terminal: duduclaw channel-ingress (LINE inbox), duduclaw responsibility (continuous responsibilities), duduclaw memory forget-source apply and duduclaw computer-workspaces. A terminal cannot prove who typed a command, so all four only file a dashboard request that a current Admin decides, and the command then applies once. Since the release after v1.70.0 they share one implementation (approval/operator_cli_gate.rs in the gateway crate) with one registry of kinds: an approval counts only when decided in the dashboard, for the same request and, except for a LINE batch, the same state; a waiting request whose target changed state is withdrawn (state_changed) and a new one filed, never rewritten in place; a used approval is consumed by one conditional update, and a run that loses that race acts on nothing and files nothing; at most 3 different requests wait per action and target and 20 per kind; at most 2 first notifications per target per hour (per AI employee for forget requests). approvals.decide refuses every one of these kinds for anyone but a current Admin through one check. The commands also share one list of AI-session environment variables (ai_session_guard.rs in the CLI crate). Limits are unchanged: an employee with unrestricted Bash can still edit the local databases.
Upgrading. The gate stores its binding in a gate object inside the request payload. Requests filed by v1.70.0 or earlier have no such object, so the new version never matches or counts them. A request filed before the upgrade, even one already approved and not yet applied, is not applied after it: running the command again files a new request that must be approved again. The old waiting card still receives its usual reminder pushes until it expires (responsibility requests send none), but approving it does nothing.
Action rules, explore lane and action review
Section titled “Action rules, explore lane and action review”Added 2026-10 (v1.72.0). Three layers that only ever narrow what an employee may do; none of them removes an approval or a denial that another gate imposes.
Effect classes. Every DuDuClaw MCP tool has one side-effect class (duduclaw_core::tool_effect::effect_of_builtin): read, draft, send, publish, purchase, delete, modify or admin. read and draft leave nothing behind outside the reply; the other six are side-effecting. A tool whose effect depends on its arguments carries the stricter class (wiki_write is modify for both scopes). mail_send only files a draft a person must approve, but it is send, because sending is what it leads to; gmail_create_draft never sends and is draft. A tool name the table does not know is treated as admin (fail closed), and a test walks every advertised tool so a new one cannot ship unclassified. The built-in tool catalog (tools.catalog) carries the class as effect.
Action rules. agent.toml [capabilities] action_rules sets allow, ask or block per class or per tool:
[capabilities]action_rules = [ { effect = "send", verdict = "ask" }, { tool = "mail_send", verdict = "block" },]A tool rule (same anchored matcher as the other [capabilities] tool lists, so mcp__duduclaw__mail_send and wiki_* work) beats an effect rule; among rules of the same kind the strictest verdict wins. block refuses the call at the MCP dispatch gate next to denied_tools (JSON-RPC -32003, audit error_class action_rule) and hides the tool from tools/list; ask joins the static “always ask” set of the approval gate, so the ApprovalBroker flow runs as it does for approval_required_tools. allow only means “no friction from this layer”: it never lifts denied_tools, an approval list, a capability switch or a scope. The nine computer_* tools and the three computer_workspace_* tools apply the same resolution in the gateway’s computer-use route, which owns their session. The key sits in [capabilities] on purpose: org_field_guard freezes that table against the employee’s own writes. A malformed list or entry (unknown verdict or class, both or neither of effect / tool, an extra key, a non-list value) does not fail the file: it is kept as written and makes every side-effecting call at least ask, while valid block rules still block. An agent.toml that exists but cannot be read or is not valid TOML is treated the same way. The dashboard edits the list on the employee page (rules by kind of action, plus exceptions for single tools) through the admin-only agents.update capabilities path, which validates every entry and audits the change as agent_authority_changed.
Claude Code built-in tools (2026-10-08 close-out). action_rules also reach the Claude CLI’s own tools at spawn. They are classed by exact name (duduclaw_core::effect_of_cli_builtin): Read, Glob, Grep, WebFetch, WebSearch are read; TodoWrite is draft; Write, Edit, MultiEdit, NotebookEdit are modify; Bash, Task, Agent and any other name are admin. A built-in call never passes through the ApprovalBroker, so a rule that says ask for a built-in cannot be honoured and is applied as block (fail closed): the tool is added to --disallowedTools and removed from --tools through CapabilitiesConfig::disallowed_tools(), which every Claude CLI spawn that honours denied_tools already reads (dispatch, cron, goal and heartbeat wake-ups in claude_runner, channel replies in channel_reply/cli_env.rs, the heartbeat proactive check, eval runs and team role members). A malformed rule list therefore keeps every side-effecting built-in away (Write, Edit, Bash, …) while the read tools stay. Behaviour change: an operator who wrote { effect = "modify", verdict = "ask" } for MCP tools now also loses Write / Edit in the Claude CLI.
Removed tool names. A tool rule written for a name removed in v1.69.0 (shared_wiki_write, schedule_task, skill_bank_search, …) keeps gating the call that replaced it (wiki_write with scope = "shared", tasks_create with a cron schedule, skill_search with source = "bank"), at the dispatch block gate and in the approval gate’s ask set, like denied_tools (ActionRules::resolve_for_call, tool_catalog::removed_name_for_call). Only tool rules follow a removed name, and the result is only ever stricter.
Explore lane. An MCP server started with DUDUCLAW_LANE=explore lists and runs only read and draft tools; any other call is refused with -32003 and audit error_class explore_lane. The variable present with any other value, empty included, refuses every call. The gateway sets it on the heartbeat proactive check, whose Claude CLI spawn also gets only the Read, Glob, Grep, WebFetch and WebSearch built-in tools (minus the employee’s own denied_tools). The notification a check decides to send is still delivered by the heartbeat from the reply. The variable reaches the MCP child through the CLI’s inherited environment; the .mcp.json entry does not set it. The proactive check only runs on the Claude CLI, so no other runtime is involved. Since 2026-10-08 two kinds of dispatched work use the lane too: runs started by an MCP Events delivery, unless the subscription was opted into normal mode, and rounds of a responsibility whose contract has lane = "explore". Both set one flag (duduclaw-gateway/src/explore_lane.rs) with the same rules: only Claude CLI, Codex and OpenAI-compatible employees run such work (Codex with -s read-only and approval_policy=never whatever its capability level, the DuDuClaw server registered with the lane variable; Codex rejects every MCP call in that mode); another runtime (Grok and generic CLI) or the task sandbox is refused before the run starts, and a MoA model or local-only inference is refused. Delegations written by a process in the lane (spawn_agent, spawn_ephemeral, send_to_agent) carry lane on their bus_queue.jsonl entry or message_queue row, which the dispatcher honours like the event lane; the lane already refuses those tools, so this is a second line. DUDUCLAW_LANE is in the AI-session variable list that operator-only commands refuse.
Restricted utility execution. Claude utility calls use the available CLI credentials without account rotation; normal chat retains rotation. Claude disables tools and OpenAI-compatible APIs use one completion without tools. Codex utility calls use --sandbox read-only, --ignore-user-config (auth still uses CODEX_HOME), --ephemeral, --ignore-rules (execpolicy .rules only), --skip-git-repo-check, and -c approval_policy=never. They do not inject DuDuClaw MCP overrides and run in a fresh owner-only empty temporary directory, removed after success, error or timeout. The system prompt is passed inside the prompt, never written to AGENTS.md. Only the spawn-env allowlist and required Codex authentication reach the process; employee tokens do not. Opted-in native OS sandboxing also uses the temporary directory with read-only permissions. Explicit Codex judge and verifier hints use this same profile. Grok and generic CLI employees fall back to the supported global utility profile; unsupported global providers and explicit hints are refused.
Utility and other internal runtime consumers reject partial timeout output, so an early PASS cannot become a judge result. Only channel replies may display completed partial text. Claude utility spawns use the shared environment allowlist and existing Anthropic credential lookup; other vendor keys and DuDuClaw agent/MCP tokens are not inherited. Windows managed CLI cleanup uses a Job Object assigned before the suspended child resumes, retaining ownership after the leader exits. Windows native execution behavior is not guaranteed.
Residual Codex risk. This profile does not prove that every built-in tool is absent. Built-in read-capable tools may remain, so prompt-injected utility input could cause Codex to read local files accessible to the OS user and echo their contents in its output. Codex source defines network access as disabled for tool commands under the read-only policy; provider model requests are separate. Native OS enforcement is not guaranteed. --ignore-user-config skips user config and the empty working directory avoids employee project config, and the external configuration gate refuses detected native MCP sources or unreadable/unparseable layers. Sources: tool registry, read-only network policy, system config loader.
Action review. config.toml [action_review] mode = "off" | "shadow" | "enforce", default off, read on every call (system.update_config accepts action_review.mode and audits a change as a protected key). It applies only when every static gate resolved the call to auto-run and the tool is side-effecting. The reviewer is the utility model through the closed-choice decide() helper (duduclaw-gateway/src/decide.rs): the reply must be exactly {"choice":"allow"|"ask"|"block"} under the strict JSON contract, anything else counts as no verdict. Its input is structured only: the tool name, its class, the argument keys (keys that do not look like identifiers are only counted), the closed ActionGuard finding tokens and the employee’s CONTRACT.toml must_not lines. Argument values never enter the prompt. shadow never changes the outcome and appends a tool_calls.jsonl row with action_review set to the verdict or unavailable. enforce refuses on block and asks a person through the ApprovalBroker on ask or when no verdict came back. An unknown mode value, or a config.toml that exists but cannot be read or parsed, is read as enforce. Since the 2026-10-08 close-out the review also runs for the OS action tools (after the situation classifier lets a call run), for skill_hub_install (in front of its own post-scan install approval) and, in the gateway’s computer-use route, for the computer_* and computer_workspace_* tools that no approval list sends to a person; everything else is the same (structured input only, shadow records, enforce refuses on block and asks a person otherwise). A dispatcher test drives enforce end to end with a fixed reviewer answer (block, ask then approve, ask then deny, no verdict) against the real in-process approval store.
Third-party MCP tools (2026-10-08). Tools of the employee’s other MCP servers are classified where DuDuClaw sits in their path: duduclaw mcp-proxy (servers started from .mcp.json) and duduclaw mcp-remote-bridge (remote servers), both through the same third-party tool gate in the gateway. Classification defaults to modify; destructiveHint: true raises it to delete. Upstream readOnlyHint never lowers risk, even when the server is in the legacy trusted_read_hint_servers list (now ignored for classification). No host-owned read exception is implemented; third-party tools are unavailable in Explore. action_rules apply as for DuDuClaw’s own tools (a tool rule names <server>.<tool>, mcp__<server>__<tool> or <server>.*): block hides the tool from the listing the employee sees and answers a call with -32003 before it reaches the server (audit third_party_tool_refused); ask holds the call for an ApprovalBroker decision and refuses when the store is unavailable, the request fails, or it is denied or expires (audit third_party_tool_approval). In the explore lane only read tools are listed and callable. Every managed runtime routes stdio .mcp.json servers through the proxy, independently of redaction or action_rules; managed remote connections use the bridge. Direct url / type entries are refused. [[mcp.external]] stdio and HTTP mounts use the same gate through the in-process registry, preserving annotations and checking discovery and execution. Utility and explore-lane calls do not mount [[mcp.external]] servers. The dashboard (mcp.tool_effects) shows the last listing per server with the class and verdict recomputed from the current settings. Guide: MCP ecosystem, section 4.
Coverage boundaries. Other MCP servers are classified only through the proxy and the bridge (above). Built-in rules apply only where a Claude CLI is spawned with DuDuClaw’s tool flags; other runtimes have no Claude Code built-ins. Classification is per tool name, so an argument-dependent tool always gets its stricter class.
Single-use approvals for employee actions (ActionGrant)
Section titled “Single-use approvals for employee actions (ActionGrant)”Added 2026-10-08 (v1.72.0). Before this change every tool call that needed a person’s approval already filed its own request and waited for that request’s decision, so an approval could not be reused by a later call. What was missing was a binding: the card did not show the arguments, and nothing tied the decision to the call that ran. Now, for a call whose tool is in the send or purchase class (for example mail_send, odoo_sale_confirm) or that reached human approval because an action_rules rule said ask, the request carries payload.action_grant (duduclaw-gateway/src/approval/action_grant.rs):
- employee, tool, effect class, a SHA-256 digest of employee + tool + canonical arguments (object keys sorted), and a summary of up to eight
key = valuelines built from identifier-shaped argument keys and scalar values. Secret-looking keys and values are masked with the same helperstool_calls.jsonluses, strings are cut at 60 characters, nested values are shown only as counts. The card text and the inbox detail panel (“What this approval covers”) show it. - On approval the stored binding must match the call about to run (same employee, tool and digest); the approval is then consumed once (
approved → invalidated, reasonconsumed:action_grant:<uuid>) before the call proceeds. A mismatch, a lost claim or a second use is a denial.
Since the 2026-10-08 close-out three more human-approval paths are bound the same way, always (not only for send / purchase): the PolicyKernel ask decision at the MCP dispatch gate, the OS action tools’ situation gate (anomaly / sensitive, or an action-review ask), and the approval lists of the computer_* / computer_workspace_* tools in the gateway’s computer-use route. For the computer tools the binding is over a gateway-built snapshot of the operation (typed text and URLs as hashes, so the ordinary operation card shows a character count or the validated host; a separate outgoing-data guard approval is Admin-only and shows the complete arguments, including typed text), and the gateway re-runs the tool gates after consuming the approval. The computer-use high-risk confirmation in the chat was already single-use and bound (an ExecutionBinding over the action hash, the screenshot hash, the policy revision and the decision context, claimed once with claim_operation / begin_execution and re-checked against a fresh screenshot). Workflow runs keep their own binding: a step needing a person is approved only through a bound request whose payload and ExecutionBinding must equal the step’s call and whose operation is claimed under a fence, so it already covers exactly one step. Install approvals are unchanged. Not covered: the digest is computed over the arguments at the approval gate, which runs after PolicyKernel rewrites and egress secret restoration; a person with database access could edit the stored payload and card together. Unit and broker tests only.
Calling an employee by @ follows the sender’s access (v1.76)
Section titled “Calling an employee by @ follows the sender’s access (v1.76)”Before v1.76 the [agent] trigger match was an unanchored, sender-blind substring test: a WebChat account bound only to one employee could reach any other by typing its trigger, and any LINE friend could do the same. Routing now resolves the human sender first (the dashboard account in WebChat; a verified channel_identities row on messaging apps, else “unmapped”) and only matches employees that sender may call: Admins everyone; everyone the conversation’s default employee and employees with [channels] public_trigger = true (admin-only, frozen for employees); dashboard accounts and linked messaging-app senders also their bound employees. A call to anyone else is refused before any model call and written to security_audit.jsonl as trigger_route_refused, with the account or an HMAC of the platform id under a per-installation key (trigger_audit.key). A suspended account’s bindings no longer count. Any lookup failure narrows to the unmapped case. A called employee runs in its own session bucket, so history and secrets do not mix between employees; in a group chat the answer is still visible to every member. Details: Calling AI staff with @.
Recognising Google Chat senders (v1.82, RM-152)
Section titled “Recognising Google Chat senders (v1.82, RM-152)”Before v1.82 a Google Chat sender (users/<id>) could not be bound to an account at all, so every Chat sender was “unmapped”: [google] requesters = "bound_people" (the default) and owner_only refused them and @ routing treated them as strangers. Now a Chat sender maps to an account through at most two sources (decision C-152-Q1 = A; no e-mail matching):
- An administrator binding (always on) —
channel_identitiesrow with channelgooglechat, made through Users → Verify identity (POST /api/channel-identity/bind, Admin re-read fromusers.db; the target account must be Active, re-read inside the sameBEGIN IMMEDIATEtransaction, else 409). Removed withPOST /api/channel-identity/unbind(Admin only, Google Chat only, only the named user’s row). Both writegooglechat_identity_bound/googlechat_identity_unboundtosecurity_audit.jsonl. - The person’s own linked Google account (opt-in, default off:
config.toml [google] chat_identity_from_account = true, written only by an Admin throughgoogle.integration.set, audited asconfig_changed; only a missingconfig.toml,[google]table or key reads as off — an unreadable file, unparsable TOML, a non-tablegoogleor a non-boolean value is an error that fails closed: no Google Chat sender is recognised, not even through an administrator binding, and approvers count as recognisable) — the OpenIDsubkept when they connected Google under My connections (person_credentials, no new data stored) is compared with the Chat user id. Assumption, not verified against a real Google Workspace: Chatusers/{id}and the OIDCsubare the same identifier. Exact whole-id equality rules out prefix and near-miss matches, but if the two are different identifier namespaces an accidentally equal string would recognise the wrong person — which is why this source is opt-in. Keep it off unless the administrator has confirmed in their own tenant that the two ids match. While off, the linked Google account is not an identity anywhere (no dashboard chip, no admin-bind conflict, not counted as an approver identity).
The id is normalised in one place (googlechat_identity::normalize_user_id: exactly one leading users/, the rest ASCII digits, ≤ 64; e-mail aliases and users/app are refused) and compared by whole-value equality. One Chat id has at most one owner: the (channel, channel_user_id) primary key and the takeover guard refuse a second verified owner; while derivation is on, the admin bind also refuses an id another person’s own Google account stands for, and two linked accounts deriving the same id, or an admin binding and a Google account naming different people, recognise nobody. Every lookup failure (unreadable users.db or linked-account store) means unmapped. The account must be active (re-read on every turn); a suspended account’s linked record is ignored, disconnecting Google ends the derived identity on the next turn (Google Chat lookups bypass the few-second sender cache), and records of deleted accounts are ignored.
Every channel-side sender → account read goes through the one resolver (googlechat_identity::verified_user_id): decision presses (decision_notify::mapped_role, bound decisions), install sign-off (install_notify::apply_decision), digest feedback, takeover display names, decider attribution on collapsed cards, @ routing and the requester map. None reads channel_identities directly, so a conflict can never fall back to the administrator binding.
Whether a deployment “has a recognisable approver” (which disables the solo-operator “pressed from the delivered destination” fallback of authorize_press) is decision_notify::has_recognisable_approver_identity: true when any Active Admin/Manager has a verified channel_identities row on any channel, or (only while derivation is on) a usable Google-derived identity; conflicts and every read error count as true. It is not derived from the notification destination list.
A Google Chat identity is for recognition only: duduclaw_auth::otp::is_dm_destination_channel excludes googlechat, and every proactive delivery list (decision and install cards, digests, maintenance / health / folder-access / scheduled-assignment / workflow notices, personal-connection notices, recipient allowlists) uses UserDb::verified_dm_destinations_for_user, because Chat messages are addressed to a spaces/…, never to users/….
Trust boundary: a Chat sender id is only used after the event was authenticated — the shared HTTP app and an employee’s own HTTP app verify Google’s signed request token (RS256, issuer chat@system.gserviceaccount.com, audience = the project number) before dispatch and require message.sender.type == "HUMAN" (anything else is acknowledged and dropped before it is queued or mapped), and the Pub/Sub worker never uses the notification payload but re-reads the message from the Chat API with the app’s own credentials and requires a HUMAN users/… sender. Google Chat is bindable but is not an OTP channel: login codes and two-factor enrollment codes are only sent to Telegram, LINE, Discord or Slack (BINDABLE_CHANNELS vs OTP_DELIVERY_CHANNELS in duduclaw-auth). Other channels’ lookups are unchanged.
Dashboard permissions are read live on every call (v1.76)
Section titled “Dashboard permissions are read live on every call (v1.76)”Before v1.76 a dashboard WebSocket kept the role and agent bindings it read at handshake, and an access token lives 30 minutes, so removing a binding, demoting someone or suspending an account reached an open connection only after the next login. Now the RPC dispatch chokepoint rebuilds the caller’s context from users.db on every call; the token only proves who the caller is. Role, direct bindings, the forced-password-change flag and the reporting-line grants below all come from the database. Every write that changes any of them (binding, unbinding, role or password change, status change, manager change, channel identity, email change, offboarding) bumps a counter (auth_meta.acl_generation) in the same transaction, and the per-call cache is keyed by that counter, so a cached answer is never older than the last such write. A missing or non-active account is refused with account is suspended or offboarded; when the database cannot be read the call is refused with authentication service unavailable, nothing from the token is reused, and system.doctor shows how often that happened since start-up. The database reads run on the blocking thread pool, as does the login password check, so a burst of logins does not hold up other connections’ calls. The gateway admin token (system) and lock-screen connections are unchanged.
Accounts can now have one direct manager (users.manager_user_id, Enterprise only, set through users.create / users.update). Every field of one users.create / users.update is written in one transaction, so a refused manager or demotion changes nothing else in that request. Writes refuse a cycle (manager_cycle), a chain longer than 8 people counting the one at the top (manager_too_deep) and a manager below the Manager role or not active (manager_role, manager_inactive); demoting someone who still has direct reports is refused (manager_has_reports); offboarding moves the leaver’s reports to transfer_to or to the leaver’s manager and audits each move as user.reparent; bindings moved to transfer_to keep the higher level when the recipient already had that employee. A manager is computed to reach the employees bound to the people below them at no more than Operator, but in this release nothing uses that yet: routing, agents.list and the Operator-level RPCs (memory, history, settings) still look at direct bindings only.
People editing an employee’s profile files (v1.76.0)
Section titled “People editing an employee’s profile files (v1.76.0)”The persona, self-introduction, work rules and boundaries (SOUL.md, IDENTITY.md, INSTRUCTIONS.md, CONTRACT.toml) can be edited by the employee’s Owner and by admins in the dashboard, and every such save is checked before it takes effect (owner decision D7). Who may write is re-read from users.db on every call and once more inside the file lock, so a binding removed while a check runs stops the write. Fixed rules come first (size and control characters, a strict contract parse, hidden or invisible content, injection patterns in the added lines, key-like text, a persona losing most of its text, a contract dropping a boundary). Then the deployment’s utility model reviews the diff; the edited text is wrapped in tags with a random nonce and stripped of hidden content, and the reply must match a fixed schema exactly. The model can only raise the result. A review that does not complete counts as at least a warning, never as a pass, and cannot be turned off. A non-admin facing a block can only send the change to an admin (agent_file_change, decided in the dashboard only; channels get a notice without buttons). The check runs on what the human submits; it does not replace agent-file-guard, which still keeps employees from writing these files themselves. Every write keeps a version outside the employee directory and writes agent_file_changed; refusals write agent_file_change_refused. INSTRUCTIONS.md now has its own approved fingerprint next to SOUL.md’s. The same release widens the admin-only agent.toml fields (bot tokens, [odoo], [runtime] provider / fallback, [prompt] cli_bare_mode, [os_watch], [model] account_pool, role = "main", budget loosening, and increasing the effective [runtime] timeout_secs limit); see Dashboard settings.
Who the work is for (on_behalf_of, v1.76.0)
Section titled “Who the work is for (on_behalf_of, v1.76.0)”When a person starts work (a chat turn, a /assign hand-over, a dashboard task), the gateway now carries who that person is through everything the work starts: the employee’s runtime gets DUDUCLAW_ON_BEHALF_OF (every runtime, not only Claude), send_to_agent / spawn_agent write it onto the queue row (message_queue.on_behalf_of, the bus_queue.jsonl field), the dispatcher scopes it onto the receiving run, a goal round or heartbeat wake-up copies it from the task row (tasks.on_behalf_of), tasks_create stamps it on the new task, and an approval raised during the run stores it (approvals.on_behalf_of). The value is user:<account id> for a WebChat account or a verified channel identity, or unmapped:<channel>:<digest> for a sender with no account (the same keyed HMAC the @ routing audit uses, never the raw platform id). It comes only from what the gateway wrote: the environment it sets at spawn and the rows it or the MCP server (from that environment) wrote. Tool arguments are never read. System sender names (dashboard, cron, …), reserved ids and malformed values are refused and audited as on_behalf_of_rejected; the first value set wins and no later hop overwrites it. Each runtime removes an inherited value before setting the scoped value.
What it does in this release:
- Record (default,
[delegation] human_principal = "record"): everytool_calls.jsonlrow from that run, everydelegation_deniedrow and every approval carries it, and channel approval cards show 「由 ○○ 交辦」 (the person’s display name when readable, otherwise a short account label). Nothing is refused because of it. - Enforce (
human_principal = "enforce", opt-in; an unrecognised value or an unreadableconfig.tomlalso means enforce): after the employee tree allows a delegation, the person must be allowed too.send_to_agent/spawn_agentand the dispatcher’s delegation gate need the person to be able to call the target (Admin; a direct binding or a manager’s team grant at any level; or apublic_triggeremployee);tasks_create(also for a task the employee assigns to itself),create_task, schedules, mail access and record changes need Operator or above. An unmapped sender may only reachpublic_triggeremployees and never hands over work. An unknown or inactive account, a malformed value or an unreadableusers.dbis refused (human_principal_not_permitted). Goal rounds, heartbeat wake-ups and cron retain their creation-time delegation authorization; the main/default target restriction is still checked at execution.
In enforce mode the separate MCP process asks the running gateway to check human rights. It sends a host-minted opaque reference bound to its employee and home; the gateway uses its live user directory for rights. Team grants require both a verified Enterprise license and that home’s gateway-resolved Enterprise edition; Personal or unknown in either check denies team grants. It never accepts a principal in the request body or an Enterprise environment override as proof. A genuine background call also needs an explicit host-owned None context: a missing, foreign, expired or dropped reference is refused, as is disagreement between the host record and the MCP identity stamp. Contexts expire after 24 hours or when the runtime returns, with at most 4096 live registrations. Record mode does not need the route. This context is separate from knowledge-base requesters and does not grant access to documents.
[approval] forbid_self_approval = true(default off): a request raised while an employee worked for someone cannot be approved by that same person, in the dashboard or from a channel button (denying still works). Bound requests are unchanged: they are decided only by the person they are bound to.
Computer-use start/action approvals recover the person from the host’s live turn registration, keyed by the authenticated employee and turn_id. Body parameters cannot name a person or borrow another employee’s turn. Missing or unregistered turns carry no principal, so self-approval prevention cannot identify the requester there; workspace, screenshot and stop requests without a turn also carry no principal.
The person check only narrows employee permissions. Record mode still trusts the host metadata and enforces nothing; in enforce mode, changing the principal environment value alone cannot change the person registered in the gateway context. This is not OS isolation: an employee running under the same OS account with unrestricted Bash may read process credentials or alter local databases. Schedules created through tasks_create do not carry the person onto their later runs. spawn_ephemeral and its deferred admission queue do not yet carry the principal. Grok and the deprecated Gemini CLI do not guarantee forwarding the spawn environment to their MCP child.
Supporting layers
Section titled “Supporting layers”Employee budget. [budget] daily_cap_cents and monthly_limit_cents cap recorded spend over rolling 24-hour and 30-day windows when hard_stop = true; 0 means no cap. Calls already running can exceed the cap. Checks include Claude and other employee runtimes, delegated and scheduled work, reminders, mail, heartbeat, utility work and CLI forks/evals. Spend recorded under ephemeral children is included in the parent’s budget, summed in millicents before conversion to cents. When the employee configuration can be read, [budget] when_unavailable = "allow" (the default when omitted) allows unavailable telemetry or failed cost queries with an explicit warning and audit record; "deny" refuses before the model runs. If the configuration cannot be read or parsed, the policy cannot be confirmed and the call is refused. Unknown policy values use "deny" and warn. An unavailable check has its own explanation and audit event; it does not announce a reached cap or a breaker transition. Budget refusals do not rotate accounts or trigger failover. Calls with no employee id are outside this policy. Employee-scoped utility calls use the effective [agent].name for budget checks and future cost rows, even when an operation label was supplied. Historical rows recorded only under operation labels cannot be assigned back to employees reliably.
MCP authorization gate — every MCP tool is enumerated in a scope table; a tool that is not listed defaults to requiring Admin scope. Scope, per-agent capability grants and denied_tools are each enforced at the dispatcher front door, and every refusal is audited with an error_class.
SOUL.md drift detection — soul_guard fingerprints each SOUL.md with SHA-256 at startup and on every heartbeat tick, keeps up to 10 versioned backups in .soul_history/, and reports drift alongside an Agent Stability Index.
Audit trail — tool_calls.jsonl records every tool call with masked result_text / input_text (three-pass secret masking, mask before truncate), 0600 permissions, hash-chained lines, and rotation at 16 MB. security_audit.jsonl carries security events separately. The same log is the evidence source the grounding precheck and the acceptance judge read, so weakening it weakens verification too. On macOS and Linux, security_audit.jsonl is also readable and writable only by the account running DuDuClaw (0600); existing wider permissions are tightened on the next append, while Windows continues to use NTFS ACLs.
Per-agent key isolation — MCP API keys and connector credentials are per-agent and resolved through secret_ref, so one agent’s leak is not a platform leak. Channel credentials are split: LINE, WhatsApp, Feishu, Google Chat, Teams, WeCom and DingTalk use the deployment-wide credentials in config.toml [channels]; per-employee bot tokens exist for Telegram, Discord and Slack only (an employee without its own token falls back up the reports_to chain, then to the global token).
Google Chat Pub/Sub (since v1.80.0) — Pub/Sub notifications do not authenticate a Chat sender. The gateway validates the message resource name and fetches the authoritative message with the app’s chat.bot scope before creating a turn. Only API sender, space, text, attachments and thread are used; the returned name/space must match the resource and notification space. Existing sender access, pairing and approval gates remain in force. Failed fetches (including 403/404) and events without a message create no turn. Import and startup verify that the subscription points to the canonical topic in the service account’s project. Pull uses a separate pubsub-only token. The Unix-only persistent inbox stores resource references, never message bodies, sender details or attachments. It deduplicates by event type/resource name for seven days; messages whose API creation time is older than seven days are refused even after pruning. Each app stream (employee/shared app and project number) is limited to 1,000 rows and 10 pending/queued/running entries so one stream cannot exhaust the deployment; global hard caps remain 10,000 total rows and 100 active entries, 2 KiB per reference and 64 MiB for the database. Active queued/running entries are not evicted; interrupted running entries are uncertain and do not auto-rerun. Queue overflow is acknowledged and dropped, without a turn. Private-file validation covers the database and sidecars; non-Unix Pub/Sub is refused until equivalent privacy protection exists. Pub/Sub bootstrap validates cloud resources before key creation and only prints destructive recovery commands. See setup and delivery limits. Import and worker startup reject subscriptions with exactly-once delivery enabled; keep that option disabled in Google Cloud. An invalid/expired ACK response (HTTP 400) discards only the old delivery batch and pulls again; durable deduplication records remain intact. Transient ACK failures retain the batch for retry.
Chat commands on channels (v1.68.0) — !STOP, !STOP ALL, !RESUME and /model <name> need an admin. On WhatsApp, Feishu, Teams, WeCom, Google Chat and DingTalk the gateway used to pass is_admin = true for every sender, so anyone who could message the bot could stop or resume it. Those channels now compare the sender id or conversation id, exactly, with the channel’s admin_users setting (global scope; Google Chat and Teams can now have one); with no list, nobody is an admin. On WebChat only an active dashboard account with the Admin role counts, and website widget visitors never do.
Kill-switch triggers (v1.68.0) — the four KILLSWITCH.toml [triggers] thresholds had no reader before. Now a key is enforced only when it is written in the file and in range, and the Security page has a checkbox per trigger (unticking sends null, which removes it). The file is re-read when it changes. cost_limit_usd compares 24-hour spend across all employees and, when reached, sets the global failsafe level to restricted until the failsafe recovers or someone sends !RESUME; max_replies_per_minute counts per conversation and silently drops the excess; max_consecutive_errors and error_rate_threshold (last 20 replies, at least 10) raise that conversation’s failsafe level by one step. Each trip is audited as killswitch_trigger. The [audit] section of KILLSWITCH.toml is no longer read.
Reply circuit breaker and people who write in several messages — the per-conversation breaker in front of every channel reply (KILLSWITCH.toml [circuit_breaker]) used to drop messages silently in three situations that are ordinary human behaviour: the next message after one reply far longer than the recent ones (token_explosion_multiplier, a property of our own output), three similar messages in a row such as 「在嗎?」 sent while waiting, and more than frequency_max_replies messages within frequency_window_secs. A trip also kept the conversation silent for cooldown_secs and raised its failsafe level, so repeated trips ended in the restricted reply or muting. Now a long reply is only logged; messages shorter than 20 characters never count as repetition; and a message over the frequency limit waits until the window has room and is then answered. A message still waiting after 30 s (a flood) is not answered; it still counts, and the sender is told once per minute. Three things still trip the breaker: an exact echo of our own last reply, three long near-identical messages, and the new hard limit — more than hard_max_messages (default 30) messages within hard_window_secs (default 60) in one conversation, which stops two bots trading short, varied messages. A sender the channel marks as a bot (Telegram is_bot) keeps the old strict trip on the short frequency window. The existing settings keep their names and ranges. Admins edit the two new values on the Security page’s kill-switch card (Advanced: circuit-breaker thresholds); killswitch.update now writes KILLSWITCH.toml through the shared config commit (file lock, refused when the file changed since it was read or does not parse, comments kept).
Redaction source protections (v1.68.0) — the 資料來源保護 switches on the Privacy / Redaction tab now act: user_input redacts a channel message before it reaches the AI, system_prompt redacts the assembled prompt (by default only rules marked apply_to_system_prompt), cron_context redacts the trigger message of a condition script. An error stops that turn instead of sending unredacted text. sub_agent (set on the same tab, or in config.toml [redaction.sources]) covers a delegated agent’s reply that the gateway writes into the delegating agent’s conversation history (the reply to a send_to_agent, spawn_agent or spawn_ephemeral call, including the copy relayed to the agent that started the chain). With on, the reply goes through the receiving agent’s rules before it is stored, and the tokens are restored when that agent answers its user. The default inherit leaves the reply as it is, because the sub-agent already ran under the same [redaction] rules. If the redaction step fails, a fixed notice is stored instead of the reply. Not covered: the copy of the reply sent to the user’s channel (that is the user’s own view), replies an agent fetches itself with check_responses (those are tool results and follow tool_results), hand-offs between Team-as-Agent roles, and Agent Mail. purge_after_expire_days now drives the vault cleanup.
Permission flags (v1.68.0) — agent.toml [permissions] can_create_agents, can_send_cross_agent, can_modify_own_skills and can_schedule_tasks are enforced at the MCP dispatch gate when written as false (refusal audited as permission_denied). A one-time boot migration turns old template false values into true; see dashboard-settings.md.
Rootless container engines (DuDuClaw OS v0.4.0) — from DuDuClaw OS v0.4.0 (embeds platform v1.73.4) the gateway runs as the non-root duduclaw user and its containers run on rootless Podman, reached through DOCKER_HOST / CONTAINER_HOST; v0.3.0 and earlier still run the gateway and Docker as root. Two platform pieces make that safe. Container clients that run with a cleared environment (task sandbox, Discovery attempts and scoring, cleanup) now carry exactly those two names from the gateway’s environment when they are set; they are not on the AI CLI allowlist. The script sandbox runs inside mcp-server, so the gateway also writes the two names into its own duduclaw entry of each employee’s MCP configuration. Before the task sandbox, the script sandbox, computer use or a Discovery attempt or scoring container counts as available on a rootless engine (its info says rootless), a throw-away container with a 32 MiB memory and 32-process limit reads its own memory.max and pids.max; if they read max (an engine with undelegated cgroup controllers accepts the limit and silently ignores it) or anything other than the requested limit, or the check does not finish, those features are unavailable with a reason (task sandbox code resource_limits_unenforced) instead of running without ceilings. Rootful Docker is never probed. A result is reused for ten minutes (a failed check for one) and discarded as soon as the engine comes back from being unavailable.
duduclaw-sysd callers (DuDuClaw OS v0.4.0) — DuDuClaw OS v0.4.0 points the helper at the gateway’s uid, and that uid is also the one the AI employees’ CLIs run as, so a uid check alone lets any agent open the socket and skip every approval the gateway applies. That is not only an availability risk: update_rollback boots the previous system slot, which after the first non-root upgrade is the old image whose gateway (and agents) still ran as root, and ssh_service_start opens a network service. The helper therefore gained --require-main-pid-of <unit>: the caller must be that unit’s systemd main process, proven through a pidfd (SO_PEERPIDFD, Linux 6.5 or later) so a pid reused after a gateway restart cannot pass, and it must sit in the unit’s own cgroup; at most four such checks run at once, each bounded to two seconds, and any failure refuses the call (the flag refuses everything on non-Linux hosts). It is opt-in so older OS images keep working; v0.4.0 turns it on together with the non-root gateway. It relies on yama ptrace_scope being at least 1 (agent processes descend from the gateway and must not be able to ptrace it) and on the gateway never passing a sysd connection to a child (one connection per call, created close-on-exec). Operator terminal commands that change the clock (duduclaw os system timezone-set / ntp-set) also run in a separate process; with the flag on they fail with a message pointing to the dashboard’s system settings. The os_* MCP tools, which run in a separate mcp-server process, therefore no longer open the socket themselves: on an appliance they pass their own checks and then go through a signed loopback route of the gateway (/api/internal/sysd), which accepts only the verbs those tools need (no SSH, network, hostname, timezone or local-model verbs) and calls sysd itself. A process of the gateway’s user that can read the gateway’s key files could still sign requests to that route; it narrows such a caller to those verbs, and the rollback among them is safe only because sysd refuses old targets (next paragraph). The verbs that carry a value were also re-checked for a hostile caller: the hostname is now an RFC 1123 name of at most 64 bytes (until now only its length was checked and a value starting with - reached hostnamectl as an option); timezone and interface names must start with a letter or digit; such values are placed after --. The helper gained a fixed local-model verb (stop or restart of the one model service) so the gateway no longer runs systemctl itself. Factory reset now runs through one verb that also carries the “clear network settings” choice: on images that ship the duduclaw-factory-reset.service oneshot it writes /data/system/factory-reset.pending and reboots, and the oneshot wipes the gateway data, the kiosk home, the gateway’s container store and (if chosen) Wi-Fi before the gateway starts; older images wipe immediately as before, now on the root side. A gateway that meets an older helper refuses the reset with nothing deleted, and so does an appliance whose helper is unreachable. Gateway and helper must ship from the same OS image.
What the non-root gateway does and does not contain (DuDuClaw OS v0.4.0) — on DuDuClaw OS v0.4.0 and later an AI employee that has a shell runs as the gateway’s user. It can read the gateway’s keys and therefore do anything the gateway can, including forging the gateway’s signed internal requests and dashboard sessions. Moving the gateway off root keeps such an agent away from root; it does not keep it away from the gateway’s own powers. The existing rule still holds: real containment means not granting Bash, or running the work in the task sandbox. For that reason the guard against getting root back does not trust any caller: duduclaw-sysd --min-rollback-version <version> (v0.4.0, the first release with a non-root gateway, sets it to its own image version, 1.73.4-y1-bringup) refuses a rollback when any boot entry it could start is older than that, or when the entry’s version cannot be read from the unified kernel image itself (its embedded os-release, cross-checked with the file name). Type #1 entries (loader/entries/*.conf) cannot be checked as strictly, so while any exist the rollback is refused. Installing an update was also a way back to root: the system updater installs whatever sits in its source directory without checking it, and that directory was the gateway’s own download folder, so a same-user process could plant any image (an old signed one renamed to a higher version included). The install now goes through a new helper command: as root it verifies the release’s signed checksum list against the OS signing key built into the helper, copies only the listed files (no links followed, regular files only, hashed while copying) into a root-only staging directory, picks the kernel image bound to the destination slot, and installs only if that image’s embedded version is newer than the running one and at least the rollback floor. The gateway’s own checks stay as an earlier, clearer error. The plain install command is no longer reachable through the gateway’s internal route. Clearing an exhausted entry only deletes it. Remaining outside the helper: the boot loader’s own boot counting falls back to the other entry when a new one fails to start three times before it is marked good, so v0.4.0 deletes entries older than the floor once its first boot has been marked good. That makes the upgrade one-way: after a v0.4.0 image has booted successfully, the device cannot go back to v0.3.0 or earlier, and a bad later release is fixed by installing a newer image or using the rescue entry. Until that first boot is marked good, the old root-gateway entry is still the boot loader’s fallback, and an agent on the new image could reach it by making the trial boots fail; the window is a few boots.
Maintenance SSH with its own account and a temporary key (helper side, v1.75.0, not usable yet) — the helper gained two commands, ssh_maint_open and ssh_maint_status, for a maintenance login that uses a dedicated account (duduclaw-maint, uid/gid 4800) and one public key per window instead of an open port. The gateway runs as the AI employees’ user, so the helper is the only authority for the key: it accepts exactly one key (Ed25519, ECDSA P-256/P-384/P-521, the two FIDO security-key types, or RSA of 3072–8192 bits with an odd exponent of at most 64 bits), decodes it and checks every field and size, refuses authorized_keys options, certificates, private keys (OpenSSH, PEM, PuTTY), RFC 4716 blocks and more than one key or line, and writes only fixed options (no-port-forwarding,no-agent-forwarding,no-X11-forwarding) plus the canonical encoding of the decoded bytes. The key file lives on tmpfs (/run/duduclaw-maint-ssh/authorized_keys, root:duduclaw-maint 0640); it is written through a directory handle without following symlinks and moved into place with a rename that refuses to replace an existing key, then read back. Before writing anything the helper checks the configuration in effect (systemd’s merged units and the loaded nftables ruleset): an OS readiness marker, the account’s uid and gid, dropbear’s merged command line compared token for token with the expected one, that dropbear’s units are bound to the helper (BindsTo=), the firewall rule that rejects the account’s loopback traffic together with the jump that reaches it, and the LAN/VPN-only source sets for port 22; any miss refuses the window. A window ends at the helper’s own deadline (at most 24 hours, kept on CLOCK_BOOTTIME, so changing the wall clock does not extend it), when the gateway closes it, when the helper restarts and finds it, or, if the helper is down, through a transient systemd timer the helper arms when it opens the window and cancels when it closes it. Every 15 seconds the helper reads logins and logouts from the journal, accepting only fields journald fills in itself (_SYSTEMD_SLICE=system-dropbear.slice, _UID), and appends them to the root-only audit file /data/system/maint-ssh-audit.log; the gateway plays no part, so stopping or compromising the gateway does not stop those records. The helper never waits on the audit file’s lock for more than a few seconds: if it cannot write, a window does not open, and a close reports the problem and keeps the records (and any journal events it could not read yet) queued until they are written. The window state and the journal position live in a root-only directory on persistent storage (/data/system/maint-ssh/), so a reboot during a window does not erase its logins: the next startup replays the journal from the saved position and writes the close record with trigger reboot. While a window is open, every check also re-reads the firewall’s maintenance egress rule and closes the window if it is gone. Opens are rate-limited (at least 5 seconds apart, at most 12 per hour). Strings from those events are cut to 128 characters with control characters removed. The first 50 logins of a window are written one by one and the rest counted, and when the file rotates the window’s open record is written again at the top. On an image that ships the account the old port-only ssh_service_start is refused. Neither command is reachable through the gateway’s internal route for the os_* tools. Nothing here is usable until an OS image ships the account and the gateway and dashboard parts land.
Document knowledge base
Section titled “Document knowledge base”The document knowledge base adds collections of uploaded documents that AI employees can search. Its guards:
- Default-deny permissions per collection, decided in one function and in SQL: a read needs a grant to the employee (or its department) and to the person the turn is for, and group conversations exclude
personalandrestrictedcollections. A grant that cannot be read counts as none; a missing passage and a forbidden one get the samepermission denied. - Parsing out of process: every document is read by
duduclaw knowledge-extractwith a time limit, a CPU limit, an address-space limit on Linux and a sandbox on macOS and Linux that allows no writes, no network and reads only of the file, the extractor and the system libraries; without a sandbox the file is refused unless the operator opts in. Office files pass the zip-bomb checks first,.xlsxcells are streamed with a ceiling. A parser crash only ends that child. - Document text is data: passages are scanned for injection wording when indexed and marked; tool results put them in a marked block where every line starts with
│, so a document cannot forge a result header. A tool call whose turn the gateway did not register reads nothing. Passages put into a reply’s prompt are XML-escaped inside a<knowledge_passages>block, instruction-like ones are never injected, and the system prompt says passage text is data; that last part is a prompt rule the model may still ignore, which is whyanswer_mode = "kb_only"exists. - Who a reply is for is resolved by the gateway, never by the model: the WebChat account, a messaging-app sender only through a verified channel binding, everyone else (including public widget and website Live Chat visitors) as the channel only. Public visitors read only
publiccollections. Cron runs are system turns limited to public and internal collections granted to the employee; a run dispatched from a person’s turn keeps that person’s limits (an unbound sender’s delegation stays channel-only), and a reply turn from an unrecognised session reads nothing. - Group chats disclose by design: a bound sender’s own and department collections may be quoted in a group, and the answer and its source footer are visible to every member. Personal and restricted collections are never used in groups.
- Adding from outside the dashboard always needs a person:
knowledge_add_sourceand the 「加入知識庫」 chat command only file a dashboard-only card, decided by an Admin or the collection’s editor at decision time. The card holds a content hash, a text preview and who asked; a changed file is refused at approval. Only files the channel adapter saved for that sender count (a typed file reference names nothing), visitors and unbound senders cannot propose, and waiting cards are capped per employee and per proposer. - Web pages by URL go through the public-page fetch rules (no internal addresses, no userinfo, no redirects, 5 MB).
- Audit: every read is written to the knowledge access log; collection, permission and deletion changes also go to
security_audit.jsonl. - Vectors respect the same permissions: the vector list is filtered to the allowed collections before any similarity is computed, so a forbidden collection cannot take a top-k slot.
- Embedding models are pinned: each model file and the ONNX Runtime archive are named with size and SHA-256 at one commit; a download or an offline bundle that does not match is refused, and only a fully verified install counts. The extracted ONNX Runtime library is itself pinned and hashed before it is loaded (for the redaction AI detection too), so a library dropped into place by hand is refused. Both download sources for that library (the GitHub release archive and the NuGet package used when GitHub fails) carry their own pinned size and SHA-256, and redirects are followed only over HTTPS to the hosts of that source (for GitHub:
github.com,objects.githubusercontent.com,release-assets.githubusercontent.com; for NuGet:api.nuget.org). Each file unpacked from an offline bundle, including the ONNX Runtime archive, is checked against its SHA-256 before it is put in place. The library is hashed again after loading. On macOS and Linux the library and the three directory levels above it, up to<home>/lib, must be owned by the current user or by root and must not be writable by group or others. Known limit: where the system loader only accepts a file path (macOS, Windows and unprotected Linux installs), a process running as the same OS user could swap the file between the check and the load; the post-load check then blocks the library, but code in the swapped library may already have run. Employees must not have write access to<home>/lib; native Linux protected mode loads the library from a sealed in-memory copy. Offline bundles are minisign-signed with the release key and the signature is checked before the bundle is unpacked; the unpack writes only the expected regular files. Custom cloud endpoints must be publichttpsaddresses (re-resolved and pinned on every request) unless an Admin setsallow_private_endpoint, and the disclosure record cannot be added or changed in the raw config editor. Local models keep document text on the machine. - Cloud embeddings are opt-in and fail closed: an Admin must acknowledge which vendor and host receive passages (bound to provider, host and model; any change needs a new acknowledgement). Passages and questions go through the
[redaction]rules first, hits replaced by category markers; with redaction off, rules failing to compile or no rules, nothing is sent and search stays keyword-only.restrictedandlocal_onlycollections are never sent. Endpoints must behttps(plainhttponly to127.0.0.1), redirects are not followed, a provider’s error body is never stored (only its status code) and responses over 32 MB are refused. The force-disable switch of redaction stops sends at once, a running embedding job re-checks the provider, acknowledgement and redaction before every batch, and switching providers resets the previous provider’s endpoint and model. Installing, removing and switching providers are written tosecurity_audit.jsonl.
Not covered yet: Windows has no extraction sandbox (files are refused there by default) or memory limit; heartbeat runs carry no turn or run id, so their tool calls read nothing. Rule-based redaction does not recognise every personal name in passages sent to a cloud embedding provider (the AI detection model does better, not perfectly).
Person credentials in the OS keychain (v1.76.0)
Section titled “Person credentials in the OS keychain (v1.76.0)”Letting an AI employee act as one specific person (for example a colleague’s Google account) raises the cost of a stolen credential, so those credentials get their own key. The protected key is a 32-byte AES-256 key held in the operating system’s credential store on supported desktop systems, or wrapped under a root-owned key in opt-in Docker and native Linux protected-service modes; credentials for a specific person are sealed with it (pk:v1:<key id>:…). Home-wide credentials (.keyfile and the *_enc values it decrypts) do not change.
- Off by default. An Admin turns it on from the Security page (the Credential protection card, RPC
security.credential_protection_enable);duduclaw credentials statusprints the same one line. While it is off nothing else changes, and features that act as a specific person refuse to run. - macOS: the item sits in the login keychain, and its decrypt permission trusts only the
duduclawexecutable that created it, identified by code hash. Reading the key with Claude’sReadtool,cat, a backup,securityor a Python script fails; with someone at the Mac, macOS asks first. The gateway’s own reads never show a dialog. Code injected into aduduclawprocess counts asduduclaw: in a test, code injected into an ad-hoc signed creator read the key silently, and hardened runtime stopped it. So the card says “only the DuDuClaw program can read it” only when the running executable has hardened runtime; the released CLI does not yet, and shows “readable by programs under the same user account” with a note about code injection. After an upgrade the new executable has a new code hash, so personal accounts pause until someone at the Mac runsduduclaw credentials authorizeand approves the dialog once. Nothing else stops working. - Windows: the key is in Credential Manager. That keeps it out of files and backups, but any program running as the same Windows user can read it, including an AI employee with a shell. The dashboard says so.
- Ordinary Docker and Linux user services: no isolated key is provided, so personal identities remain refused. Use the Docker overlay below or the native Linux protected system service. Terminal credential status cannot represent the gateway because only the gateway receives the key.
- Native Linux protected service: v1.79.3 protects a root-provisioned credential key but still shares the gateway UID with employee Bash/tools. The v1.80 development architecture separates employee identities, per-run namespaces, parsing and updates. Its installer support prepares trusted components and keeps the migration boundary closed; it does not activate a complete isolated installation. Migration platform and first-admin setup integration remain missing. Package-level root tests passed on Ubuntu 22.04 kernels 5.15/6.8, Ubuntu 24.04 kernel 6.8 and Debian 12 kernel 6.1; GCP Ubuntu 24.04 kernel 7.0/Landlock ABI 8 currently refuses trampoline execution. These tests are not full installation or migration acceptance. See the protected service guide for prerequisites, pending gates and recovery boundaries.
- Docker with the person-credentials overlay: start the stack with
docker compose -f docker-compose.yml -f docker-compose.person-credentials.yml up -d(steps in the Docker guide). The container then starts as root with onlySETUID,SETGIDandSETPCAPadded tocap_drop: ALL. A short launcher (container/protected-key-launcher.sh) keeps a 32-byte root key in a root-only volume at/var/lib/duduclaw-protected, runs first-run setup asduduclaw, kills every process that setup left behind, opens the key on file descriptor 3 and starts DuDuClaw’s built-in init as PID 1 using the same binary and dropped privileges: userduduclaw, every capability set empty andNoNewPrivs. The init marks itself non-dumpable before spawning the gateway as its child, then closes its key descriptor without reading the key. If the gateway exits, the init exits and every other process in the container ends. The gateway marks itself non-dumpable before reading the key, closes the descriptor, and then checks: PID 1, or the child of DuDuClaw’s built-in init, no root user or group ids, all capability sets empty,NoNewPrivs, non-dumpable, the key path refused to it, no Docker or Podman socket, noDOCKER_HOST. If any check fails the key is discarded, person identities stay off and the card names the reason. The protected key exists in the home only wrapped under the root key (protected/container-wrapped-key.json); a changed or foreign wrapped key shows “Protection key was replaced”. The card reads “Separate key (AI employees cannot read it)”.- Known limitation: the gateway is no longer PID 1. A same-user process inside the container can send the gateway any signal ordinary permissions allow, including SIGKILL, SIGSTOP and SIGABRT, stopping or terminating it and causing the container to restart (with a restart policy) or stall. It still cannot read the key. Isolating AI processes from this requires a different UID or PID namespace. The new layout has not yet been re-measured.
- Earlier measurements with the gateway as PID 1, on Docker Desktop 7.0 (arm64, no Yama), as uid 1000 in the same container and again inside
unshare -Ur: opening the key file,/proc/1/mem,environ,fd,rootandmaps,ptraceandprocess_vm_readvwere all refused; SIGKILL and SIGSTOP sent from inside the container did not stop PID 1. These earlier SIGKILL/SIGSTOP results apply to PID 1, now the init, and do not establish signal isolation for the child gateway. A same-user process inside the container can send the gateway any signal ordinary permissions allow, including SIGKILL, SIGSTOP and SIGABRT, stopping or terminating it and causing the container to restart (with a restart policy) or stall. It still cannot read the key. Isolating AI processes from this requires a different UID or PID namespace. The new layout has not yet been re-measured. A mounted Docker socket,--initand a missingSETPCAPwere each refused. Not yet measured: the full server image, Docker Desktop on Windows, Podman and rootless Docker. - Trade-off: while the key is held, the gateway refuses to load ONNX models in its own process, because employees can rewrite those files and the files reach native parser code. AI privacy detection (NER) redaction, local knowledge-base embeddings and Kokoro voice stop. Knowledge search falls back to keywords. NER redaction rules then behave as if the model were missing: text is not redacted by them. Use the regex rules, or do not enable this mode, where NER redaction is required.
- It does not stop an employee with a shell from using Google through the gateway within what it is allowed, reading the access token issued for its own turn, stopping the gateway, or putting back an older copy of the home’s files after a restart. In-app Replace key cannot prevent that last one, because the root key stays the same. When a leak is suspected, replace the root key in the key volume (Docker guide). Anyone with access to the Docker host or the key volume can read the root key, and a backup that holds both the key volume and the data volume holds everything needed to open the credentials.
- A replaced key is refused, not used. On macOS any program running as the same user can overwrite or delete a keychain item without asking (measured on a throwaway keychain). The gateway therefore checks the key against a key id and an encrypted canary recorded at enable time, pins the first key it loads for the life of the process, and treats a sealed value with a different key id as a changed key. Any of these stops personal accounts and shows “Protection key was replaced”. Replacing the key and the record together and then restarting the gateway passes the first two checks; only the old sealed values give it away. Replace key (also offered when everything looks fine) creates a new key, and everyone reconnects.
- Only the gateway unseals. The key is handed out only inside the process that holds
<home>/locks/gateway.lock. The MCP server and CLI subcommands never receive it. - Audit:
security_audit.jsonlgetscredential_protection_enabled(with the previous state; Critical for a reset),credential_protection_enable_failed,credential_protection_disabled, andcredential_protection_brokenthe first time a gateway sees a missing or replaced key or a bad record. Rows carry the state, level, backend and key id, never the key.
What it does not stop: an employee with a shell can still replace the key (detected, as above), kill the gateway and start its own, or inject code into the duduclaw executable while the released macOS CLI lacks hardened runtime. Real separation is still not granting Bash, the task sandbox, or running the gateway as a different OS user.
Acting as a colleague’s Google account (v1.76.0)
Section titled “Acting as a colleague’s Google account (v1.76.0)”Inbound mail text returned by the built-in mail tools and Gmail search/read is scanned before it reaches an AI employee. Login links and nearby one-time codes are replaced with notices; mail identifiers and timestamps remain unchanged. This boundary covers only the built-in mail and Gmail result fields, on every Gmail connection type: OAuth, service account and the Apps Script bridge. It does not scan third-party MCP servers, Remote MCP, or content read through Bash. Detection is rule-based, so an unusually worded code can pass.
Company delegation lets an AI employee use Google as one named colleague. The gates, all failing closed:
- Only the proven employee. The identity is chosen from the employee proven by
DUDUCLAW_AGENT_ID+DUDUCLAW_AGENT_TOKEN, never from a tool argument. A process claiming an employee it cannot prove gets only the home default, and nothing when the claimed employee is set to anything else. - Only the gateway mints. The MCP server asks
POST /api/internal/google-token(loopback, signed identity, nonce, rate limit, the same authentication as the knowledge route). The gateway reads the employee’s[google]itself, looks up who the turn is for in its own registry, and unseals the delegation key only afterperson_identity_gate()passes (credential protection at or above the minimum level; ordinary Linux user services and plain Docker installs are refused; the native protected service and Docker person-credentials overlay can pass). The token stays in the MCP server’s memory for that turn. - The key is sealed. The service-account key is stored only as a
pk:v1value under the protected key. A sealed key that does not open with the current protected key is treated as a replaced key: delegation stops,google_delegation_key_unreadable(Critical) is written once, and the admin resets protection and imports the key again. The record is not overwritten silently. - Who asked. By default only people bound to the employee, Admins, and system turns may use the colleague’s account; public visitors never, under any setting. A refused requester or a setting error never falls back to the shared account; other failures do so only when the employee’s
fallback = "home"says so, and the reply says it did. - People are re-read. A colleague whose DuDuClaw account is suspended or offboarded is refused on the next call.
- Settings are admin-only.
[google]is frozen for the employee’s own Write/Edit (agent-file guard) and is an authority key: a non-admin Owner may only narrow it.
Limits: gmail.compose lets the token holder send mail; an employee with an unrestricted shell can use the token issued for its own colleague directly against Google, and runs as the same OS user as the gateway. HTTP Google MCP mounts (oauth://google) use the selected employee account and recheck live requester permissions per call. Person-account stdio mounts are refused. Setup: Connect Google. See Per-employee Google accounts.
What these guards do not cover
Section titled “What these guards do not cover”Saying this plainly is part of the defense.
- The hooks see Claude Code’s own tool calls, not MCP tool calls. MCP has its own gate (scopes, grants,
denied_tools); the hooks are the second lock, on the built-inWrite/Edit/Read/Bashsurface. - The Bash lane of
agent-file-guardis a heuristic. It reads command text, so these get past it: a path computed from a variable (other than$DUDUCLAW_HOME, and~/.duduclaw/$HOME/.duduclawwhen the home is in the default place), from command substitution or from any other calculation; an encoded command; a script written to disk and then run; a here-document fed to an interpreter; aliases and functions; an environment variable that makes a shell started later load a file; a write option of a listed read-only command that the list did not account for; an extraction or download command with no explicit destination, which writes into the current directory (the lane does not judge the current directory, so changing into the home first and then running it is not stopped); a link created and then written through within the same command; hard links; and the time gap between the check and the actual execution. - Operator-only memory commands are guarded by a speed bump and an approval, not a sandbox. The Bash lane rule for
memory forget-sourceandmemory migrate-namespacemisses a global option before the subcommand, a binary named by command substitution and a piped command, and the AI-session check can be defeated by unsetting variables. The dashboard approval is the gate; see Forget by source needs an Admin approval. - Schedule notification origins are not a boundary against an employee with Bash. The gateway resolves and records the conversation that a schedule, reminder or goal notifies by default from the live turn, and the MCP tools give the employee no parameter to choose it, so an employee without Bash cannot direct those notifications to another conversation. An employee granted Bash runs as the same OS user as the gateway and can read and write the gateway’s local databases, including the stored origin records; for that employee this is a speed bump, not containment. Mitigations today: do not grant Bash to employees that should not have it, use the task sandbox, or use native Linux employee isolation (not available yet). Planned: a capability to record an origin that is bound to the live turn, together with process isolation.
- The Bash lane also refuses some harmless commands. A judged path whose resolution fails is refused even when it lies outside the home, and a dangling symbolic link is refused even when it points outside the home.
agent-file-guarddoes not coverRead. Held-out eval sets and the audit log remain readable to an employee; the hook only stops writes.- The OS keychain does not separate an employee from the gateway. Both run as the same OS user. On macOS the protected key resists reading by other programs but not replacement; on Windows any same-user program can read it. In the Docker person-credentials mode the root key is held by the gateway process only, and the gateway is still the employee’s OS user: an employee can ask it to act within its permissions and can stop it. See Person credentials in the OS keychain.
- These hooks and the Codex control-file lock are separate controls. Unix Codex WorkspaceWrite runs use the permission profile described above. Grok, other CLI runtimes and Windows are not covered by that lock; other CLI runtimes have no OS sandbox unless
native_sandboxis enabled. - State files inside the employee’s own directory are not protected, apart from
SOUL.md,CONTRACT.toml,INSTRUCTIONS.md, the identity files (.mcp.json,.claude/settings.json) and itsagent.toml. The sharedattachments/directory is writable by every employee. data-file-guardis a heuristic. It matches filenames in aBashcommand line; a dynamically-built path defeats it. (It is no longer inert on Windows — it is now a Rust subcommand.)- There is no threat-level state machine.
~/.duduclaw/threat_levelsurvives as an operator-controlled kill switch that the computer-use orchestrator polls (REDstops the run,YELLOWpauses it), but nothing inside the workspace writes it. A missing file meansGREEN; a file that exists but cannot be read, or holds anything other thanGREEN/YELLOW/RED, is treated asRED(fail closed) after two re-reads 50 ms apart; a leading UTF-8 BOM and surrounding whitespace are ignored. - (Removed 2026-09.) This section used to note that the PTY session pool sat outside the redaction rewrite. That pool no longer exists — every Claude spawn is a per-call spawn, which is exactly what the rewrite hooks into.
Interaction with other systems
Section titled “Interaction with other systems”- CONTRACT.toml defines what an agent must never do, and
duduclaw testred-teams it. The guards enforce at the tool-call level. - Evolution engine — because
SOUL.mdis read-only to agents, the evolving artifact is the playbook. See 38-aee-playbook-evolution.md. - Redaction and data sources — see 55-data-sources.md for the pipeline
data-file-guardcomplements. - Delegation isolation — see 37-delegation-isolation.md for the predicate
org_field_guardprotects.
The takeaway
Section titled “The takeaway”Four guards with stated failure modes beat a three-layer story with no code behind it. When a defense is removed the documentation has to go with it: a page describing a shell script that does not exist is worse than no page, because it makes an operator stop looking.
Durable channel decisions
Section titled “Durable channel decisions”High-risk Computer Use confirmations use the inbound account and exact conversation/thread. Reply with 確認 <full UUID> or 取消 <full UUID>; questions use 回答 <full UUID> <answer> and never grant tool permission. Bare yes/A/B cannot select a request. Before execution, the host rechecks the live screen, title, policy and cancellation gates. Restart invalidates old GUI approvals instead of replaying coordinates; an execution without a receipt becomes uncertain and requires Admin reconciliation. See the decision guide for the exact supported inbound routes and current limitations.
Outgoing data guard: known limitations (v1.77.0)
Section titled “Outgoing data guard: known limitations (v1.77.0)”The outgoing data guard tracks pending private reads and completed reads with model-visible data (including error payloads) per turn at the platform MCP dispatch gate and third-party MCP proxy. Its default shadow mode only audits; select ask or block for enforcement. Native CLI checks described below; the persisted leases in this section still cover MCP calls only. Prompt-supplied data and reads outside these MCP paths are not automatically marked. Tracking does not follow data copied across turns; turn taint has a six-hour TTL and is not persisted across restart. Active sink leases are persisted before admission in <home>/egress_leases.db (SQLite WAL, 0600 on Unix) and restored before loopback routes accept requests; restored leases fence their employee for a fresh six monotonic hours on every restart, regardless of UTC age or clock jumps. They cannot be released by old responses. An exclusive egress_leases.lock prevents two gateways from owning divergent lease ledgers; a second owner fails closed until it takes the lock and restores the store. An unreadable store fences every employee’s private reads and new sinks in ask/block until recovery; shadow allows and audits. Store opening retries every five seconds, with at most one error log per minute. Failed inserts refuse enforcing-mode sinks; failed deletes retain their fences. Unknown or expired turns, including turns lost on restart, are treated as tainted; only a valid gateway-registered turn can be clean. This guard is not a network sandbox or an information-flow guarantee for the entire runtime.
Outgoing approvals bind the full canonical arguments to one use. Purchase and Delete tools cannot be authorized by standing capability or workflow grants, including old stored grants. Other permission and denial gates continue to narrow access.
CLI outgoing checks
Section titled “CLI outgoing checks”Claude/Grok web tools and literal Bash network commands use a gateway-backed approval hook; Codex enforcing modes restrict network access and disable web search at spawn. Background runs register host turn IDs. The Security page lists employees with Bash, ask/block mode and no enabled task sandbox. Bash is only a speed bump and telemetry: native file reads do not mark taint, same-user tampering is outside the boundary, and native preflight has no execution-long MCP lease. Claude bare mode and Grok shared work roots are refused in enforcing modes. Generic CLI native tools remain outside this extension. See outgoing data guard for the mode table, single-use retry flow and limitations.
Server-bound recipients
Section titled “Server-bound recipients”The separate recipient guard defaults to shadow: targets outside the current server-owned source conversation, verified owners and the employee’s [capabilities] recipients list are audited without blocking. In ask, they need a dashboard Admin’s single-use approval (with the mail_send requester exception below); if outgoing-data protection also asks, both reasons share one card and one argument-bound ActionGrant. Unknown modes use ask; employee overrides can only tighten the global setting. The whole capabilities table is frozen against employee edits, including recipient_guard and recipients.
Owners come only from users.db AccessLevel::Owner bindings resolved to verified channel identities. Employee-editable [proactive] targets never confer permission. MCP sends an opaque turn ID to a signed gateway route; forged reply-channel environment values do not change the source, and an unknown turn has none. Scheduled notification recipients are checked at creation and at fire time; fires have no source conversation. Scope and tool decisions are documented in Outgoing data guard.
Requester confirmation for mail
Section titled “Requester confirmation for mail”When mail_send is held by the recipient or outgoing-data guard, the verified company account that started the turn may decide the confirmation card in that same one-to-one conversation or authenticated dashboard WebChat. The gateway must attest the requester; their account must still exist in users.db and have Operator access to this AI employee when deciding. Group conversations, an external or unverified sender (including LINE OA and odoolivechat: visitors), another AI employee, cron and heartbeat cannot use this exception. A dashboard Admin can still decide.
The card shows every full recipient address, the subject, a body summary and whether this turn read private data. The card is a plain-text message with no buttons; reply with the decision verb and the full request UUID; an AI employee claiming “the user approved” has no effect. The existing single-use ActionGrant binds the final arguments. Before dispatch, policy revision and recipients are checked again; changed arguments require a new approval, a second use is refused and expiry denies. The record identifies the requester or dashboard Admin who decided.
config.toml [security] mail_requester_approval is a boolean, default true by owner decision. A missing file or key uses that default; unreadable or malformed configuration, an invalid value, or false keeps the request dashboard-Admin-only. Admins can turn it off in Security settings. This exception applies only to mail_send; messages, calendar operations, third-party MCP, CLI outgoing operations and workflow activation retain their existing Admin-only outgoing approvals. Only an adapter-attested one-to-one conversation or authenticated dashboard WebChat is eligible. Group chats and unknown chat types still need a dashboard Admin; public WebChat widget visitors are never eligible. Channel notices for ineligible requests contain no recipients, subject or body; full content stays in the dashboard.
The audience check accepts authenticated dashboard WebChat, but the current non-Admin WebChat confirmation UI/decision entry point is not yet wired; those users still need an Admin to complete the approval.
Admin approval in chat apps (v1.86)
Section titled “Admin approval in chat apps (v1.86)”Use Security settings → Approve in chat apps for Telegram and Google Chat. All step-up categories start checked; unchecking one requires risk confirmation. Card lifetime is 1–720 hours. Personal edition shows this card read-only. Admins prove their identity under My connections → Chat app links (administrator) using the one-time-code handshake; Cancel chat approval eligibility clears only that proof. Members labels chat identities Self-confirmed / Entered by administrator. Chat links open /approvals/confirm: sign in if needed, then enter password + authenticator code to approve; rejection needs no password. Processed Inbox cards show Decision maker and the decision time.
Dashboard-only approvals stay in the dashboard unless a customer Admin turns on Approve in chat apps under Security settings. With it on, an Admin who has proven their own chat account can decide some of these requests from a card in a private Telegram or Google Chat conversation with the bot or Chat app. The feature is off by default.
| Tier | Requests | In chat |
|---|---|---|
| T1 | Knowledge review (knowledge_quarantine), add a document to a shared collection (knowledge_add_source) |
Approve or deny with one tap |
| T2 | Enable skills, activate a workflow, change an employee’s profile files, change the org chart, run an automation action, CLI outgoing operations, and any card held by the outgoing data guard | Deny with one tap; approving needs a second confirmation unless an Admin switched it off for that category |
| T3 | Personal delegation, the operator command-line kinds, and anything not listed | Dashboard only; no chat card is sent |
The requester-confirms-own-mail path above is unchanged, and a Personal employee’s cards always go to the dashboard.
Who can decide. Only a user who is an Active Admin at the moment of the press. Managers, solo mode and the system identity never decide through this path. The chat account must be proven by the Admin personally: the dashboard (My Connections) shows a one-time code DUDU-XXXX-XXXX valid for 10 minutes, the Admin pastes it in a private chat with the bot or app, then confirms “this is me” on the dashboard in the same login session. If the dashboard shows an account that is not theirs, “not me” voids the code and writes channel_link_rejected. A code pasted in a group is voided. Codes are consumed by the gateway and never reach an AI employee; wrong codes are throttled per sender and globally. A binding that an Admin filled in for someone else keeps working for notifications and login codes but is labelled “not self-confirmed” and cannot approve. Cancel chat approval eligibility clears only the proof; notifications and login codes keep working.
How a press is checked.
- Cards go only to the Admin’s proven private conversation, one card per Admin, never to a group or an employee’s control channel. Google Chat cards are sent only by an app that receives JWT-verified HTTP clicks; Pub/Sub never decides.
- Every delivered card has a receipt. A press counts only when it matches that receipt (receiving bot, conversation, message, full approval id, the person who pressed) and happens in a private chat. Typed commands such as
確認 <id>and replies to other messages never decide these requests, so a look-alike card written by an AI employee has no effect. - On every press the gateway re-reads the user (still an Active Admin), the proof, the settings and whether the bot or app is still configured. If the content changed after the card was sent, the press is refused and a fresh card is sent. Pressing twice executes once; the dashboard and chat share one per-approval lock.
- Second confirmation. Every T2 category requires it by default (owner decision). An Admin can switch it off per category; that needs an explicit risk acknowledgement and is audited. The default method is a one-time link to the dashboard (10 minutes, single use, only its hash is stored): the Admin signs in and enters their password and authenticator code. Rejecting on that page needs no password. An Admin without an authenticator app approves these categories in the dashboard. Optionally an Admin can enable a Telegram private-chat code: reply to the bot’s prompt with the 6-digit code within 3 minutes; recovery codes and reused codes are refused, five wrong attempts void the request, and the bot deletes the message containing the code. Google Chat does not offer this method.
- A chat decision is recorded as
chat-admin:<user>:<channel>:<tap|web|totp>together with a ledger row written in the same transaction. Downstream grants (workflow revisions, single-use action grants) accept a chat decision only when the matching ledger row exists. The operator command-line, Personal delegation and disconnect-forget consumers still accept dashboard decisions only. - Audit events:
channel_identity_proven,channel_link_rejected,channel_identity_proof_revoked,approval_chat_admin_card_sent,approval_chat_admin_decided,approval_chat_admin_refused(at most 5 per sender per minute) andapproval_chat_admin_settings_changed(an intent record before the settings are written, then a committed record). - Turning the feature off rewrites in-flight cards to “Chat approval is off, please use the dashboard”; later presses are refused. Other Admins’ cards are rewritten to the result once someone decides, and to “expired” when the request expires.
- Migration to another host never imports receipts, the decision ledger, proofs or confirmation tickets; Admins prove their chat accounts again on the new host.
Limitations.
- Only Telegram and Google Chat are offered in this version. LINE, Slack and Discord entries in the settings are ignored with a warning.
- If any AI employee’s
agent.tomlcannot be read, chat approval refuses every press, because the gateway cannot confirm the card came from a bot that is still configured. Symptom: the card answers “Your approval permission could not be confirmed. Please use the dashboard.” and the audit log showsapproval_chat_admin_refused. Remedy: fix or remove the employee with the broken settings on the AI employees page; the dashboard keeps working meanwhile. - The confirmation link needs an external https address for the dashboard. Without one, second-confirmation categories are approved in the dashboard.
- Google Chat cards, buttons, message updates and links have not been tested against a real Workspace yet, and Telegram has not been tested against the real Bot API.
- A card is valid for 168 hours by default (1 to 720), never longer than the request itself; most requests expire within 1 hour to 3 days.
- An AI employee with unrestricted Bash can edit local databases directly; see What these guards do not cover. This path does not make that gap wider.
Connection deletion approvals and receipts
Section titled “Connection deletion approvals and receipts”Disconnecting a connection creates a seven-day batch of memory-forgetting plans, with one dashboard-only, Admin-only approval card for the batch. The card shows counts for each AI employee; it does not expose memory content. Disconnecting remains successful even if planning fails. [memory] forget_source off, an unreadable configuration or an invalid setting prevents new plans and applies.
The turn ledger records connection references alongside its existing taint sources; attribution does not change the outgoing-data policy. The gateway derives channel and Remote MCP bridge references. Native tools inside the MCP server declare references, and the gateway accepts them only when the connection exists and the authenticated employee has a grant to it. Unknown references are dropped and counted, never stored as connection stamps. Google personal credentials use google:person:<user_id> for the credential actually selected. An unreadable ledger gives the memory an unknown stamp, not a guessed connection.
Residual risk: an employee with Bash can forge a stamp for a connection it is already granted. This is limited to its own memories, and deletion still needs an Admin approval with per-employee counts. Connection stamps do not provide OS isolation from an employee running as the same local user.
Applying does not run as an inline side effect before the approval decision is durable. A persistent job with a lease is retried by a background worker and recovered at startup. It re-plans before deletion: a pure shrink may apply, while scope growth requires a new approval. The memory engine still checks the database instance, epoch, expiry and hash inside its immediate transaction and fences deleted rows against reinsertion. A receipt is created only after all work succeeds, and a security audit event records it.
Global channel removal excludes per-employee bot sessions (#agent:); removing an employee’s bot selects only that bot. System-provenance rows are retained. Legacy unstamped rows and unreadable-ledger rows are counted as unattributed. Receipts report actual deletions by employee and store, retained system rows and attribution gaps. Out of scope: conversation text, tool_calls.jsonl, wiki and backups. Restoring an older backup can restore deleted memories and remove newer tombstones. Admins inspect receipts through memory.forget_receipts_list / memory.forget_receipts_get and the Security page’s JSON download.
A legacy dedicated Google execution that does not return a selected-account receipt is marked unknown when delegation may fall back to another account. A connection declaration arriving after its connection or grant was removed is also rejected and counted as unknown. Turn-start timestamps travel with connector stamps so delayed capture from an already forgotten turn cannot restore its attributable memory.
Connection stamps keep their origin and role. Corroboration alone never grants deletion ownership. A memory stays if another connected source also supplied it; plans, the Admin card and receipts report this per employee as retained_shared. Deletion requires every owning connector to have been disconnected and no independent live origin. The second disconnect can therefore select a previously shared memory. Unknown ownership (including old stamps whose role cannot be recovered) is retained and counted as unattributed. Derived memories undergo the same ownership check. Connection state is checked again before planning and applying, and reconnecting through the platform invalidates old disconnect evidence before publishing the connection.
Approval binds the sorted identifiers of orphan entity embeddings, not just their count; swapping one entity for another requires a new approval. Unfinished jobs use a durable attempt count and due time, with 60/120/240/480-second backoff. Due jobs are selected fairly. After five consecutive failures or interrupted attempts, a job is quarantined. The Admin can see a content-free failure reason under Data deletion receipts and choose Retry; retry retains the existing approval and rechecks scope, requiring a new approval if it grows.
Each disconnect record has a unique revision and starts unverified. A connection-state check can validate only the revision it read; a delayed disconnect notification cannot reuse an older check.
Conversation credential audit
Section titled “Conversation credential audit”Credential audit records detected credentials as metadata only. Passwords and connection strings have no fingerprint; high-entropy types use keyed fingerprints only when credential protection is available. Account hints keep only the first character and domain. Registration is capped at 5 findings per message, 50 per sender per hour and 100,000 rows; excess findings produce an aggregated throttling event. Detected values are masked in derived stores in both modes. The default audit mode still leaves plaintext in conversation history; mask replaces newly detected values before delivery. Bare passwords without context are not detected. Real-value substitution is planned without a release commitment. Admin-only audit RPCs and the doctor check expose audit-chain verification; the Read file guard also blocks the credential ledger directory.
Two-factor login
Section titled “Two-factor login”The gateway supports RFC 6238 SHA-1 TOTP: random 160-bit secrets, six digits, 30-second steps, a ±1-step window and transactional replay prevention. Secrets are encrypted with the channel credential AES-256-GCM machinery and the host .keyfile, outside users.db. Recovery codes are independent of TOTP decryption: ten random single-use codes are shown once and stored as Argon2 hashes. A missing key with any active or pending MFA row never causes a replacement key to be generated. Restore the original key or use host recovery. Key rotation is out of scope.
Dashboard enrollment requires mfa.enroll_begin {password} with the current password, verified on the blocking pool with login-style rate limiting. The returned enrollment_token binds the user, the authenticated JWT jti, a fresh password check and a five-minute lifetime. mfa.enroll_confirm {enrollment_token,code} must use the same session. A stolen JWT alone cannot begin enrollment. Replacing an enrollment requires disabling it with a fresh factor, then repeating password step-up; an active secret cannot be overwritten by begin.
Under MFA enforcement in any edition, first enrollment also requires an independent proof. Only for a verified channel binding whose recorded time predates enforcement, the gateway sends a separate channel OTP using the existing delivery service; submit it as proof_code. Otherwise another current Admin calls users.mfa_enrollment_code {user_id,challenge_ref} and gives the user the returned one-time code. It is bound to the user and the specific pending challenge, hashed at rest, valid for five minutes, shown once and audited; self-issuance is refused. An isolated last Admin uses duduclaw ops users mfa-enrollment-code <email> <challenge_ref> on the host. The proof is bound to one first-factor challenge, expires with it and allows at most five attempts; successful proof cannot authorize another challenge. A channel-OTP-first enrollment additionally requires the current password, so two codes from the same channel do not substitute for independent factors.
First-Admin bootstrap proof (v1.82). A third independent proof, kind bootstrap, lets the first Administrator finish first enrollment from the dashboard: POST /api/mfa/enroll/bootstrap {enrollment_token,setup_code} with the public login enrollment challenge. The host setup code is always required; there is no loopback / “same machine” claim, because a reverse proxy on the same host (nginx defaults: no forwarding headers, Host rewritten to the upstream) makes every peer 127.0.0.1, so the peer address and Origin prove nothing. The code is 128 random bits generated only by the host command duduclaw ops users mfa-setup-code, which prints it only to an interactive terminal’s stdout (refused when stdout is not a terminal and inside AI sessions; Docker: docker exec -it <container> duduclaw ops users mfa-setup-code). The gateway never generates, prints or logs a code: at start, while the window is open, it logs one informational line without any code naming that command, so nothing reaches journald or docker logs. The code is stored only as its SHA-256 digest in the singleton mfa_bootstrap_tokens row, bound to the bootstrap owner, valid for 30 minutes, compared in constant time, consumed in the proof transaction and dropped after five wrong presentations; issuing a new code replaces the old one. The proof is accepted only for the active bootstrap-owner Admin, only while the stored policy is enforced, no Administrator (any status) has any second factor and the closed latch is not set; the condition is checked again inside the transaction that writes the factor, and SQLite triggers delete every outstanding setup code as soon as any Administrator gains a factor.
Once per installation. users.db holds a monotonic closed latch, the single-row table mfa_bootstrap_state(id=1, completed_at, reason). SQLite triggers insert it in the very statement (hence transaction) that gives any Administrator a second factor — TOTP, passkey or Email factor, or promotion of an account that already has one — whichever writer adds it; other triggers refuse every UPDATE and DELETE of the row. Once set, bootstrap is refused for good, whatever happens later (factor deletion, demotion, suspension, account deletion); duduclaw ops users mfa-setup-code then refuses with a message pointing to host recovery (duduclaw ops users mfa-reset <email>, then duduclaw ops users mfa-enrollment-code for the new enrollment). When the latch table is first created on an existing installation that shows a past enrollment (any TOTP, passkey, Email-factor or recovery-code row of any account, or an admin_eligibility_log row recording an eligible Admin), the migration sets the latch at once. An unreadable latch refuses bootstrap and setup-code issuance. A restored or copied users.db carries its latch row; duduclaw import never copies users.db (it extracts proposals from an exact v1.79.3 catalog, so a v1.82 users.db is refused as a source and the new installation starts with its own latch).
Audit without a flood. Before the password-bound enrollment token has been validated (a live, unconsumed enrollment challenge from /api/login), a refusal writes no security audit event — that writer re-reads the whole hash chain and fsyncs per record — and is only counted in a fixed-size in-memory counter, summarized by at most one ordinary tracing::warn! per minute, process-wide. After validation, outcomes are written to the security audit log (mfa.bootstrap_enrollment, method, outcome and a closed reason only), at most 20 events per hour process-wide, then one mfa.bootstrap_enrollment_suppressed summary event; a successful proof is always written. This is in addition to the per-IP enrollment rate limits. auth_audit_log records mfa.bootstrap_code_issued (issuer label) and mfa.bootstrap_proved (method only). Codes and enrollment tokens never enter any log, audit event, error string or URL.
Known limitation: the setup-code command does not stop an AI employee with Bash (v1.82.0). duduclaw ops users mfa-setup-code refuses inside AI sessions, is refused in the Bash lane for employee and unverified callers, and prints only when stdout is an interactive terminal. An AI employee that has been granted Bash runs under the same OS identity as the operator: it can clear the session variables, spell the command so the Bash-lane text check does not match it, and wrap the command in a pseudo-terminal (for example with script). These checks are a speed bump, not containment, the same as the Bash lane described in Guard 1. Consequence: while the bootstrap window is open, an AI employee with Bash that also knows the first Administrator’s password could obtain a setup code and enrol a second factor for that account. Mitigations available today: do not grant Bash to employees that should not reach the host command line, or run them in the task sandbox; watch the auth audit log for mfa.bootstrap_code_issued entries you did not cause. Planned: a privileged helper running under a separate OS identity issues the code (planned for a later version; not part of v1.83.0).
Under Enterprise enforcement, first authenticator/passkey/Email enrollment also requires an independent proof. Only for a verified channel binding whose recorded time predates enforcement, the gateway sends a separate channel OTP using the existing delivery service; submit it as proof_code. Otherwise another current Admin calls users.mfa_enrollment_code {user_id,challenge_ref} and gives the user the returned one-time code. It is bound to the user and the specific pending challenge, hashed at rest, valid for five minutes, shown once and audited; self-issuance is refused. An isolated last Admin uses duduclaw ops users mfa-enrollment-code <email> <challenge_ref> on the host. The proof is bound to one first-factor challenge, expires with it and allows at most five attempts; successful proof cannot authorize another challenge. A channel-OTP-first enrollment additionally requires the current password, so two codes from the same channel do not substitute for independent factors.
Enforced password/channel-OTP login returns mfa_enrollment_required, enrollment_token and the 12-character challenge_ref, with no session tokens. Use /api/mfa/enroll/begin {enrollment_token,proof_code} and /api/mfa/enroll/confirm {enrollment_token,code} (include password on both for channel-first login). For dashboard enrollment under enforcement, the first begin returns proof_required, enrollment_token and challenge_ref; repeat begin with password, that token and proof_code to receive secret and otpauth_uri. Only confirm activates the secret. Enrollment capabilities cannot authenticate /ws, refresh or ordinary HTTP routes, and dashboard capabilities cannot be exchanged on the HTTP enrollment routes.
For enrolled accounts, password and channel-OTP login return mfa_required, challenge_id and available-factor metadata. /api/mfa/verify accepts the challenge and exactly one of code or recovery_code. Challenges are user/first-factor bound, single-use, persisted, valid for five minutes and capped at five attempts. mfa.status reads one’s own status. mfa.recovery_regenerate {code} replaces all recovery codes; mfa.disable {code,password} requires the current password (with the enrollment password rate limit) and a fresh TOTP or unused recovery code and refuses removing the last enrolled factor under enforcement. Factor failures are limited to five per account per 15 minutes.
New team installs default to [auth] mfa_enforced=true; existing installs retain their policy, including legacy installs without a recorded MFA policy. An Admin can enable or disable enforcement with the dashboard toggle under Users → Two-factor login management (system.update_config with expected_state). Ordinary config writers, the raw editor and imports cannot change the effective value. On a fresh team install, claim the first Admin account and sign in with its password; enrollment then requires a host operator to run duduclaw ops users mfa-enrollment-code <email> <challenge_ref>. Enter that code and complete authenticator enrollment before receiving a session. Since v1.82 the first Admin can instead use the bootstrap proof above (the host setup code, once per installation) and finish entirely in the dashboard. Existing installs with enforcement off can continue voluntary enrollment; check mfa.overview, channel delivery and host recovery before enabling enforcement. With enforcement off and no enrollment, the existing response and epoch-zero JWT payload remain unchanged. Enforcement follows the stored policy in every edition: license expiry, license fallback or an explicit Personal override does not disable it. Only an Admin deliberately turning the policy off disables enforcement. Fresh Personal installs without a policy store stay unenforced; local auto-login cannot bypass an enforced policy.
New team installs default to [auth] mfa_enforced=true; existing installs retain their policy, including legacy installs without a recorded MFA policy. An Admin can enable or disable enforcement with the dashboard toggle under Users → Two-factor login management (system.update_config with expected_state). Ordinary config writers, the raw editor and imports cannot change the effective value. On a fresh team install, claim the first Admin account and sign in with its password; enrollment then requires a host operator to run duduclaw ops users mfa-enrollment-code <email> <challenge_ref>. Enter that code and complete authenticator enrollment before receiving a session. With Email delivery configured, the first Admin can also enroll Email after the same independent proof. The bootstrap proof above supports authenticator, passkey and Email enrollment from the dashboard. Existing installs with enforcement off can continue voluntary enrollment; check mfa.overview, channel delivery and host recovery before enabling enforcement. With enforcement off and no enrollment, the existing response and epoch-zero JWT payload remain unchanged. Personal ignores enforcement and /api/session/local stays passwordless.
Enforcement alone lets existing account access tokens expire naturally (default 30 minutes); unenrolled accounts cannot refresh. MFA sockets in every edition close on the heartbeat after expiration, within 30 seconds, without cancelling running work. Legacy shared-token /ws authentication and RPCs are refused under enforcement; established legacy sockets close at the next heartbeat, ending push subscriptions. Enrollment, disable and reset increment a per-user credential epoch; later password changes/resets increment it too. Older access/refresh tokens are refused, including open dashboard sessions on their next live identity check, using the existing ACL cache invalidation. Tokens without the claim mean epoch 0; never-enrolled accounts remain at 0 even on password changes to preserve the legacy rollout behavior. Password changes invalidate pending enrollment challenges regardless of epoch.
MFA policy is a validated in-memory snapshot loaded at boot, refreshed after dashboard config commits and every 30 seconds for external file changes. Reload failures retain the last good value and expose a degraded warning in mfa.overview.policy and system.status.mfa_policy; every edition with no valid snapshot ever loaded fails closed; an existing unreadable or corrupt policy store also refuses boot. A missing [auth] table or key retains the durable policy; new team provisioning records true explicitly. Login does not read or parse the file.
users.mfa_reset {user_id,code} refuses self-reset, verifies the acting Admin’s fresh TOTP or recovery code and current active Admin role in the reset transaction, clears the target’s factors/challenges, bumps its epoch and audits the action. Since v1.82 the Administrator-target rules below apply (duduclaw_auth::mfa::admin_reset). In every edition, human host operators can reset any account, including multiple Admins after key loss, with duduclaw ops users mfa-reset <email>. Both host recovery commands refuse AI-session markers and employee/untrusted Bash callers; audit identifies the operator as unverified. These guards do not provide OS isolation from arbitrary host file writes. Enrollment, proof/code issuance, disable, recovery use and verification failures are audited without codes or secrets.
users.mfa_reset refuses self-reset and decides and applies in one transaction (current active Admin role, active target, proof, factor clearing, epoch bump, audit). Proofs: {user_id,code} (fresh TOTP or unused recovery code); {user_id,password} (staff targets only); {user_id,password,send_email_code:true} then {user_id,reset_token,email_code} (an actor with no authenticator app: a six-digit code mailed to the actor’s own current address, hashed with its capability, bound to the target, five minutes, single use, Email-factor send budget). Administrator targets — role admin now or any admin_eligibility_log row in the last 7 days, so demote → reset → promote cannot skip the rules — refuse the password alone (MFA_RESET_SECOND_FACTOR_REQUIRED) and require the actor to be a qualifying Admin under the F6c2 rule (eligible continuously for the 7-day cooling window, not created or promoted inside it; MFA_RESET_COOLING, unreadable or inconsistent log MFA_RESET_ADMIN_LOG_UNAVAILABLE); a log younger than 7 days refuses every actor, so during the first 7 days of a fresh installation no Administrator can reset another Administrator’s MFA except through the host command duduclaw ops users mfa-reset <email>. Staff targets keep the password or factor confirmation and no window. The email path exists because check_factor accepts only TOTP and recovery codes and a first passkey enrollment issues no recovery codes. Refusals are {code,message} with a closed MFA_RESET_* set. Audit outbox. Every attempt gets a unique attempt_id and is owned by one gateway guard from the first gate on (role, users.db unavailable, policy store unreadable, no dashboard session, rate limit, the reset itself); its outcome row (attempt id, actor, target, proof kind, outcome allowed/refused/challenge_sent, reason, timestamp; never a password, code or token) goes into the users.db table mfa_reset_audit_outbox: in the reset transaction itself for a reset and every refusal decided there (a reset cannot commit without its row), as a held row in the transaction that mints an email confirmation code (released with the delivery outcome), and through a short dedicated insert for refusals decided before. If users.db is unavailable the event is appended to the security audit log directly. A drain delivers rows to the hash chain as mfa.admin_reset events (with attempt_id, attempted_at, interrupted for a held row left by a dead process) via try_append_audit_event and deletes each row only after its append succeeded; it runs after every attempt and at gateway start (only in the gateway-lock holder; held rows only then). Delivery is exactly once per attempt_id: a resend never creates a second audit record. The outbox is bounded at 1,000 rows; when full, attempts are refused before any proof is checked and the refusal is appended directly (attempts are already rate-limited per actor, and rows leave after every attempt, so the bound is only reached while the audit file cannot be written). After a reset the target is notified by SMTP email and by verified channel links (quiet hours respected); when no route delivers, auth_audit_log gets mfa.reset_notification_failed (route outcomes only), the security audit log gets the same event, and mfa.overview.reset_notice_failures lists it for 30 days. Human host operators can reset any account, including multiple Admins after key loss, with duduclaw ops users mfa-reset <email>. Both host recovery commands refuse AI-session markers and employee/untrusted Bash callers; audit identifies the operator as unverified. These guards do not provide OS isolation from arbitrary host file writes. Enrollment, proof/code issuance, disable, recovery use and verification failures are audited without codes or secrets.
MFA binding review: mfa.overview includes each account’s channel_bindings with verified_at, and policy enforced_at (Unix microseconds). Unknown historical binding times are null and cannot serve as enrollment proof. Every binding/rebinding records a new time. Under enforcement, an unenrolled account cannot self-bind: another active Admin or a host operator must approve. A binding planted before enforcement by someone already holding the password remains undetected. Read the short challenge_ref to the Admin; never share the enrollment bearer token. Admin codes are redeemed and deleted only for the matching user/challenge.
JWT epoch checks require exact equality. Dashboard sockets check epoch at every heartbeat; WebChat checks it at heartbeats and before messages using the shared identity reader and a two-second socket cache (heartbeats force a fresh generation check). Applicable expiry is checked independently on every message. Computer-view/takeover tickets retain the originating epoch and JWT expiry, reject retired credentials at admission and each 30-second revalidation, and never extend the JWT lifetime. Security-setting writers re-check the active Admin while holding the config write lock. A failed reload after a good false value stays false with a visible warning; normal system.status keeps its old fields.
Email codes, passkeys and keep me signed in (since v1.80.0)
Section titled “Email codes, passkeys and keep me signed in (since v1.80.0)”In Settings → Account, you can keep the existing authenticator app and add Email verification code or one or more named Passkeys. Enter your current password before adding or removing a method. Email setup sends a six-digit code to the account email; the factor is activated only after successful verification. Administrators must configure the existing [channels.email] SMTP sender (smtp_host, from_addr and, when required, SMTP credentials). Without a usable sender, the option is unavailable. Factor changes are audited and trigger an email notice when system email is configured.
After your password, choose an enrolled verification method; the last successful method is selected by default. Email codes expire in 10 minutes, are single-use and allow five attempts for a challenge. Resending is limited to once per minute and five times per account per hour. Passkeys use your device’s screen lock, biometric verification or a security key. Set [dashboard] public_url to the public dashboard URL and open that exact HTTPS origin; HTTP only works on localhost. Each passkey has a name and can be removed separately. Keep another method available if you lose access to your device. A first passkey enrollment does not issue recovery codes; existing authenticator recovery codes remain valid. First Email enrollment shows recovery codes once, and you must acknowledge saving them before continuing.
Enforcement accepts any enrolled method and refuses removing the last one. Existing authenticator enrollments and recovery codes do not need migration by the user. Under enforced MFA, first Email enrollment requires the same independent channel/Admin proof (or an eligible first-Administrator setup code) as authenticator and passkey enrollment. Submit the enrollment proof as proof_code before an Email code is sent; mailbox access alone is insufficient. The proof is rechecked in the transaction that activates the factor and issues session tokens. Expired, reused or unverified proofs and changed credentials are refused. Adding Email from an already MFA-verified session needs no independent enrollment code; voluntary enrollment with enforcement off is unchanged. Google sign-in still cannot use Email as a second factor. Channel-code-first enrollment also requires the current password. An Admin reset clears every factor and remembered device. The acting Admin can confirm with their current password or a fresh authenticator/recovery code; password confirmation also supports Admins who use only passkeys.
Pending Email enrollment started before this upgrade must be restarted because its proof has no credential-epoch snapshot.
The login checkbox Keep me signed in is unchecked by default. Checking it uses a rotating browser cookie with a default sliding lifetime of 180 days: each successful refresh resets expiry to that use plus the current number of days. In Security → Keep me signed in, an Admin can save an integer from 1 to 365 (default 180). The policy is stored durably in users.db; missing or invalid reads fall back to 180, never unlimited. Changes leave existing expiry dates intact until the next successful renewal, which sets expiry to last use plus the new value, including when shortened. The prototype [auth] remember_days setting is no longer read. Leaving the box unchecked keeps the existing session behavior. Signed-in devices in account settings shows remembered devices, their creation and last-use dates and the recorded IP, with individual revocation and Sign out everywhere. Password changes, factor changes/reset, account status or role changes and deletion revoke remembered sessions. Signing out revokes the current device.
An Admin can open Users → Edit user and confirm Logout from all devices to revoke all ordinary and remembered sessions for that account. Disabling or removing the person also revokes sessions. Existing access tokens are rejected and open sockets stop at their existing live revocation checks (including the next heartbeat); there is no wait for the 180-day expiry. The Admin-only RPCs sessions.policy, sessions.policy_update and users.revoke_sessions recheck current authority; mutations record actor, target and outcome without credentials in the auth audit log.
Cookie-authenticated session requests require X-DuDuClaw-CSRF: 1 and an exact Origin match, including scheme and effective port. Built-in HTTP loopback origins use the gateway’s listening port; reverse proxies must list their complete https://host[:port] Origin in [gateway] allowed_origins (or DUDUCLAW_ALLOWED_ORIGINS). Bare host entries are insufficient for these endpoints. Refresh and logout reject cross-port pages and ordinary HTML forms before changing a session.
Refresh uses an authenticated family generation, with one current token hash per family; authentic older generations revoke the family, while forged generations cannot revoke it. The separate owner-only users.remember-key signing key must be backed up and restored together with users.db; a missing key with generation sessions or an invalid key fails closed. Prototype sessions created before generation support are revoked on migration. Each account may retain at most 20 active devices and 100 total family records, including revoked devices. At the retained-record limit, use ordinary sign-in until records expire. Records are pruned on the next successful remembered sign-in after their most recently renewed expiry plus seven days. Account-authenticated dashboard and WebChat sockets have a maximum 24-hour lifetime and reconnect to authenticate again; existing shorter MFA expiry checks still apply. This bound prevents old sockets from surviving the revocation-retention window.
The persistent credential is not available to JavaScript or stored in localStorage: the cookie is HttpOnly, SameSite=Strict, scoped to /api/session and Secure on HTTPS. The server stores only hashes, rotates on use and revokes a family on reuse of an older credential. Cookie endpoints check Origin; dashboard WebSocket upgrades also validate Origin.
Acceptance remains pending for real SMTP delivery, browser/platform passkey registration and login, cross-platform Rust builds, dependency audit and full gateway integration tests. UI code and written tests alone do not establish those results.
Dashboard two-factor login
Section titled “Dashboard two-factor login”In Settings → Account, Enterprise users, and Personal users under enforcement, can choose Set up two-factor login, enter their current password, scan the QR code (or manually enter the secret) in an authenticator app, and confirm a six-digit code. Save the ten recovery codes by copying or downloading them, then check I saved my recovery codes to continue. The secret and recovery codes stay in component memory and disappear when you leave; downloading or copying is an explicit user action. Enrollment and disabling MFA replace this session’s tokens and keep its connection open; other sessions are retired. The recovery codes remain on screen until you confirm they are saved or leave the page. Token issuance and the MFA change commit together; an issuance failure leaves enrollment or disabling unapplied and can be retried. Replacing recovery codes and disabling MFA require a fresh authenticator code or unused recovery code. Enforcement prevents disabling MFA. In Settings → Account, Enterprise users can choose Set up two-factor login, enter their current password, scan the QR code (or manually enter the secret) in an authenticator app, and confirm a six-digit code. Save the ten recovery codes by copying or downloading them, then check I saved my recovery codes to continue. The secret and recovery codes stay in component memory and disappear when you leave; downloading or copying is an explicit user action. Enrollment and disabling MFA replace this session’s tokens and keep its connection open; other sessions are retired. The recovery codes remain on screen until you confirm they are saved or leave the page. Token issuance and the MFA change commit together; an issuance failure leaves enrollment or disabling unapplied and can be retried. Replacing recovery codes and disabling MFA require a fresh authenticator code or unused recovery code. Enforcement prevents removing the last enrolled factor.
Password and channel-code login keep the original form until the gateway requests a second factor. Use an authenticator code or switch to a single-use recovery code. A TOTP login challenge lasts five minutes and allows at most five attempts. Required enrollment asks for the independent channel/Admin code and current password (required for channel-first login); give only the displayed enrollment reference to the Admin, never the enrollment token.
Admins use Users → Two-factor login management to review enrollment and channel verification times, reset another account with their own fresh factor, or issue a code for a user’s pending enrollment reference. Self-reset and self-issuance are unavailable. The enforcement switch shows how many accounts lack enrollment, warns of blocked sign-ins, and requires typing the displayed confirmation phrase. Degraded policy reloads show a warning and disable the switch. New team installs start with enforcement on. For existing installs that still have it off, verify enrollment, channel delivery and host recovery before an Admin enables it. Personal shows account MFA settings when enrollment is required or the account is already enrolled; unenrolled accounts with enforcement off still hide them. Under enforced Personal, Admins can reach the same management panel and deliberate policy toggle from System → Security → Two-factor login management. Host recovery with duduclaw ops users mfa-reset <email> remains available in every edition and does not turn the policy off.
Admins use Users → Two-factor login management to review enrollment and channel verification times, reset another account with their own fresh factor, or issue a code for a user’s pending enrollment reference. Self-reset and self-issuance are unavailable. The enforcement switch shows how many accounts lack enrollment, warns of blocked sign-ins, and requires typing the displayed confirmation phrase. Degraded policy reloads show a warning and disable the switch. New team installs start with enforcement on. For existing installs that still have it off, verify enrollment, channel delivery and host recovery before an Admin enables it. Personal supports voluntary enrollment; local auto-login remains unchanged.
The calling connection now receives new tokens with the successful enrollment/disable response and is rebound before the normal send gate runs. HTTP enrollment also issues its tokens before the enrollment transaction commits. Release acceptance still requires live browser/WebSocket verification, including keeping codes visible beyond a heartbeat and retiring another session; in-process handler and frontend tests do not establish that acceptance.
Third-party MCP environment credentials
Section titled “Third-party MCP environment credentials”Third-party MCP keys leave the employee’s config files. .mcp.json stores secret://mcp/<server>/<ENV_NAME> references; values are encrypted in <home>/secrets/mcp/<agent_id>.enc with the existing .keyfile. All third-party env entries use the store except PATH, HOME, NODE_ENV, LOG_LEVEL and existing secret:// references. DuDuClaw’s own server entry and its DUDUCLAW_* variables are unchanged.
A built-in entry must use exactly duduclaw, duduclaw-pro or the current instance key, with the host-generated command and arguments; duduclaw-evil is a third-party server. Raw proxy entries and proxy-private environment fields are refused at spawn. Identity-bearing built-ins must match the complete host-generated definition. Secret reads require a valid DUDUCLAW_AGENT_TOKEN HMAC for the store owner, even with lenient delegation settings; a default agent cannot authorize a read.
The proxy resolves references for its own employee only, immediately before starting the upstream server. Missing, invalid or undecryptable references prevent that server from starting; the error names the server and variable, never the value. A config requiring secret resolution cannot fall back to direct Claude/Grok loading if proxy rewriting fails. Exports retain environment names with empty placeholders, so the importer must enter values again.
At gateway boot, legacy literal env values are migrated after an encrypted backup is saved to <home>/backups/mcp-migrate/<agent>-<timestamp>.enc. The encrypted store is written and read back before the config is replaced atomically. Every stage waits for a parent-directory fsync barrier in this order: key, encrypted backup, store, config. A failed stage aborts that employee; failure after config replacement restores the original bytes. If restoration also fails, the error is reported and the durable encrypted backup is retained for recovery. Migration continues with other employees; at most three migration backups are retained per employee after cleanup; an I/O failure is logged and cleanup is retried on the next sweep. Deleting a server or employee removes its store entries. Restoring a deleted employee requires re-entering its keys.
The Read guard denies <home>/secrets. This is not isolation from Bash: an employee running under the same OS user can still read gateway files, including .keyfile; real isolation requires no Bash or the task sandbox. Only env is covered: keys in args or url, and tool results that echo a key, are not covered. Existing plaintext exports and backups are not retroactively cleaned.
Website login credentials
Section titled “Website login credentials”Administrators manage website credentials in System → Security through website_credentials.list, .upsert and .delete. Upsert accepts a canonicalized HTTPS login_url instead of an origin, plus optional allowed_paths for exact same-origin second-step paths (default empty); origin and login path are derived from the URL. The list omits passwords. Records are encrypted with CryptoEngine and the gateway’s .keyfile in <home>/secrets/website_credentials.enc; writes are atomic, owner-only (0600), and file-locked. Listing, login lookup and every mutation require all existing records to decrypt and validate. Any failure returns unavailable and leaves the credential file unchanged, including legacy origin-only records. Management audits contain no credential values; outer ACL refusals are audited without parameters, and delete results distinguish deleted, noop and refused. Each login use records credential id, employee, origin and status.
computer_login accepts only a label. The gateway rechecks the verified employee against the record’s non-empty allowed_agents list and applies its own distinct tool and session gates. It first navigates to the saved login URL through the existing navigation checks. Secrets travel to the container helper over stdin, never command-line arguments or model results. The helper requires the exact origin and login path before filling; only a visible-password second step reached after the helper submits step one may use allowed_paths. It requires effective POST before filling, after synchronous input/change events and after submit handlers, including the selected submitter’s formmethod for native requestSubmit and fallback paths. The network guard also refuses non-POST requests with a decoded query value equal to the complete username or password. CDP Fetch interception aborts every request or redirect hop outside the exact credential origin, and the login bypasses service workers. Before removing interception, the helper tracks Network.requestWillBeSent, Network.loadingFinished and Network.loadingFailed to confirm requests have ended. It waits for at most three seconds and requires two quiet command barriers with no pending requests. If completion cannot be confirmed, it returns failed_uncleared and calls Browser.close while the Fetch fence is still active; the gateway then removes the session and container. Screenshots are suppressed during the call. If cleanup cannot be confirmed, the gateway stops and removes the session and container and requires a new session.
This protection does not hide a filled field from JavaScript on the same origin. It also does not provide filesystem isolation against a process with the gateway OS user’s privileges or replace the network allowlist. Only the saved HTTPS origin and permitted login paths may receive the login; localhost also requires HTTPS. 2FA and captchas need a person through the existing takeover flow. Rebuild the computer-use image to install duduclaw-fill-login. See Browser automation for result semantics and setup.
Administrator setup and migration review (planned for a later release)
Section titled “Administrator setup and migration review (planned for a later release)”These parts belong to the native Linux isolation migration and are not available in the current release. First-administrator setup links are issued only by that migration (the loopback page /api/migration/setup); ordinary installations do not use setup links, so the rules below do not change them.
Administrator setup links expire after 30 minutes. Issuing a new link invalidates previous links. Claiming a first-administrator link, checking that no user exists, creating the account and consuming all setup links now share one SQLite transaction. Recovery links remain a separate, explicitly issued purpose. Claims are limited to five per minute; twenty failed attempts invalidate the current link. Existing setup links without a purpose binding are invalidated when the authentication database is upgraded.
The System → Migration review page requires a live administrator session. Password plus an enrolled authenticator code authorizes changes for five minutes; the CSRF token is bound to that session and credential epoch. Review supports individual approval, rejection and retry, atomic bulk approval of low-risk proposals, and atomic rejection of pending proposals. Department, invitation-only user, selected configuration, delegation-policy and budget writers publish through product APIs and read back their effects. Retained API-key account credentials can be replaced on the page; only a verified write clears the rotation obligation. Unsupported categories remain blocked. Proposal approval is separate from application and root completion: native Linux migration still needs cross-service integration and does not yet establish an isolation guarantee.
The importer now has a DynamicUser launcher and an exclusive import-only gateway startup. Old accounts and MCP configuration enter the review list without activation. Confirmed stdio MCP changes and employee instruction files use product validation, publication and readback; credential-bearing or unsupported proposals require re-entry or remain blocked. Content for unconfirmed employees remains archived. These components still need the signed platform adapter and Linux end-to-end acceptance before a full upgrade is available.
Skill, hook and selected policy changes also use product validation and operation-bound readback. Compensation refuses files or departments replaced by ordinary edits. Old approvals are expired. Telegram bindings, time schedules and database read-only grants additionally require verified Shared employee allocation; those integrations are still blocked without the isolation platform.
The migration review now inventories workflow revisions, automation rules and pending reminders individually; these require fresh setup before activation. Employee action rules remain separate policy decisions. Credentials embedded in URL fragments are masked along with query and userinfo credentials.
Native Linux terminal integration (development, not enabled for existing installations). Protected terminal runs now have a backend path for a per-run terminal, initial dimensions set before program startup, later terminal-size changes and byte streaming. Idle time is measured by the root service from successful gateway-side terminal transfers; status checks and resizing do not keep a run alive. Cancellation retains the employee lease until the service, process group and employee processes have retired. Signed runtime configuration, authenticated product ingress and native Linux acceptance remain required; this is not completed Grok/provider or employee-isolation acceptance.
Protected Linux web-tool integration (not yet enabled)
Section titled “Protected Linux web-tool integration (not yet enabled)”The native isolation adapter prepares HTML extraction from a real host-owned file descriptor and passes it to the isolated parser. Fetching and cache policy stay on the host. Protected requests recheck the signed URL origin, disable redirects and environment proxies, and use a separate bounded cache that checks the exact URL. Fetch and extraction share a gateway-wide limit of 10 requests per minute, including cache hits. Meeting upload links, job status/cancellation and pure inference routing use the existing host handlers; they do not create parser inputs. Skill, media and knowledge-source producers remain incomplete, and the composite boot gate still refuses protected execution. These source changes do not establish deployed isolation or native Linux acceptance.
The second integration round adds fd-backed skill scanning, extraction, adoption into the caller’s own skills and manual graduation, plus isolated WAV/MP3 structure inspection around host transcription/TTS providers. Skill extraction shares its pure rules with the legacy path; returned page paths and links are checked before the original wiki publication APIs run. Shared adoption does not update shared usage metadata. Existing destination skills are never overwritten. Cloud credentials remain on the host; local/command TTS stays unavailable here and generated audio is capped at 128 KiB. Knowledge text/URL proposals retain human approval; protected file proposals remain refused until descriptor-based staging is connected. Recording distillation, synthesis, hub installation, curator mutation and meeting-media processing are still missing. No full gateway/CLI build, native execution or live-provider acceptance is claimed.
The third integration round adds host-controlled recording distillation with real HAR/action/event snapshots parsed in E and model output scanned in E before the existing pending-approval draft flow. Recording URL credentials, fragments and query values are removed or replaced before model submission; ordinary recorded screen text is not guaranteed secret-free. Hub installation supports only the configured official pinned source, with bounded fetch, E YAML validation/scanning, existing install approval, locked trust rechecks and new-file publication/readback. Protected meeting jobs inspect actual WAV/MP3 snapshots in E and keep provider credentials, cancellation, accounting and transcript publication on the host; the current subset refuses recordings over 25 MiB or 30 minutes and does not invoke host ffmpeg/ffprobe. Synthesis supports isolated event parsing for previews only. Full synthesis and curator mutation remain unavailable, their producer manifest entries remain missing, and the overall E readiness gate stays pending. These are unenabled integration changes, not a complete product build or native/provider acceptance.
The fourth integration round supersedes the synthesis/curator limitations above. Protected full synthesis now reuses the exact staged model result and its generation time, parses YAML and prepares/scans the effective skill in E, then requests a dashboard-only Admin approval bound to its bytes and target. The host publishes a new global skill without overwriting an existing destination and records a publication receipt. Automatic curator staleness, archive moves and wiki reports have since been removed. [skill_curator] has no effect. Startup recovery never overwrites existing destinations. Linux and macOS restore flat global and agent skills in both modes through directory descriptors, publishing only bytes read from the opened regular file. A replaced archive dirent is retained. Other platforms retain archives for manual recovery. E readiness now requires an explicit installed launcher, healthy host composition and fresh authenticated generation evidence. Other composite gates stay in force. This remains unenabled source integration, without full gateway/CLI build, native/provider or approval/publication acceptance.
General self-update file replacement
Section titled “General self-update file replacement”After the existing signature and executable checks, Unix self-update preserves the old executable with a hard link or synced copy, flushes the same-directory staging file, replaces the install path with one rename, and syncs the directory. Rollback also replaces the path in one rename; its independent recovery copy remains until the rollback directory sync succeeds. Windows uses native replacement APIs with a backup; the running-executable rename-aside fallback recovers reported failures but has a crash window between moves. Mapped old images that cannot yet be deleted use fixed backup names and are reclaimed on the next update after process exit; if still locked, the update refuses to proceed. A rollback failure reports the retained recovery path. These are durability protections, not isolation from a process with write access to the install directory. Protected Linux service and desktop installers are separate. See Deployment guide.
Conversation history attachment protection
Section titled “Conversation history attachment protection”The history attachment endpoint rechecks current account, employee, conversation and artifact audience permissions. An attachment reference never grants arbitrary path access. On Unix, descriptor-relative no-follow reads reject symlinks, traversal and multiply linked files. Upload names use random UUIDs and exclusive creation (create_new with O_NOFOLLOW on Unix), preventing same-name concurrent uploads from overwriting another user’s bytes.
Authorization applies to a bounded snapshot of the already-open file: its SHA-256 hash must match durable artifact provenance and any required workflow receipt before those bytes are returned. A later pathname replacement cannot change the response. Restricted reads deny legacy provenance without a content hash; existing Admin/full-history access rules for legacy files remain. This is not isolation against a process that can rewrite the gateway’s files and ledger under the same OS account. Windows and other non-Unix systems refuse the endpoint.
Resource limits apply before expensive work and while reading:
| Operation | Limit |
|---|---|
| History database read | Newest rows selected with SQL LIMIT; at most 1 MiB per message and 2 MiB of message text per response |
| Attachment projection | One durable authorization index per request; indexed archive/source lookups; at most 256 references inspected and 32 attachments returned |
| History admission | Two concurrent requests and 30 requests per minute per user; four concurrent requests globally; blocking work runs under a semaphore |
| Download admission | Two concurrent requests per user, four globally; 120 MiB per user per minute, reserved by the request’s maximum size |
| File read | Opened-file metadata and take(max + 1) bounded snapshot; 20 MiB download or 2 MiB preview |
| Attachment handles | Separate 512-entry per-user LRU cache; global capacity exhaustion refuses issuance, never returns a dead handle |
Responses include Content-Length, use identity encoding and retain nosniff, sandbox CSP and private/no-store caching. The browser refuses missing, invalid or excessive lengths, bounds streamed reads, and rejects length mismatches. It does not automatically fetch image previews above 2 MiB. File types that may execute content remain download-only. Reloading history refreshes expired or evicted handles when capacity is available.
Native platform behavior and live browser/download acceptance have not been verified; frontend unit tests alone do not establish those outcomes. See office document suite.
WebChat validates the complete upload batch before writing files or dispatching a turn: at most 8 attachments and 20 MiB of decoded data, filenames up to 255 bytes and MIME labels up to 128 bytes. WebSocket messages and frames are capped at 28 MiB; a bounded attachment parser rejects excessive counts before constructing the attachment vector. Invalid base64 or an exceeded limit rejects the whole batch. Per-user admission allows 8 batches, 32 files and 80 MiB per minute. Durable reservations cap new uploads at 512 MiB / 2,048 files per user and 4 GiB / 16,384 files globally. Empty files still consume file quota. Failed or interrupted reservations remain charged; manually deleting a file does not restore this quota automatically.
Download responses have a 30-second total deadline. An independent timer releases the snapshot and admission permits even when the client never consumes the body. The transport receives copied chunks of at most 64 KiB, so a held chunk cannot retain the whole snapshot. Expired responses fail; retrying requires a new authorized request and consumes its normal budget.
Historical attachment authorization uses an indexed durable SQLite store for archive name, owner, content hash, size and source path. Rotating or truncating the display/audit JSONL no longer removes existing authorization records. Database failures refuse restricted access, and WebChat uploads must save their authorization record before reporting success. Legacy files without a trustworthy content binding remain unavailable to restricted readers.
On first use, the store imports the retained previous and current audit files in one transaction, with a combined 32 MiB limit and 64 KiB per row. Unreadable, malformed or oversized input aborts migration without partial grants; repair the retained records before retrying. Records already discarded by older rotations cannot be reconstructed automatically. Later audit edits do not overwrite the imported authority store.
Attachment writes on Unix open every directory component without following symlinks and create files relative to a pinned directory handle. The provenance and quota databases require a real parent directory owned by the gateway user, with no group or other write permission; main files and existing journal/WAL/SHM files must be regular, single-link files owned by that user. SQLite also opens with SQLITE_OPEN_NOFOLLOW, and new databases are mode 0600. Every database ancestor up to / must be owned by the effective user or root and must not be group/other writable. A writable root-owned sticky directory is allowed only when its next component belongs to the effective user. The home is canonicalized once for macOS system root aliases (/var, /tmp, /etc); other home symlinks are refused. Attachment paths still require real directory components. Newly created homes use 0700; existing modes are preserved. CLI and dashboard doctor warn about writable homes and show an operator-run chmod 700 command. Platforms without these operations refuse attachment access and uploads. Generated attachment labels neutralize Markdown delimiters and line breaks; malformed legacy references are removed conservatively to avoid exposing host paths.
Member creation and first-login progress (v1.80.0)
Section titled “Member creation and first-login progress (v1.80.0)”users.create_members and invitation.get/update/preview have explicit Admin scope entries and recheck the live account. Member creation and invitation-copy writes check credential epoch inside their write transactions. Each member’s account, bindings, primary preference, optional invite, progress and audit entry commit together. SMTP is outside that transaction; failed delivery does not remove an account. Copy and resend remain Admin actions. The invitation renderer escapes all administrator text, permits only bold and line breaks, and validates optional course links as HTTPS with no embedded credentials. Previews issue no tokens. onboarding.get/update always uses the caller’s current user ID and credential epoch; a supplied target ID is rejected on update. Connections are observed from server records. Checklist completion grants no authority. See the guide.
Unknown methods in the invitation/onboarding and member-creation RPC namespaces require Admin before core dispatch and never reach extensions. Primary writes and reads require a direct Owner/Operator binding; Dashboard chat candidates and resumed targets reject Viewer-only access. Invitation links and optional course URLs require HTTPS without userinfo, even on localhost. Mail header fields have control characters removed.
AG-UI external frontends
Section titled “AG-UI external frontends”The AG-UI HTTP/SSE endpoint accepts dashboard access JWTs only. It reuses live account/MFA checks and WebChat employee authorization; non-Admin callers require a binding or effective team grant and cannot reach the main/default employee. Caller, employee and thread are separated in server-owned session keys within a dedicated AG-UI segment of the WebChat owner namespace; /ws/chat refuses to resume them. Only the latest user text enters the existing guarded reply pipeline; client history, tools, context, state and forwarded properties cannot add authority or execute client-defined tools.
Approval interrupts are correlated through the broker’s persisted conversation/turn origins. Resume can decide only ordinary unbound mcp_call or mcp_install records for an active Admin, after expiry, ownership, dashboard-only and forbid_self_approval checks. Other kinds remain informational and dashboard-only records cannot be decided here. Display metadata is never a credential. Pending work is bounded by body, concurrency, lifetime and event-buffer limits; disconnect cancels active delivery and withdraws that turn’s pending approvals. A successfully delivered interrupt retains the turn only within its lifetime. Approval records survive restart; the in-memory runtime continuation does not. The SQLite admission journal prevents duplicate run IDs for 24 hours and caps retained records at 4,096. After restart, an unfinished thread remains fenced until the original 15-minute deadline; its next new run must withdraw old pending approvals first. In-process resume receipts do not rerun tools or prove execution success.
Resume decisions now commit atomically: any conflicting card rolls back the entire request. Externally approved or denied cards can be acknowledged with the matching result on a new connection by a caller who still has employee access, including non-Admins; the original request and turn origin are rechecked and the external decider is preserved. Unknown orphan resumes allocate no journal rows. Persistent per-account limits allow at most 256 retained run/thread rows and 32 admissions per rolling 60 seconds across employees and threads, including receipt requests; exceeding either returns HTTP 429. Unknown JSON fields log only their count at debug level, at most once per minute per gateway process; neither names nor values enter the log.
Enterprise compliance report exports
Section titled “Enterprise compliance report exports”An active Enterprise Admin can generate CSV, XLSX and printable HTML under Audit Logs → Compliance report. The gateway checks live Admin authority and the resolved edition, defaults to personal-data masking, and requires an explicit option for unmasked source values. Every export is audited before delivery; audit failure refuses the report. Reports cover only recorded outbound-gate decisions, approvals, action reviews and data-source accesses. A decision is not a delivery receipt, a missing field stays blank, and a zero count does not prove there was no access. Downloaded copies follow the organization’s retention policy. See Enterprise compliance reports for date boundaries, limits and masking coverage.
Report readers and audit writers share a cross-process lock across rotation and append, so a rotation during export cannot omit the live generation. Both retained tool-audit segments are verified from the same bounded snapshots used for the report; a broken hash chain, malformed record or read/lock failure refuses the export. Valid legacy prefixes remain readable but are not independently authenticated. Hash chains cannot prove tail completeness or authenticity against an external anchor.
Personal Drive recording imports
Section titled “Personal Drive recording imports”The Enterprise meeting page accepts imports only from an authenticated dashboard account using its own personal Google connection, after explicit file selection and confirmation. Employee MCP tokens and public upload links cannot call this route; no Drive-browsing or import MCP tool is added. The selected employee must pass the existing live upload authorization, tool, approval, outgoing-data and privacy gates. Checks that require an additional approval still refuse dashboard import.
Drive/Meet consent is incremental: https://www.googleapis.com/auth/drive.file and https://www.googleapis.com/auth/meetings.space.readonly are requested only when the person enables recording access. The initial personal connection does not request Drive/Meet scopes. Existing wider grants remain until revoked. A separate Enable employee Drive tools consent can add https://www.googleapis.com/auth/drive.readonly for existing employee tools and Google remote MCP; their employee-consent and role gates remain in force. Recording import does not require that broader option. Google Picker handles files not previously shared with the app; drive.file itself also permits writes to selected files, but this importer issues only GET requests. The browser requests a separate short-lived Picker token limited to drive.file, without including prior scopes, and does not persist it. Gateway credentials stay in the protected personal vault.
The gateway validates file IDs and requires Drive isAppAuthorized=true even for older broad grants. That Google flag can reflect a previous app authorization; it does not prove a current Picker click. Imports additionally require the user/employee/file confirmation receipt described below. Requests use fixed official Google API endpoints and refuse redirects. It bounds metadata responses, streams media through the existing upload chunks, and enforces the same byte, staging and duration limits. Connection ownership, granted scopes and local authorization are rechecked during transfer and before job admission. Disconnect or detected revocation stops further access. Local provenance links the upload to the selecting user, Google account, Drive file ID and file version; audits hash identifiers and omit tokens, file content and sensitive names.
The gateway records local consent separately for basic services, meeting recordings and employee Drive tools, and binds it to the sealed credential and its authority record. A capability needs both the provider scope and the matching local purpose consent. Extra drive.readonly returned during meeting consent cannot enable employee Drive tools. An ordinary credential containing full drive scope is refused and requires reconnection. Additional-service consent uses include_granted_scopes=false and explicitly requests the already-consented ordinary services together with the added service, so Google may show their permissions again. It preserves earlier local purposes and must retain every previously held provider scope; publication also checks the original credential revision. Missing scopes or a concurrent credential change leave the old credential unchanged. Records without local purpose consent require reconnection. Reconnecting basic services resets local purposes to basic services, so recording access and employee Drive tools must then be enabled separately again.
Every import requires a server-issued confirmation receipt. It proves that a dashboard user authenticated by JWT explicitly registered and confirmed this exact Drive file ID for this exact receiving employee within the last five minutes. Employee/MCP tokens cannot register it. The receipt is single use and bound to that user, employee and file ID; a new confirmation for the same user and employee replaces the previous receipt. The dashboard registers the file only when the user confirms the import. Missing, expired, reused or mismatched receipts are rejected. An admitted import attempt consumes the receipt even if later checks fail, so retry with a new confirmation. The server additionally checks Drive metadata for isAppAuthorized=true under that user’s Google connection. Neither the receipt nor this Google flag proves a click in Google Picker: a dashboard caller can explicitly confirm a previously app-authorized file by its known ID.
The dashboard-only POST /api/meeting-drive/selection requires agent_id, file_id and confirm: true, and returns selection_receipt with expires_in. Registration is limited to 20 requests per user per minute, with at most eight unexpired receipts per user. POST /api/meeting-drive/import must submit that receipt.
google_status reads account, status and purpose-filtered scope metadata only: it does not unseal credentials, refresh tokens or return a bearer. The token endpoint accepts an explicit tool allowlist and requires both the matching local purpose and provider scope for personal credentials; status requests and unknown tools cannot obtain a bearer.
The local Drive source record contains the selecting account, Google email, file ID and version. Cancellation, failure and upload expiry remove this record in the same database transaction as the corresponding state change. Other source records, including successful imports, have a 30-day retention period from imported_at, then are removed by the existing cleanup sweep every 60 seconds while the gateway is running; after downtime, cleanup occurs on the next sweep. Transcript files and audit logs have separate retention rules and are not deleted by this source-metadata cleanup.
user.google_connect audits include the consent purpose, a digest of the returned scope set and unexpected scopes. Drive/Meet list reads and early refusals are also audited. These events omit tokens and file contents; import identifiers are hashed.
Imported copies and completed transcripts are separate from the Google connection and are not recalled by disconnecting. A provider-side revocation is detected through failed Google access or refreshed scope information, not an instantaneous push. This is product-route authorization, not OS isolation from an unrestricted process running as the gateway user. Real OAuth/Picker behavior and provider processing require separate acceptance. See Meeting transcripts and personal connection setup.
Employee automation and recent-skill access (v1.80.0)
Section titled “Employee automation and recent-skill access (v1.80.0)”Dashboard RPC minimum roles are enforced by a dedicated role table before extension dispatch, separately from the MCP tool scope table. It registers this surface explicitly; unknown cron.*, reminders.*, assign_schedules.*, agents.org_chart.* and skills.recent.* methods require Admin. Other existing namespaces retain their existing dispatch gates. Record handlers still enforce Viewer/Operator and ownership checks. Account status and direct bindings are refreshed for each request. A failed authorization read denies access.
| Dashboard RPC | Scope |
|---|---|
agents.org_chart |
Admin sees all listable agents. Other accounts see direct Viewer-or-higher bindings and agents in their own current users.db department; reports_to ancestors outside that scope contain only name and role. Hidden agents stay hidden; no contact details or capabilities, and no grant of agent actions. |
skills.recent |
Current account only; up to five unique, currently callable, enabled skills that pass the existing skill checks. No client-supplied user identity. |
cron.list |
Admin retains all records; other accounts see records they created or records for directly bound AI staff (Viewer or higher). |
cron.add, cron.update, cron.resume, cron.run_now |
Non-Admin time-based prompt schedules require direct Operator access to the target. Main-agent, machine-employee and execution-principal checks remain enforced. |
cron.pause, cron.remove |
Creator or direct Operator; workflow-linked records remain protected. |
cron.templates |
Authenticated accounts may read the built-in templates. |
reminders.list, reminders.cancel |
Own reminders or direct bindings: Viewer reads, Operator cancels. No client-selected notification routing or reminder creation is exposed. |
assign_schedules.list (scope: accessible), assign_schedules.pause, assign_schedules.resume, assign_schedules.remove |
Creator or directly bound target (Viewer for reading, Operator for changes); resuming also rechecks the original creator. |
Recent-skill history stores account, target agent and skill names, with at most 100 entries per account; it stores neither message text nor skill contents. History is recorded after accepted submission, not when a chip is clicked, and does not prove execution success. The chart’s structural visibility does not widen access to conversations or settings. Employee automation editing does not grant shell commands, condition scripts, arbitrary notification destinations or workflow management. Legacy records without a verified creator are visible through existing bindings only.
Cron admission is a shared store invariant for every row carrying on_behalf_of, created_by_user_id or scoped_by_user_id, including MCP insert, update and resume. Checks and writes share a BEGIN IMMEDIATE transaction: at most 20 enabled schedules per attributed person and 50 per agent (including existing Admin jobs). Dashboard and MCP rows count together. Each person may create or newly adopt 20 jobs per rolling hour; receipts survive deletion and restart. Ordinary edits do not consume another creation receipt. Exact pause and removal remain available. Unmarked Admin-created rows retain their behavior; a human-origin MCP row is bounded even when its principal is an Admin. All time-of-day slots, including midnight, must be at least 15 minutes apart, conservatively treating selected days as consecutive. Scheduler reload and fresh dispatch checks skip invalid scoped schedules and log counts only; the row records last_status = skipped with a fixed reason in last_error, written once rather than on every tick.
Employee cron.run_now admits before spawning: 3 accepted runs per row and 10 per user in a sliding 10-minute window, at most 2 outstanding per user and 4 globally. A nonblocking semaphore acquisition returns a busy error instead of creating a queued task. Failed admission consumes no receipt; accepted attempts count even if execution later fails. Completion, cancellation and panic release outstanding reservations. Admission state is bounded, process-local and resets on gateway restart; an unavailable/poisoned lock fails closed. Employee cron expressions are capped at 256 bytes before normalization/parsing, including store/runtime validation.
Non-Admin add/update scans the complete resulting name + task model prompt with scan_input_with_audit and the chat threshold, rejecting before persistence and writing security_audit.jsonl; resume/manual run also scans legacy task text. Agent retargeting stays forbidden. H2 uses the restricted-host option: employee creation, edits, resume and manual execution require an existing agent with [container] sandbox_enabled = false. Both the registry and effective on-disk typed configuration must allow it; unreadable configuration is refused. Stored created_by_user_id / scoped_by_user_id and manual caller identity trigger rechecks at execution, including just before invocation. A sandbox-enabled or unavailable target pauses the job and records a skipped outcome. The existing host runner retains the agent’s runtime settings, capabilities and native sandbox configuration; this change does not implement containerized cron. Existing unmarked Admin jobs retain host execution. As with normal runtime setup, configuration reads are not an atomic lock spanning a process launch.
Employee cron uses UTC (also accepts zero-offset UTC/GMT aliases) or an IANA timezone whose UTC offset stays the same over the next two years, such as Asia/Taipei; with a constant offset, clock-time gaps equal elapsed time, so the 15-minute proof holds. A timezone with daylight saving or another offset change is refused on create, edit, resume or manual run, and the scheduler skips it, because DST can compress clock-time gaps. Such records remain readable and authorized users can pause/remove them; Admin manages other timezone schedules and must change a skipped one to UTC or a timezone without daylight saving.
New schedules without an explicit timezone use the company time zone; when it is unset or invalid they use UTC. Member-created routines use UTC with a notice if the company time zone observes daylight saving. Existing schedules are unchanged.
Wiki path and policy checks
Section titled “Wiki path and policy checks”Page quarantine and auto-page visibility use the resolved on-disk filename. Equivalent spellings cannot bypass reserved-file redaction or write protection; ambiguous matches are refused. Page and policy reads use no-follow opens and validate the opened handle on Unix and Windows. Both writers refuse linked control files, including broken links, and scanning refuses linked roots and skips internal links.
The shared root-policy loader caps .scope.toml at 64 KB and rejects malformed content and wrong field types. Load failures deny the affected access, including dashboard reads; a missing policy retains its previous meaning. Simulation grounding stops on a policy load error and recognizes agent_allowlist as protected. CLI doctor and the dashboard system check report policy errors and warn about ignored nested policies. See Wiki knowledge layer for scanning and recovery behavior.
Personal member API keys (1.85.0)
Section titled “Personal member API keys (1.85.0)”External member applications can call from their own server using a personal
ddc_member_ key instead of renewing a browser access token every 30 minutes.
Administrators enable the feature in My account → External access; it is off
by default. Members create up to five keys with a required 1–365 day expiration
(default 90 days). Accounts with MFA must complete fresh step-up verification.
Admin accounts cannot create member keys.
The plaintext is shown once, and only SHA-256 is stored. Keys inherit the member’s live role and bindings, are restricted to the member contract, and cannot manage credentials, passwords, email, MFA, sessions or configuration. They never grant Admin access. Revocation, expiry, offboarding, password changes and MFA resets invalidate them, including existing connections on their next call or heartbeat. Each key is rate limited (120 calls/minute by default). Creation, revocation and write calls are audited; repeated use is aggregated.
Do not put this key in browser front-end code; call from your server. See the member API authentication reference for transport examples and the precise method restrictions.
Administrator AI: proof of the person in the conversation
Section titled “Administrator AI: proof of the person in the conversation”The administrator AI settings tools are offered only when the gateway verifies an active Admin who has changed the initial password, the Admin’s uniquely assigned avatar, and an attended turn from that person. The gateway checks the signed conversation context and re-resolves the requester’s identity; tool parameters cannot assert who the person is. Writes additionally require a private conversation or signed-in WebChat. Scheduled, delegated, background and protected-mode turns are refused. Each proposed write still requires the proposing Admin’s dashboard confirmation.
Administrator-controlled Drive writes
Section titled “Administrator-controlled Drive writes”The nine cloud-drive write tools run only inside the main gateway process. Their write credential is stored separately from ordinary Google credentials. Every token hand-out point refuses a token carrying full Drive access, including refresh and remote MCP paths; an ordinary connection found with that scope needs reconnection. The official Drive remote MCP never receives that token. This protects product routes; a service-account key readable by the CLI can still mint tokens after Google grants the scope. Prefer a gateway-sealed delegation key.
Create, modify, move and trash default off independently. Enabling or widening access requires the administrator’s recorded risk acknowledgement, without additional re-authentication. Required member confirmation is bound to the exact operation, account, credential and policy, expires after five minutes, and can only be decided by that member. Tool allowlists, Admin tokens and standing workflow approvals cannot skip it. Administrators may disable confirmation per action or require additional administrator approval. Unattended work refuses actions that need confirmation. Imported or restored configuration strips these write settings; the destination administrator must explicitly enable access again.
Permanent Drive deletion and sharing/permission endpoints are refused on every DuDuClaw Google request path. The write transport accepts only the enumerated operations; trash uses an update to mark the file as trashed, never permanent deletion. Existing transports cannot use the new write path by changing a method or endpoint. These controls do not govern arbitrary third-party programs or unrestricted shells.
Folder checks are best effort because Google has no folder allowlist. Checks run before and after the write and again after approval; concurrent changes remain possible. Detected violations notify administrators, and incomplete checks are recorded without claiming success. With an empty list, create and modify can reach any writable location, while move and trash are refused. Listed folders cannot be renamed, moved or trashed; cross-drive moves are refused. See write tools and folder rules.
Every write attempt, including refusals and uncertain outcomes, is logged with the action, account, requester, file/location metadata, approval decision and outcome. Logs omit file content and tokens; they may include file names and a content digest. Administrators can query audit.unified_log with tool_name_filter="google_drive_write". Use Integrations → Google → Drive writing for the four actions, approval mode per action and folder list. Its readiness panel shows delegated scopes, a per-employee test and company-account consent. Members connect through My connections → Drive writing and review write confirmation cards there. For records, open Logs → History → Drive writing. Real Google consent isolation/revocation, delegation, API behavior, private-message delivery, Windows and native protected Linux acceptance remain unverified here.
Company Google sign-in
Section titled “Company Google sign-in”The server supports Google sign-in alongside passwords and channel one-time codes. It is off by default and unavailable in the personal edition. Availability requires an administrator’s risk acknowledgement, allowed company domains, a configured company Google OAuth client ID and secret, and a valid [dashboard] public_url (HTTPS, or HTTP on localhost/loopback). Configure Integrations → Google → Company Google account sign-in: domains, Admin approval or direct creation, daily cap, avatar template and MFA pre-authorisation on approval. The card shows the redirect URI to register and a checklist. Every save except turning sign-in off requires password + authenticator code. When enabled with a public URL, the login page shows Sign in with your company Google account. In Members (/manage/users), use Pending activation to approve or reject requests, multi-select Batch confirm Google sign-in, or the row menu Cancel Google sign-in. Google sign-in, Odoo and AI avatar badges identify each member. Members enable or disable My connections → Google sign-in with their password. Google-onboarded members see five steps on Home; the Odoo step opens My connections. Members without a password reauthenticate with Google on the Account page before changing two-step factors.
Only Google Workspace / Cloud Identity accounts with email_verified=true and an allowed hd in the verified ID token are accepted. Personal Gmail accounts are refused. Domain values are lowercased and matched in full, without subdomain matching; the email suffix never supplies the domain. Google does not document which hd it returns for secondary domains or aliases. List each accepted domain explicitly and confirm the returned value.
Identity uses Google’s stable sub. A matching email never merges accounts automatically. Existing members sign in with their existing method and link Google after a password re-check; the email addresses must match, ignoring ASCII case. Alternatively, an administrator can confirm up to 100 existing active, unlinked accounts per batch. Confirmation lasts 14 days and is invalidated by email or credential changes.
By default, a new colleague’s first sign-in creates an approval request. Requests expire after 14 days; at most 50 may be pending. Rejected applicants wait seven days. An administrator can select direct creation after acknowledging the risk. The new-account cap defaults to 20 (range 1–200) over a rolling 24 hours and counts pending requests too. New accounts have the Employee role and no local password. Accounts without a local password cannot be promoted to Admin or Manager.
Company two-step verification still applies; Google’s own two-step verification does not satisfy it. After Google sign-in, Email codes cannot be the second factor because they use the same Google mailbox. Use an authenticator app (TOTP) or a passkey. Under enforced policy, a new colleague needs an administrator enrollment code unless the administrator explicitly allows first two-step enrollment when approving. That option requires approval_grants_mfa_enrollment, off by default, and grants one use within 72 hours of approval. Passwordless members manage their factors after fresh Google reauthentication. Google must return a recent auth_time; otherwise an administrator must reset two-step verification.
New colleagues receive an AI avatar automatically, using a blank avatar or a non-premium, single-employee company template pinned to its revision. A changed or invalid template, full seats, or protected native Linux isolation waits for an administrator. Creation failures retry after one and ten minutes; the third failure waits for an administrator.
Admin or self-service unlinking invalidates all of that member’s sessions. Self-service unlinking requires a local password and a password re-check. For offboarding, suspend the DuDuClaw account or unlink Google sign-in. Disabling the Google Workspace account alone does not terminate existing DuDuClaw sessions. Google-only accounts without a local password cannot sign in after downgrading to v1.85.0 or older.
See settings and OAuth setup.
Personal keys and Odoo account boundaries (v1.86.0)
Section titled “Personal keys and Odoo account boundaries (v1.86.0)”On External access (/me/external-access), members select Include my conversation content and external tool scopes when creating a key; later changes can only narrow access. Admins use the two master switches on the same page. Open Integrations → Odoo for the upgrade notice, permission mode (engine tables or follow the Odoo account, with risk confirmation), Always refuse (grouped defaults; removal requires confirmation; five fixed refusals remain), Which AIs may use the company account, and Colleagues’ own Odoo accounts (off by default) with the member credential list. In the employee editor → Integrations → Odoo, use Narrow permissions, Use the current requester’s Odoo account, and the per-table Activity / Internal note / Notify followers / Attachment controls; each requires confirmation. Members enter their own login and key under My connections → Odoo, which shows Configured by administrator until the Admin enables it. Admins revoke a member credential from Members → row menu → Revoke Odoo account.
A member key sees only its holder’s own web conversations. Owner access to an AI employee never opens other members’ conversations or external-channel conversations. New keys default to include_conversations=false; without it they cannot read conversation methods, resume or subscribe to existing WebChat conversations, or download conversation attachments or conversation-derived files. activity.list exposes conversation text only for the holder’s own conversations with this option enabled. Memory reads are restricted to the holder’s assigned avatar or their own personal employee under active isolation; ownership of a shared employee is insufficient.
[member_api_keys] allow_conversation_content (default false) governs creation only. Turning it off does not strip existing grants. Keys created before the upgrade retain conversation access and carry conversations_migrated=true, within the same own-web-conversation boundary. Browser-only me.member_keys.narrow and Admin member_keys.admin_narrow can remove conversation access or MCP scopes, never add them. Creation still requires the existing password/MFA re-verification.
Odoo identity selection uses this order: the avatar owner’s personal credential; a verified requester’s personal credential when act_as_requester is enabled; the AI employee’s own account; the company account only when the AI is in company_key_agents; otherwise not connected. An avatar cannot borrow a different requester’s credential. A personal API key uses only its holder’s personal credential, with no employee/company fallback.
Personal Odoo credentials are sealed with the gateway’s machine encryption key and an owner-bound envelope. Only the gateway unseals them. Use requires an active member, matching account credential epoch and the verified server fingerprint (URL and database). After a server change, read the new address/database through me.odoo.status in the same browser session before testing again. Password changes, sign-out-everywhere or suspension invalidate use; when the account is available again, re-enter the key. Offboarding deletes the saved credential, and an administrator can revoke it without seeing its secret. The gateway supplies the authorized MCP process with the identity decision, verified endpoint, account metadata and credential revision, plus the selected secret when its cached revision differs; it never supplies the machine sealing key. This is an application boundary, not OS isolation from unrestricted processes running as the gateway user.
| Rule | Always refused |
|---|---|
| F1 | Updating or deleting ir.attachment; creating it through a generic tool. Use odoo_attachment_add to create an attachment from a file. |
| F2 | Mutations of ir.model, every ir.model.* descendant, and ir.rule. |
| F3 | Mutations of res.users.apikeys and its dot descendants. |
| F4 | Mutations of mail and every mail.* descendant; generic calls to message_post, message_notify, message_subscribe, send_mail, or action_send_mail. Use the dedicated note/message tools. |
| F5 | Methods starting with _, plus init and uninstall_hook. |