Safety
Daythread is allowed to act, so the safety model is the product. The design assumption is that the model will sometimes be wrong, and the system must fail closed.
Confirm before external
external and destructive actions default to ask. Approving a plan is explicit and recorded. There is no “trust me” switch that silently upgrades a policy.
Tamper-evident
Every run step is SHA-256 chained over its canonical payload plus the previous hash. dt ledger <run-id> --verify recomputes the chain.
The ledger is the answer to “what did it actually do?”. It is not a log you hope is complete; it is a chain you can check.
Idempotency and recovery
- External and destructive steps refuse to resume after an uncertain outcome.
- Local writes use deterministic IDs or overwrite semantics.
- Run leases ensure only one executor claims a run; leases expire and are released on completion or failure.
- External, MCP, connector and shell steps run in a subprocess and are killed by process group on timeout, including server worker threads.
- Cancellation is checked between steps.
Undo or declare irreversible
A tool returns an undo recipe or explicitly declares irreversible. Multi-step undo runs in reverse and refuses if any step is irreversible.
The refusal is the safety property: a half-undone plan is worse than an honest “this cannot be undone”.
Least authority
- Tools stay under
DAYTHREAD_HOME. - Shell execution is allowlisted, path-restricted, timeout-bounded, and approval-gated.
- MCP servers are explicitly registered, run without a shell, and tool calls are
externalby default. - The local API binds
127.0.0.1, uses a bearer token in a0600file, rate-limits, and has no CORS.
Taint
taint=untrusted marks content from external agents, webhooks or email. It forces approval for every non-read step even if the policy would auto-allow.
This is the main defense against prompt injection that arrives as data: untrusted text cannot borrow the user's authority.
Network egress
Calls through daythread.net use one guard whose address policy is deny-by-default.
net.allow_private=1andnet.allow_hostsare the explicit opt-in for LAN connectors.- Link-local metadata (
169.254.169.254) and carrier-grade NAT (100.64.0.0/10) stay denied even then. net.max_bytesandnet.max_header_bytesare budgets for one call, shared across every redirect hop.net.max_redirectsbounds the hops.model.egress=local_onlyrejects non-local providers.
Some direct urlopen call sites are still being migrated to the guard. Until that lands, the guard describes most egress, not every call in the tree.
Secrets and OAuth
- Secrets are encrypted with AES-GCM; the master key is
0600and never leaves the device. secret:references keep literals out of MCP configs.- OAuth uses authorization-code + PKCE,
statevalidation, a loopback-only callback, encrypted tokens, and refresh on expiry. - Client secrets come from
env:orsecret:references, never the command line. - Google, Microsoft 365, Feishu and Lark are supported.
Backups
Backups are checksummed, HMAC-signed, optionally AES-GCM encrypted with a passphrase, versioned, and redact known secrets. restore --trust is required when the master key is not present.
Privacy and retention
dt privacy export|forget|purgeimplements per-subject export, soft/hard forget, and tombstone purge.dt compliance evidenceexports controls, settings, stats and known gaps.- Old events, steps, audit rows, usage, messages and connector items can be pruned; pending runs are always kept.
secretandhealthfacts are hidden unless--include-sensitiveis passed.
The honest limit
Daythread is a single-user local system. It does not implement hosted multi-tenant isolation, enterprise RBAC, or family-shared memory. Sharing an instance would mean sharing mail and calendar tokens and the authority to act. Do not do that.
Read next
- Operations: the connectors and the deployment checklist.