Sedes exposes a bounded set of application operations through two explicit caller classes:
- a thread agent uses that thread's default-off, exact-ID policy, with live access edits in CLI presentation and idle-only native/presentation edits; and
- a named principal-owned Tool client uses a durable, revocable credential with its own exact tools, environment allowlist, and optional defaults.
It is an application-management surface—not provider tools, general MCP server management, workspace shell access, or a general asynchronous job system. Sedes serves only its own tools over MCP, through admitted Codex, Claude, OpenCode, and Antigravity Native presentations.
For user workflows, see Provider features. For operator trust-boundary requirements, see Operations. Related internal contracts are Blocking interactions, Workspace Files, and remote Pi workspace tools. New adapters and backends must also follow the backend integration contract.
- Policy and caller ownership
- Environment authority
- Execution and tool-settings management
- Workspaces and projects
- Catalog and backend presentations
- Native MCP presentation
- CLI transport and invocation lifecycle
- Trust boundary and verification
- Limits
Agent-tool policy is principal-owned application state attached to a thread.
Named policy sets contain exact enabled tool IDs and a resourceScope with
allowOtherEnvironments and allowOtherProjects. Selections resolve in order:
Account → Environment → Backend → Saved Agent → Thread. Each selection is
inherit, disabled, or policy_set with a scoped set ID. The nearest
explicit selection replaces the whole policy; no tool IDs or scope flags merge.
With no explicit selection, tools are disabled and both scope flags are false.
Policy sets and default selections are independent of provider runtime
configuration. Their edits do not restart providers. New thread preparation
resolves the current scoped set and snapshots its exact tools, scope and
backend-supported presentation in the creation transaction, recording immutable
set name/revision and source provenance. The same-settings and fork paths copy
resolved thread state. Existing threads never follow later set/default changes.
Deleting a set leaves its selections needing attention; a missing effective
reference fails creation rather than inheriting another set. A more specific
explicit choice may replace a missing earlier reference. Templates store the
thread selection alongside the Saved Agent reference. Missing-policy errors
identify the effective source level and set ID. Read-only Agent option catalogs
remain available with structured defaultIssue/resolvedIssue diagnostics,
so users can replace an invalid selection without losing configuration controls.
UI groups and select-all controls are conveniences. Durable policy stores the master flag, exact enabled IDs, two independent project/environment resource-scope flags, revision, and presentation surface/mode. Concurrent edits conflict instead of overwriting one another. With an unchanged CLI presentation, the master flag, exact enabled IDs, and resource-scope flags can change during a turn or beside queued input without retiring the runtime. Discovery and invocation read the current policy. Disabling a tool prevents a stale discovery result from invoking it later; already admitted work is not cancelled. Policy changes apply to subsequent invocations; operations already admitted retain their authority. The agent learns about added tools on its next discovery request, not through an automatic message.
Native-tool policy and all surface/mode changes require an idle thread and runtime retirement. Before saving a bound thread's policy, Sedes also releases its provider residency, even when no local runtime is attached. Resolution or provider-release failures leave the policy unchanged; busy work or unapplied provider output blocks the change. This includes a disabled or unavailable bound target on any backend: enable or reconnect it before a Native/presentation edit. Sedes does not infer release support from a backend name or bypass a failed binding/configuration check. Same-surface CLI access edits still apply without resolving the provider. Native presentation keeps its tool list for the admitted provider turn or session; every invocation still rechecks policy.
After retirement, open thread streams receive the saved policy revision through an application-state update even when no provider runtime remains attached. This publication reads principal-scoped policy only and preserves the retained provider projection; it does not restart a stopped or archived thread. The next runtime attachment constructs its tools from the saved policy. All compiled backends share this publication path.
Thread agents with the explicit management grants can author named policy sets
and defaults through tool_policy.*; ordinary creation still selects an
existing policy through thread.create@6 or Saved Agent contracts.
saved_agent.list/get/options/create/update@7 use toolPolicySelection and
optional toolPresentation instead of an embedded policy. Canonical Saved Agent
tools neither accept environment-variable bindings nor expose their stored
values. Environment/backend management has a separate explicit read/write
contract below.
Each named set is limited to 128 KiB of serialized JSON. Policy lists use principal-bound keyset cursors with at most 100 sets and 512 KiB per page; the browser collects these pages. Default selections are limited to 2,048 entries and 512 KiB per principal. Catalog responses allow at most 64 groups and 512 KiB. Oversized changes fail before persistence.
An external sedes CLI process can use a named principal-owned Tool client.
Creation requires a name, at least one current eligible
tool, one default execution environment, and an explicit nonempty allowed-
environment set containing that default. A default location (workspace) and
thread are optional conveniences; they never expand the allowlist. The client
starts enabled.
The create response returns the hatc1_… credential exactly once. Sedes
persists only a keyed verifier, never the plaintext token, so a lost value
cannot be recovered. Rotation issues a replacement and invalidates the previous
generation; disable is reversible; revocation is permanent. Revoked metadata
is retained for truthful operation provenance and cannot be restored.
Policy changes, disable, rotation, and revocation are revision checked and govern requests that cross the next admission boundary. They do not rewrite historical provenance or cancel domain work that was already admitted. A removed catalog tool or unavailable configured default, including a removed default location, remains visible as needs attention but is filtered from discovery and execution until the client is edited.
Principal clients have no source thread or active-turn lease. They never see
the source-only agent.context or delivery-bound turn.publish_summary operation and cannot create or expand other
Tool clients. Every other advertised operation uses the same canonical schema,
effects, revisions, receipts, recovery, and provenance as its thread-agent
counterpart. In particular, they may invoke thread.send@4 only in its
fire-and-forget form: callback: true requires a trusted calling thread and is
rejected when the caller is a principal Tool client.
An enabled thread tool is restricted by two independent flags:
resourceScope.allowOtherEnvironments and
resourceScope.allowOtherProjects. Both default to false. The source thread's
current project and environment are resolved from principal-owned state at each
invocation. A project location move cannot leave a runtime with stale project
authority.
- With both flags false, thread/workspace resources must belong to the source project and environment.
- Other-environment access alone admits the source project on other hosts.
- Other-project access alone admits projects on the source environment.
- Both flags admit principal-owned resources across projects and environments.
Lists and searches intersect their requested collection with the permitted scope before sorting, pagination, snippets, full-record materialization or runtime inspection. Hidden results do not contribute counts or continuation positions. Explicit resource requests outside scope fail with an explanation; Sedes never requests an application access approval or redirects the operation. Thread-initiated creation or Agent configuration cannot exceed the source's exact tools or scope flags. Separately granted policy administration can author broader sets and future defaults, but cannot broaden the caller's applied snapshot or bypass this assignment ceiling. Provider-native permission prompts remain independent.
Every canonical operation declares its resource authority, including explicit management and prospective-creation authority where no existing resource is the target. Direct reads/writes recheck exact resource identity and mutable scope at execution. Moves check both the source and destination. Continuations bind the effective project/environment scope, policy revision, trusted source defaults and relevant project membership revisions. An earlier cursor cannot broaden a later query.
Global Tasks and Workpads and Saved Agent definitions remain shared account resources. Project Tasks and Workpads are shared within their project: the project flag determines which project identities can be reached. With other environments disabled, a project also needs an active location on the source environment; projects hosted only elsewhere or with no active location are outside scope. Once admitted, the project's shared documents are not divided by host. Thread-owned records remain filtered by both flags. Enabling other environments permits shared records in unlocated projects only when the project rule also admits them.
The environment directory is filtered to permitted environments. Registered client devices remain account resources, while their returned default-thread references are projected through the caller's resource scope. Page, image and worktree tools preserve their narrower source-thread/workspace contracts. Public web research remains public information.
Principal Tool clients retain explicit environment allowlists and do not inherit a thread's project policy or acquire an interactive approval path. Delegated work runs under the destination thread's own saved policy. Automations cannot silently widen the policy of a source or destination thread.
The migration replaces old boundary choices with explicit scope. Existing unrestricted policies become true/true; environment policies become false/true. Legacy thread-only policies are disabled because the new project scope would be broader. Their exact selected IDs are preserved for user review. Explicit Saved Agent policies migrate into named sets with presentation kept separately.
These version-1 canonical operations are thread-agent-only and disabled in
existing policies until their exact IDs are enabled. Execution and policy
administration use the Execution group; thread/template tool settings use
Threads. The existing environment.list remains a bounded directory.
| Operations | Contract |
|---|---|
environment.get |
Read one environment's settings, revision and runtime effects. |
environment.create, environment.rename, environment.configure, environment.remove |
Create local/SSH definitions or edit/remove an admitted environment. |
backend.list, backend.get, backend.options |
Discover admitted backends, detailed settings, compatible configuration and defaults. |
backend.create, backend.rename, backend.configure, backend.remove |
Create a backend and its first connection atomically; edit/remove a backend and its connections. |
execution.defaults.get, execution.defaults.update |
Read, set or clear the default connection for future threads. |
runtime.impact, runtime.connect, runtime.disconnect, runtime.start, runtime.stop, runtime.restart, runtime.upgrade, runtime.operation.get |
Use existing lifecycle impact, execution and receipt recovery. |
tool_policy.options, tool_policy.list, tool_policy.get, tool_policy.create, tool_policy.update, tool_policy.remove |
Discover eligible tools and manage principal-owned policy sets. |
tool_policy.defaults.get, tool_policy.defaults.update, tool_policy.preview |
Read/change an authorized selection and resolve effective policy/presentation for a target. |
thread.tool_settings.get, thread.tool_settings.update |
Read or replace another thread's applied policy snapshot and supported presentation. |
thread_template.list, thread_template.get, thread_template.update |
Read existing templates and patch their policy/presentation settings. |
Existing thread.create and saved_agent.* remain the creation and Saved Agent
authoring paths. Template tools do not add general template creation or change
other template settings. There are no account/environment/backend presentation
defaults; supported choices and their default still come from the backend.
Execution configuration, policy sets, defaults and receipts are principal-owned. Resource lookup derives the owning environment and, for thread/template work, project from server state. Environment creation, account defaults and principal-wide policy administration require other-environment authority. Read/rename grants do not grant create/configure authority. Create/configure explicitly delegate administration of executable paths, variables, credentials and privilege settings, subject to the existing configuration validators.
Configure operations accept typed partial edits. Omitted fields, including
nested siblings, remain unchanged; null explicitly clears an optional field.
A supplied ordinary array replaces only that array. Variable maps and connection
collections use named/ID-addressed operations, preserving omitted entries.
Switching a mutable settings variant requires a complete valid new subobject;
identity fields cannot be changed. The adapter loads and validates the complete
document before using ConfigurationAdminService; callers never replace the
whole principal configuration. Settings and tools share creation defaults.
Authorized environment.get and backend.get return exact configured literal
variable values, including literals named API_TOKEN. They do not mask values
or infer secrecy from names. Secret references remain references and are never
resolved for tool output. List summaries omit variable settings; mutation
results, replayed receipts, diagnostics and status/error messages omit variable
values. Template and Saved Agent outputs continue to omit environmentVariables
while preserving their stored bindings on policy edits. A literal submitted as
tool input remains visible as input.
Each connection returned by backend list/get/create/configure has two IDs:
configurationTargetId is the persisted configuration target ID, used for
connection edits and execution.defaults.update; targetId is the projected
connection-profile UUID, used by policy preview, thread creation, Saved Agents
and templates. Defaults get returns both IDs. All mapping is principal-scoped.
Source safety is separate from access to other resources. The source environment
definition permits label edits only. Its calling backend permits label,
modelPolicy, and supported model/reasoning connection-default edits, but not
access/permission changes. Sibling backends on that host can be managed when
the change preserves the calling backend and route. Source-disrupting runtime
actions and changes to the source thread's tool settings are rejected.
Configuration mutations require expectedRevision and stable mutationId.
The configuration transaction stores a bounded result together with tool/caller
identity, input digest and retained scope facts. Replay matches before ID
allocation or document reconstruction and inside the transaction. It returns
the original result even after later edits/removal, after checking current
authority; changed input conflicts. It never returns the private full-document
receipt or copies literal inputs into command metadata. New stale edits conflict
instead of silently rebasing. Saved revision and runtime readiness remain
separate; an offline host can have durably saved, pending configuration.
The serialized configuration mutation result is capped at 60 KiB, leaving
headroom within the durable receipt's 64 KiB limit. runtimes retains the saved
runtime states, while effectsScope: "current_command" limits their effects
to settings changed by this command. These compact effects contain component,
subject ID, desired/effective revisions and state, without detailed launch
evidence. effectsOmitted counts additional current-command effects excluded
to fit the result budget. Earlier pending effects are outside that count, so
zero does not establish complete pending-state coverage. Use environment.get
or backend.get for the resource's complete current effects; replay returns
the original saved result, not a refreshed status.
Lifecycle tools retain short-lived impact tokens, incarnation/ownership fences,
durable mutation replay and truthful pending/unknown outcomes. Receipt lookup
can settle or withdraw an unadmitted operation, so runtime.operation.get is a
write with durable external effects, not a read-only inspection. Disruptive
actions declare destructive application effects and durable external effects.
They cannot override a hung management command or independently kill processes.
Operator retirement confirmation, SSH setup, outbound pairing and provider
installation/authentication retain their existing workflows.
Policy-set/default authoring may grant broader future capabilities under its
explicit administrative permission. Applying policies to threads, Saved Agents
or templates still enforces the caller's exact-tool and resource-scope ceiling,
including inherited selections. Targeted default reads validate resource scope
first and return inherit/revision 0 when that valid target has no selection.
Existing threads retain independent snapshots. Thread updates use
expectedPolicyRevision; their mutationId is correlation only, not durable
replay. After an uncertain response, inspect current policy before another edit.
Policy-set, selection and template writes likewise retain revision/readback
semantics; do not automatically recreate a policy after a lost response.
All seven compiled backends use these same domain and authority checks through their supported canonical presentations in the matrix below. No provider runtime, supported topology, or transport permission is added: Grok remains local/CLI-only, Pi SDK remote CLI remains unsupported, and remote native presentations retain their required sidecar admission. Backend options and lifecycle actions reject combinations their existing implementation does not support.
A Sedes workspace is one directory on one execution environment, shown as a location, and belongs to exactly one principal-owned project that can span several workspaces and environments; see Projects and locations. A project ID grants nothing by itself: workspaces and threads keep their environment checks, and project Tasks and Workpads are reached through the project's environments under Resource scope.
workspace.list@5adds each workspace'sproject: { id, name }. Its continuation fingerprint names the new version, so an earlier cursor is rejected.agent.context@5addsprojectId, the caller's project as admitted for that call.workspace.open@3returns the workspace'sprojectIdand accepts an optionalprojectId. Without it, a directory Sedes does not know becomes a new single-location project named after the directory. An implicit open of an active location returns its existing project only when the caller may access every active member environment. With an explicit ID, the new directory joins that active project, which is authorized as a project ref, so attaching a directory requires the same project scope or allowlisted member environment as reaching it; a removed project is not found. A known directory keeps its project, and naming a different project for it is a conflict, never a move: an active location is revalidated, and a removed location of an active project is restored only when the call names that project, authorized against its current membership; withoutprojectIdthe call reports a conflict and identifies the project only if the caller can access it. A location whose project was removed is a conflict, so neither thread agents nor Tool clients can restore a removed project.task.list@5,task.get@3,task.create@3,task.update@3, andworkpad.list,workpad.get,workpad.revisions,workpad.create, andworkpad.updateat version 2 take and returnglobal,project, andthreadscopes. Input{ kind: "project", projectId? }defaults to the caller's project; output never contains a workspace scope. Task summaries and full list items reportassociatedProjectId: the Task's project, the current project of a thread Task's thread, or null for a global Task.- Every Task the task tools return, summary or full, carries
pinnedandbacklog.task.listincludes backlog Tasks unless itsbacklogfilter excludes them, andtask.createandtask.updateacceptbacklog. Their descriptions tell agents to pin or backlog a Task only when the user asks. Completing a Task clears both, and pinning or backlogging a completed Task is rejected as invalid input. task.delete@1(sedes_task_delete) acceptstaskIdandexpectedRevisionand returns{ taskId, deleted: true }. It deletes only completed Tasks, atomically checking completion and revision under the caller's tenant/principal ownership and admitted resource authority. Open Tasks are rejected as invalid input; stale revisions and retained thread-reset references conflict. Its description says to invoke it only at the user's request. Successful deletion uses the existing Task removal publication and retry path. The tool is available through the shared catalog on each supported agent presentation: Pi SDK/native Pi Native/CLI, Codex/Claude/Antigravity Native MCP/CLI, Grok CLI, and OpenCode Native/Progressive and eligible owned CLI runtimes. Existing backend restrictions on presentations and topology still apply.thread.archive@2names its open-Task dispositionsmove_to_project,move_to_global, andkeep;move_to_projectmoves each archived thread's open Tasks to that thread's project.
Moving a location, renaming or merging projects, and removing or restoring a project are user actions in Settings → Projects; no agent tool performs them. Only the versions above are admitted, so callers must describe the current tool before invocation. A Native individual MCP session that outlives a server upgrade, such as a Claude query its sidecar retained, keeps the tool list its provider loaded at start until the runtime restarts; each call still describes and runs the current version.
The canonical catalog groups operations under:
- Context — bounded source-thread/application context;
- Files — source-thread linked-worktree discovery and thread worktree preference selection;
- Threads — inventory, status, messages, creation, send, fork, pinning, Group discovery, creation and membership, park/unpark, snooze/wake, archive/restore, and thread/template tool settings;
- Execution — environment/backend configuration, runtime lifecycle, default connections and tool-policy administration;
- Client controls — current-client navigation, interaction completion, revision-checked basic voice settings, and spoken replay of an ended turn's reply;
- Agents — saved Agent discovery and revision-checked management;
- Tasks — bounded reads and revision-checked mutation; and
- Images — retain an image file and show it inline in the source conversation;
- Automations — definition/history reads and guarded scheduling controls;
- Research — current public information through an installation-owned provider process.
Automation recovery stays under user control: acknowledging failures and marking
uncertain runs as failed are available in the UI and authenticated management
API, but have no agent-tool operation. This applies to all compiled backends
across all supported tool presentations.
automation.update@3 and automation.set_state@3 report retired: true when
the change retired a finished one-time reminder, so the definition they return
has left the collection; a replay of the same mutation returns the same result.
thread.status@7 and each thread.list@11 item include the current
principal's pinned flag and group. The latter is either { id, name }
or null for an ungrouped thread. On thread.list, omit groupId to search
across Groups, pass null to find only ungrouped threads, or pass a Group
UUID to find its members. All three queries observe the caller's thread scope
and other filters. Continue a page with the same filter.
Along with agent.context@5, the thread reads distinguish native pi_native
from embedded pi in the backend field. Thread reads and automation.list@2,
automation.get@3, automation.create@3, automation.update@3, and
automation.set_state@3 report parked inventory as parked.
For snoozed threads, thread.status and thread.list also return
snoozedUntil as an ISO timestamp and wakeReminder as text or null.
Each of these four tools has its own grant in Threads.
| Tool | Input | Result |
|---|---|---|
thread.set_pinned@1 |
Required pinned boolean and optional threadId |
{ threadId, pinned } |
thread_group.list@1 |
Optional query, pageSize, and cursor |
A page of Group IDs and names, including empty Groups. |
thread.set_group@1 |
Required groupId and optional threadId. A UUID assigns the thread, and null removes it. |
{ threadId, groupId } |
thread_group.create@1 |
Required name and optional threadId |
{ threadId, groupId } for the new Group and its founding thread. |
Group IDs and names belong to the principal and are visible across projects
and environments with the directory grant. Use thread.list to discover
admitted members. A rename preserves the Group's UUID and subsequent reads
return the new name. Deletion clears its memberships. A write to a deleted
Group ID returns not_found.
The three writes check the target thread's resource scope. Omit threadId to
use the calling thread or the Tool client's configured default. A caller
without a default must provide an ID. Pin and Group changes are independent
of lifecycle and can be made on archived threads. Creating a Group and
assigning its founding thread commit together.
Pin and membership writes take absolute values. Repeating a value the thread already has succeeds without advancing its revision. Sedes checks the pin or assignment revision internally and reports a conflict if a concurrent change wins. Re-read the thread after a conflict or an uncertain reply before issuing a fresh write. A fresh invocation gets its own mutation ID. In particular, after an uncertain create, inspect the thread and directory before trying again. An existing normalized name causes a conflict, and a rename or deletion can free that name for a different Group.
thread.set_state@1 (sedes_thread_set_state) changes an admitted thread's
lifecycle to parked, snoozed, or active. Omit threadId to target the
calling thread or a Tool client's configured default. Snoozing requires a
future ISO until and accepts an optional reminder up to 1,000 characters.
Set a parked thread to active before snoozing it. The active transition
unparks or wakes the thread according to its current lifecycle. A thread
already in the requested state keeps its current state and
snooze details. Parking through the tool or its CLI command, sedes thread set-state, mutes automatic progress speech. A target with a turn in progress returns to
Active on confirmed completion, failure, or interruption of that turn, including an outcome
learned during recovery. When Sedes verifies that the calling agent is
parking its own thread from that exact turn, success keeps the thread Parked.
Failure or interruption still returns it to Active. New approval or input
requests, including nonblocking questions, wake both parked and snoozed threads
even when the agent parked its own thread. Tool clients follow the ordinary
running-thread behavior even when targeting their default thread.
Running and queued work, Tasks, and stashes stay attached. Use thread.restore
for an archived thread.
The tool uses the shared principal-scoped inventory mutation and the same presentations as archive and restore. Pi SDK and native Pi use their supported Native and CLI presentations, Codex, Claude, and Antigravity use Native MCP and CLI, Grok uses CLI, and OpenCode uses Native Progressive or eligible owned CLI. Existing presentation and topology eligibility applies.
image.show@1 reads an absolute PNG, JPEG, GIF, or WebP path through the source
thread's Files access and retains a snapshot for inline display. Its optional
title is display metadata. The result contains bounded artifact metadata only;
the tool does not return model image blocks or create a Pages entry. The Images
grant is explicit, and the tool uses only already supported Native and CLI
presentations. See Show image files in chat and
Explicit image display.
client.list, client.end_interaction, client.switch_thread,
client.settings.get, client.settings.update, and client.replay_turn are
thread-agent tools on
all compiled backends through their supported native and CLI
surfaces. Standalone Tool clients cannot invoke them. Their group and individual
controls use the existing agent-tool policy UI.
The source facade captures the active normalized turn and starting client at
Sedes invocation admission, before any asynchronous check or execution.
Later Steer input does not retarget it. OpenCode additionally supplies a provider
current-input lease, independent of resource-scope checks. Pi SDK, native Pi, Codex,
Claude, Grok, and Antigravity use normalized turn/owner-generation revalidation and their
existing invocation cancellation. CLI/MCP source references identify a thread;
they do not carry a historical issuing turn before Sedes receives the request.
Unavailable or replaced admitted turn authority fails closed. Omit clientId for the
current device. List clients or specify another clientId only for an explicit
user request; never select another online device as a fallback.
Discovery returns defaultClientId separately from its live client list, so an
offline starting client cannot be mistaken for another connected recipient.
The registry, command acknowledgements, and completion correlations are
principal scoped, transient, and bounded. A paired client retains its authenticated
ID; an anonymous registration receives a temporary ID without pairing. Connection
replacement invalidates pending commands. A server-issued resume secret keeps
the same identity across reconnects within five minutes; old connection tokens
are fenced. Windows sharing a paired credential have one active recipient:
the newest registration wins, and replaced windows offer an explicit reconnect
instead of repeatedly replacing each other. Silent registrations expire after
45 seconds. Deferred actions wait for their exact turn for at most 24 hours,
then receive a separate one-hour playback deadline at settlement. Commands are
never persisted for replay. An unacknowledged write reports an uncertain outcome.
For timed-out or aborted deferred requests, the server retains at most 128
retired command IDs per client for five minutes. A late accepted acknowledgement
receives an exact-ID turn_cancelled command so it cannot leave an orphaned
listening reservation.
One poll response carries at most 64 commands and 768 KiB of serialized
{ commands }, under native's 1 MiB response limit. Commands that do not fit
stay queued, in order, for the next poll; the first pending command is always
delivered.
Settings reads identify the client and return capabilities, readiness, and a
revision. audioMode accepts off, input, or speak; client-control tool
contracts use schema version 2. Updates require expectedRevision and patch.voice, limited to
audioMode, voiceThreadId, pinDefaultVoiceThread, autoListen,
onlyVoiceThread, ignoreOtherDevices, and followComposerMode. Credentials,
providers, models, speech-content selection, hardware selection, timing, and notification policy are outside
this API. Destination/default threads pass normal environment authority checks,
including nested default-thread patches. Android persists through its existing
profile/identity settings store. An enabling edit can persist while foreground,
permission, or speech setup prevents service start; the response reports that
condition and the actual state. Off stops immediately.
End-interaction suppresses only this turn's automatic follow-up; it does not
cancel the agent or change preferences. Switch-thread defaults to listen: false.
With listen: true, Android requests one exact-target listen even with auto-listen
disabled, waiting behind unrelated playback. It checks that target's current
manual-input readiness before the cue, after the cue, and immediately before
microphone capture. In the background, it requires an existing ready native
voice session and starts recognition without navigating now or when the app
returns. Backgrounding at acceptance or while a request is pending permanently
makes it voice-only. Background listen: false is a no-op. Neither operation
enables voice or changes the pinned/default thread. Recording preferences,
including Keep listening by default, still apply.
If its destination is valid, a foreground switch can still navigate when
listening is blocked; manual supersession and the background fence still
prevent navigation.
Accepted deferred actions are acknowledged before turn completion, then wait for
the matching reply's actual audio drain. An accepted explicit listen reserves
the next automatic-listening slot while the source turn runs. Settlement names
the reply event and all native stream UUIDs that received it within the
principal. Native waits for matching local playback, or an unseen event for its
current stream, never for another stream's delivery. Silent replies and benign
notification drops release their barrier. Notification-stream loss or an
invalid native frame releases undelivered playback waits;
control-connection loss retires the command. Failed/interrupted or superseded
turns explicitly retire the client's matching accepted action through the
internal turn_cancelled command, releasing any listening reservation. Playback
failure, manual supersession, and expiry also prevent deferred actions.
The notification SSE connection uses principal authentication independently of
client-control registration, so control retries preserve healthy speech and
policy delivery.
Browser and Electron support navigation. Browser-only clients report voice controls and replay as unsupported. Android and Electron implement native voice controls.
client.replay_turn queues one ended turn's reply for speech on the current
client. It uses the server’s phase selection. The footer speaker uses the displayed Full or Summary variant. Every input key is optional:
{ clientId?, threadId?, turnId? }. threadId defaults to the source thread
and passes the normal thread authority checks. turnId is an application turn
ID from turns[].id of thread.messages; it defaults to the thread's most
recent ended turn with a stored reply, so {} repeats the agent's own
previous reply. The default is read from stored completion observations only:
the newest finalized observation by completion time, then acceptance, whose
stored reply has text. A turn still running has none, so it is never chosen,
and a turn that ended before producing any reply text is skipped. Execution re-captures the
source turn, rejects that still-running turn when named as invalid input ("The
turn has not ended."), and reads the reply text the reply-speech route
serves: the stored classification under the principal's phases, else the
stored whole reply. Nothing is skipped to find text, and the tool never
attaches a runtime. It fails as not_found when:
- an explicit turn has no stored reply text: "Sedes stored no reply for that turn; it may not have ended yet."; or
- the thread has no ended turn with a stored reply: "Sedes stored no reply for that thread; its turns may not have ended yet."
The reply is fitted beside the command so the command stays within 64 KiB, and the command carries the resolved turn ID and the thread's inventory title, or null when that is blank. Delivery is immediate, like the settings tools: a 120-second expiry and a 25-second acknowledgement wait, never deferred to turn completion. Mid-turn, the replay plays before the agent's own completion notice. Native queues it behind current voice work without navigating or changing the source turn's follow-up. After replay, current Auto-listen can start a new recording on the replay's thread when fresh manual-input policy permits it. Once speech finishes, the same turn can be queued again behind that recording; deduplication covers only pending or playing speech. Non-failed results pass through unchanged; failed ones become errors:
| Client | Situation | Result |
|---|---|---|
| Android | Replay is active right after the call | applied, replay_playing |
| Android | Replay added behind other voice work | applied, replay_queued |
| Android | Same thread and turn's speech already playing or pending | noop, replay_already_queued |
| Android | Audio mode Off | noop, voice_off |
| Android | Session not started, speech not ready, or no binding | noop, voice_not_ready |
| Android | Prepared text is empty | failed, voice_reply_empty |
| Android | Replay doesn't fit the queue | failed, voice_queue_full |
| Electron | Replay succeeds | accepted |
| Electron | Voice action unavailable | failed, voice_action_unavailable |
| Browser | Any | noop, voice_unsupported |
A failed client result from any client control is an unavailable error, or
conflict for settings_revision_conflict, whose message keeps the reason:
"The client rejected the request: ." Thread policies store exact tool
IDs, so a thread that enabled the earlier client controls does not gain
client.replay_turn until the user enables it under Agent tools.
research.web_search is provider-neutral. Its local Codex CLI provider uses
live hosted web search for public information, including page opening and
searching within pages. Research runs in
a dedicated directory under the named research permissions profile, extending
:workspace with outside filesystem reads denied except minimal runtime files,
temporary-directory access denied, and command networking disabled. Tool writes
stay inside the research directory. Command execution tools are disabled and
approvals are never requested; hosted search uses its independent connection.
The packaged JavaScript Code Mode host remains enabled because current Codex
models require it to invoke hosted search. It exposes no Node.js or filesystem
globals; mediated native tools retain the same research filesystem policy.
The launch sets agents.enabled=false and disables project instructions and
host skill discovery. It ignores native user configuration while retaining
host-managed authentication and sessions. It is a Sedes read with model execution and no
durable external side effect. If the executable fails its startup/version check,
configuration screens show the exact tool disabled and runtime catalogs omit it.
Native authentication is checked on each search, so signing in repairs an
authentication failure without restarting or editing the research configuration.
Each request invokes codex exec --json. Sedes buffers bounded stdout and
stderr, waits for process exit, and then parses the JSONL events to obtain the
answer and exact native session ID. Failed, cancelled, timed-out, and malformed
runs do not become successful search results. Recovered native stream errors do
not discard an answer when exec exits successfully and the turn completes.
A fresh query must complete a
web lookup; a follow-up may use the saved search results. The calling tool receives one
text result with ordinary Markdown source links, not the provider event stream
or native session identifier. Unresolved provider citation markers are rejected.
Authentication and persisted research sessions remain in the selected
host-managed Codex home.
Search continuation is deliberately narrow. Set continue only for a direct
follow-up that depends on the most recent successful search by the same
trusted Sedes thread or Tool client. Sedes resumes only the exact returned
provider session ID through codex exec resume, never the latest Codex session.
Codex persists that native session, but the trusted-caller mapping is
process-local. After Sedes restarts or the research configuration changes, or
when that exact session is missing, the request starts fresh and reports
continuationFallback: true. Other provider failures are returned as errors.
New or unrelated questions should omit continue.
Effects remain part of every public tool descriptor. For example, direct send or automation run-now can start model work, while a task file path is only metadata and grants no Files access. List operations are bounded; mutating operations retain their normal application revisions, receipts, and recovery rules.
Do not maintain a second static schema catalog in documentation. The
authoritative IDs, versions, effects, labels, and eligibility rules are in
canonical-agent-tool-manifest.ts,
with generated public contracts under
schema/artifacts. Current
artifacts use artifactVersion: 3, including the explicit pi_rpc adapter;
pi_sdk remains the embedded SDK adapter. Both use the shared adapters.pi
presentation metadata, but exposure, admission, and invocation identities are
independent. A native Pi source cannot invoke through the SDK adapter or vice
versa. Historical checksummed artifacts remain archival evidence and are not
accepted by the current contract parser. Agents should
discover the live catalog because enabled IDs and versions are thread-specific.
The normalized tool policy separates saved grants from runtimeAvailability.
The latter is a read-only, scoped backend contribution using current known
configuration and runtime facts; rendering settings never starts a provider.
Unavailable eligibility does not remove saved IDs or alter the selected
presentation. Runtime eligibility may change at the same saved policy revision;
server replay and client projection enforce revision monotonicity on the
policy independently. A delayed overlay cannot replace newer retained runtime
eligibility. Pi, Claude and Grok retain their existing surface and topology
rules. Codex additionally requires enabled network access and verified Sedes
creation; OpenCode requires an exact verified created root and retains its
namespace, native receipt, source and owned-CLI restrictions.
conversation_creation_provenance records verified native identity in the
binding transaction, independently of first-input acceptance. Force reset leaves
this record intact while making the abandoned attempt immutable and unavailable
for replay. Codex fresh create/fork injection instead checks the exact active
creation operation, before a native binding exists. Migration records only
unambiguous matching non-abandoned creations; older abandoned creations require
the bounded Codex operator repair.
OpenCode's private created-root check combines the durable proof with its
accepted native receipt and settings snapshot; changing those facts fails
closed. OpenCode binds only with completed creation, which force reset does not
abandon; no OpenCode repair is implemented or required. The repair registry
delegates private evidence collection and verification to compiled backend
adapters; shared SQL and the CLI do not interpret provider details. The offline
Codex repair retains a fingerprinted audit receipt and never grants tools to an
imported or merely bound session. A current creation may advertise eligibility
before native identity exists; abandoned or unresolved unbound creation cannot.
Presentation has two independent dimensions:
- Surface selects the provider-facing mechanism:
nativetools or the generatedcliin an admitted shell environment. Native tools are Pi SDK tools in the Sedes process for Pi SDK, the managed companion extension for native Pi, the stdiosedes mcpserver for Codex, Claude, and Antigravity, and the sharedsedes opencode-mcpbridge for OpenCode. - Mode selects disclosure:
progressiveexposes compact discovery and generic invocation, whileindividualexposes every granted operation as a named tool or command with typed parameters.
The normalized policy stores the exact pair as
presentation: { surface, mode }. Capability metadata groups supported modes
under each surface so the UI can show separate selectors, hide a selector with
only one choice, and never synthesize an unsupported pair. The first listed
surface and its first mode are the default: Pi SDK, native Pi, and OpenCode
policies default to Native/Progressive; Codex, Claude, and Antigravity default
to Native/Individual through sedes mcp; Grok defaults to CLI/Progressive. Saved Agents without an
explicit policy use the same default, and the thread-creation trigger
(migration 115) stores it for new threads. Existing thread policies keep
their stored presentation.
| Backend/environment | Native modes | CLI modes |
|---|---|---|
| Local Pi SDK | Progressive, Individual | Progressive, Individual when Bash and CLI admission permit them |
| Pi SDK on SSH workspace | Progressive, Individual | None |
| Native Pi locally or over SSH/outbound | Progressive, Individual through the managed companion | Progressive, Individual when host CLI admission permits them |
| Local Codex | Progressive, Individual through MCP on eligible threads | Progressive, Individual on eligible Sedes-created threads |
| Codex over SSH UDS | Progressive, Individual through MCP with sidecar support | Progressive, Individual with sidecar capability and admission |
| Local Claude | Progressive, Individual through MCP on eligible queries | Progressive, Individual on eligible queries |
| Claude over SSH/outbound | Progressive, Individual through MCP with sidecar support | Progressive, Individual with sidecar capability and admission |
| Local Grok | None | Progressive, Individual on eligible Sedes-created sessions |
| OpenCode v2 on local/SSH/outbound Linux hosts | Progressive through the shared MCP bridge on Sedes-created roots | Progressive, Individual on owned Sedes-created roots |
| Antigravity on local/SSH/outbound Linux or macOS hosts | Progressive, Individual through MCP | Progressive, Individual with host endpoint admission |
| In-memory conformance | None | Intentionally unavailable outside contract tests |
Codex and Claude Native presentation uses exactly the eligibility and runtime admission of their CLI presentation, and is unavailable on Windows execution hosts. Grok has no Native surface. Grok SSH targets and Pi SDK remote CLI presentation are intentionally unsupported. OpenCode v2 Native/Progressive uses a bundled stdio MCP bridge registered once per admitted runtime/workspace and shared across exactly admitted Sedes-created root sessions. A separate private channel credential authenticates the bridge; native session metadata routes calls to the scoped thread and current policy. It is never a thread credential and never enters a session shell environment. The bridge survives actor eviction and is released with session/runtime residency. Imported sessions and native children cannot borrow an admission. Native Individual is unsupported. Native Progressive and owned-root CLI are available on qualified local, SSH, and outbound Linux execution hosts.
OpenCode CLI uses the execution host's admitted per-thread source capability and requires
an owned root with a frozen execution environment. Both surfaces obtain a
server-owned current-input proof hook at ingress. Client-control tools require
live consumption of an exact Sedes user input; native-only, automated,
interrupted or no-longer-observed inputs cannot borrow an older user input.
Ordinary tools use the configured resource scope without requiring that proof.
Native operator permission rules still govern gateway invocation independently.
OpenCode's other configured tools and MCP servers do not grant Sedes authority.
The shared CLI implements both CLI modes for every supported row: local Pi SDK,
native Pi, Codex, Claude, Grok, OpenCode, and Antigravity, plus their admitted
remote relays.
Pi SDK SSH and Grok SSH CLI topologies remain unsupported.
The owner-only local CLI frame and managed relay capability use
agent_tools_cli@7, which admits the closed Images and Execution catalog groups
and carries bounded model media separately from JSON output. Stale peers fail closed and
must be upgraded together.
The in-memory conformance backend exercises normalized catalog,
admission, and invocation behavior without creating a production presentation
contract. Missing presentation eligibility must omit or disable the surface;
it must never fall back to another adapter.
Progressive presentation gives Pi at most three stable gateways:
sedes_catalog, sedes_read, and sedes_act. The catalog gateway lists
compact summaries and describes one to sixteen selected tool IDs atomically.
Read and action gateways validate the selected tool's current public contract
before invocation. This keeps a large catalog out of the initial prompt while
preserving the exact same policy and implementations.
Individual presentation installs every selected eligible definition directly
on the Pi SDK session. The list is fixed for the complete turn, including model
continuations. Installation failure stops the turn instead of retaining stale
definitions. Pi read_only, ask, and full policy continue to govern native
tool use; ask routes protected operations through Sedes approval.
Codex, Claude, and Antigravity load Native Sedes tools from a stdio MCP server that the provider starts for the thread:
sedes mcp --mode progressive|individual
It runs from the same sedes executable as the CLI: the built provider bin
locally, or the sidecar binary on SSH and outbound hosts. It reads
SEDES_AGENT_TOOL_ENDPOINT and a thread reference issued for MCP, reaches
Sedes over the same loopback HTTP routes or sidecar relay as the CLI, and exits
when its stdin closes. Principal Tool client tokens are rejected.
The server implements only the tools subset of MCP: initialize with version
negotiation (2025-11-25, 2025-06-18, 2025-03-26, and 2024-11-05, omitting
fields that an older negotiated version does not define), ping,
tools/list, tools/call, and notifications/cancelled. It advertises no
list-change notifications, pagination, resources, prompts, logging, progress,
or client features. Stdout carries only JSON-RPC; diagnostics are fixed stderr
messages that never echo credentials. The protocol is implemented directly
rather than through the MCP SDK so the hash-pinned sidecar bundle needs no new
dependencies; the SDK client drives its conformance tests.
- Individual lists one tool per granted operation with the same name as
its Pi native tool:
sedes_plus the tool ID with dots as underscores. Clients add their own namespace, so Claude and Codex showmcp__sedes__sedes_thread_status. The registry rejects an MCP name that does not follow this rule. Each tool carries its canonical input and output schemas without the explicit$schemadialect, atitle,_metaentriessedes/toolIdandsedes/schemaVersion, and hints derived only from its declared effects: side-effect-free reads arereadOnlyHint; destructive application effects setdestructiveHint; model execution or durable external effects setopenWorldHint. Successful results returnstructuredContentplus the same JSON as text. - Progressive lists the
sedes_catalog,sedes_read, andsedes_actgateways with the same contract as Pi's, except that the catalog gateway's input schema is an object with anactionfield because MCP requires object input schemas. A lane appears only when the current catalog has an operation for it, and an empty catalog lists no tools. Summaries omit the CLI command path.
Every list and call reads the live server catalog, and the server derives
the calling adapter from the reference, so admission checks the thread's
current Native policy on every request. The tool list is otherwise fixed for
the provider session because Native policy changes are idle-only and retire
the runtime. Input that fails its canonical schema, policy denials, failed
invocations, and transport failures return isError tool results carrying
{ "error": { "code", "message", "retryable" } }, so the model can correct
itself; an unknown tool name or malformed request is a JSON-RPC error.
A malformed gateway tool ID or input that exceeds a transport bound is
invalid_input. Canonical schema maxLength counts code points, while the
transport bounds each string at 65,536 UTF-16 code units, so text dense in
astral characters (such as emoji) can pass its schema and still be rejected.
notifications/cancelled aborts the exact invocation and suppresses its
response.
The provider's own permission controls govern each MCP call before Sedes
applies the thread's resource scope. Codex's default approval mode runs
read-only tools without asking and asks before destructive or open-world ones;
Claude's permission mode applies to mcp__sedes__* tools like any other MCP
tool.
Injection is per thread and never changes operator configuration:
-
Codex receives
config["mcp_servers.sedes"]onthread/start,thread/resume, andthread/fork, with the command,--mode, an environment containing only the endpoint and reference, a 30-second startup timeout, and a 24-hour call timeout so Codex's 60-second default cannot interrupt an admitted long-running operation. The shell policy still strips every Sedes variable. The server lives while Codex keeps the thread loaded; a resume that carries config rebuilds an idle, unsubscribed loaded thread with the current entry. Tool-policy retirement unsubscribes Sedes and invalidates the persistent runtime's cached attach metadata (Codex runtime protocol 4). Unsubscribe does not immediately unload the native thread or stop its MCP process; reconstruction happens on the next configuration-bearing resume. Another external client subscribed to the same native thread can prevent reconstruction, so close that client's thread before changing presentation. Runtime request fingerprints record only the entry's variable names. -
Claude receives
mcpServers.sedeson the query beside the servers its setting sources load. The Agent SDK passes MCP servers to the CLI as a--mcp-configargument that other local users can read, so the entry names the reference as${SEDES_AGENT_TOOL_SOURCE_CAPABILITY}and the query environment carries the value, as it does for CLI presentation. The worker protocol carries the entry as a closedagentToolMcpfield that is exclusive with the CLI query environment. On SSH and outbound hosts the sidecar admits it only for its ownsedesbinary and live ingress, and a reattach must present the same entry. -
Antigravity receives a per-session
mcpServersentry on ACPsession/neworsession/load, containing the execution host'ssedescommand, mode, endpoint, and scoped source reference. Native permission decisions still govern invocation. CLI presentation instead injects the admitted shell environment and an exact executable/PATH instruction becauseagymay rebuild its shell PATH. Neither path changes operator MCP configuration.
OpenCode uses the separate shared bridge described in the presentation matrix; it does not receive this per-thread MCP configuration.
On SSH and outbound hosts the server is the sidecar's own sedes binary,
which sidecar runtime protocol 13 guarantees can serve it. Windows execution
hosts fail closed because their process launchers cannot run the generated
script directly. A missing runtime or admission leaves the
thread without Sedes tools; it never falls back to the CLI.
A production build emits dist/cli/provider-bin/sedes. Every enabled CLI
tool is available through the lossless generic discovery and invocation
commands:
sedes tool list --json
sedes tool describe TOOL_ID [TOOL_ID ...] --json
sedes tool invoke TOOL_ID (--input-json <json> | --input-file <path|->) --json
This JSON-only interface is the CLI equivalent of progressive native presentation. The model first lists compact caller-filtered summaries, describes only the operations it needs, and invokes the selected exact ID with canonical JSON. It is preferred when a large granted catalog should not be expanded into command help up front.
The compact live catalog publishes one named command path for every exposed CLI tool. Dots form command levels and underscores normalize to hyphens; registration fails closed on invalid, reserved, or colliding paths. Examples:
sedes thread status --thread-id <thread-id> [--json]
sedes thread messages --thread-id <thread-id> [--json]
sedes task create --title <title> --scope-kind thread [--json]
sedes research web-search --query "What changed in Node.js today?" [--json]
sedes thread worktree-list [--json]
sedes thread worktree-set --expected-revision 3 --root-id <root-id> [--json]
Named dispatch resolves only the caller-filtered live catalog, describes that
exact operation, and compiles its current bounded canonical input schema into
options. Properties become kebab case, nested objects flatten by property
path, primitive arrays repeat their option, numbers parse strictly, and
Booleans require explicit true or false. Whole objects, arrays, and complex
unions accept a -json option; primitive unions also provide that exact JSON
form when the caller must select a member that text coercion would not choose.
Registration rejects reserved or ambiguous generated option names. The final
canonical validator and serialized input limit remain authoritative. sedes GROUP COMMAND --help renders current required, conditional, enum, collection,
and minimum-property constraints plus effects without invoking the tool.
sedes --help renders the currently granted command groups, sedes GROUP --help renders that group's currently granted commands, and command help
renders the live typed contract. This is the CLI equivalent of individual
native presentation: discovery and invocation read like an ordinary human CLI
without first printing the complete JSON catalog.
Every string option also has a -file form; - reads the exact value from
stdin, and at most one option per command may use it. Use it for multiline
Markdown and text containing backticks, $(),
quotes, or other shell syntax. --input-file reads a complete canonical JSON
object and cannot be mixed with named options. File/stdin reads use only the
CLI process's existing filesystem authority and do not grant Sedes Files
access. In progressive mode, generic tool invoke is the canonical route for
complex inputs. In individual mode, --input-file is the lossless escape hatch
for a named command whose complete canonical input is clearer as JSON. Neither
route is an alternate authorization path.
describe accepts one through sixteen unique IDs as one atomic request. List,
select a currently present ID, describe its schema, then invoke it. Successful
invocations normally write exactly the operation payload advertised by
outputSchema. Media-bearing results instead write {output, modelContent};
output still matches that schema. Image blocks contain an absolute local path,
mimeType, and byteSize, with no inline base64. The HTTP invocation envelope is not part
of CLI stdout, including with --json. Validation and transport failures are
diagnostic stderr. A named
form exists only while its exact tool is advertised in the live catalog;
command metadata is presentation, never authorization.
A canonical definition may return new AgentToolOutput(output, modelContent).
The invocation service recognizes that class explicitly, validates output
against the definition's output schema, and validates the separate media
array. Definitions that produce images declare outputMediaTypes: ["image/png"];
absence means image output is forbidden. This declaration is exposed in tool
descriptions, catalog summaries, and live CLI help, independently of the JSON
outputSchema. Ordinary objects with fields named output or modelContent remain
ordinary tool output. Model content is allowed only on completed invocations;
cancellation, failure, progress, and accepted operations never carry partial
media.
The closed content union supports text and base64 PNG image blocks. It accepts one through eight blocks, text up to 65,536 characters, and each PNG up to 2 MiB decoded with a checked PNG signature and canonical base64 encoding. The complete output plus model content must fit the definition's declared output budget, and the invocation response remains limited to 4 MiB. Generic JSON output retains its existing string limits; images do not bypass them by being placed inside ordinary output.
Pi native tools and the stdio MCP bridges emit the JSON metadata as text,
followed by these native content blocks; MCP also exposes JSON metadata as
structured content when supported by the negotiated protocol. Pi keeps bytes
in the content array rather than duplicating them in tool details. The CLI saves
images on its own execution host in a fresh private temporary directory (0700)
as PNG files (0600), then emits their path descriptors. It writes no partial
result and removes files on cancellation or output failure. Successful files
remain after CLI exit so the agent can open them with its image tool; the caller
may remove the directory when finished, or normal system temporary-file cleanup
may remove it later. If local image saving fails after completion, the CLI exits
with media_unavailable and identifies the completed invocation; the operation
must not be repeated to recover its image. Ordinary shell output is text and does not turn a CLI tool
into a native multimodal tool. This is
transient model-visible content, independent of durable page revisions and
output-artifact publication.
The sidecar's agent_tools_cli@7 and OpenCode's private opencode_tools@3
reverse operation carry the same validated result. Their exact capability
versions are negotiated before dispatch; there is no fallback to the earlier
media-free contracts. OpenCode's ephemeral local MCP bridge additionally
requires handshake protocol version 4 and validates every reply against its
operation's exact schema, preserving PNG fields above the generic JSON string
limit. Workpad content uses its existing 262,144-unit allowance in narrowly
validated document/edit fields; ordinary output and input strings retain their
65,536-unit limit. Rebuild Sedes CLI executables and execution sidecars together
when upgrading these private contracts.
The selected CLI mode is injected as SEDES_AGENT_TOOL_CLI_MODE for a managed
thread-agent process. It is a deterministic presentation hint, not a security
boundary: a process can modify its own environment, while every discovery and
invocation request still resolves the current server-owned thread policy and
grants. Help, list, and describe therefore reflect tools added or removed in
the UI on their next request, and invocation rechecks the selected operation
again. Changing grants never leaves a formerly advertised command authorized.
The CLI does not cross from one configured mode or surface to another when a
command is unavailable.
The one-time durable migration maps the former flat cli presentation to
{ surface: "cli", mode: "progressive" }, preserving the historical generic
discovery contract. It maps native_progressive and native_individual to
their corresponding native pairs. Runtime protocols accept only the new
orthogonal shape; there is no legacy parser or alias.
The three thread.worktree_* operations are available only to a thread agent.
They take no thread, workspace, environment, or path authority from model
input: Sedes derives the exact source thread and asks its owning local or SSH
Files provider for registered linked worktrees. thread.worktree_list@1
returns Primary plus the admitted linked worktrees and the current nullable
preference with its independent revision. Set accepts only one returned linked
root ID; clear restores Primary. Both mutations require the list's current
revision so a user and agent cannot silently overwrite each other's newer
selection. This first-class thread preference changes Files, Compare, and
relative chat-file link resolution only; it never changes the provider, agent,
or terminal working directory. A disappeared preferred worktree is cleared
during successful topology reconciliation.
The list operation has the ergonomic sedes files worktree-list form. Set
and clear include an integer revision and therefore use the generic typed
sedes tool invoke form; the current ergonomic resolver supports string
positionals only.
thread.messages@6 keeps settled-turn pagination unchanged. A request without
a cursor also returns activeTurn from the same conversation snapshot: null
when there is no active turn, or a bounded chronological tail of ordinary user
and assistant messages whose normalized items are completed even though the
turn remains in progress. Those messages have stable normalized item IDs and
do not consume pageSize. User-role inter-agent input retains its optional
authenticated agent_message or agent_result origin in both settled and
active projections. Sedes automatic retry follow-ups carry
automaticRetry: true, identifying application-generated input separately
from human messages. Their transcript projection has no inter-agent origin.
Streaming partials and non-message activity are not returned, and text-final
completion does not imply turn success or idleness. Continuation pages omit
activeTurn and remain fixed to their settled-history snapshot.
After a send, pass its operationId as afterOperationId to
thread.messages for the same recipient. This reads completed user and assistant
messages after that input, including questions the recipient finishes while its
turn is running. Omit the cursor and page size. Repeat the read for new messages.
A pending send returns conflict with retryable set to true. A failed
Submit with unknown outcome returns not_found with retryable set to
false. A failed Steer with unknown outcome stays retryable while its
unacknowledged delivery can still accept exact provider evidence. The filter
requires an attributable input in the ordered transcript. When the window
fills, it keeps the newest completed messages in chronological order.
For plain-text Pi SDK sends, Pi writes the native user entry before Sedes records
its authenticated link to the send. If the server exits between those writes,
the message remains visible in ordinary history. An afterOperationId read for
that settled turn returns not_found because the exact input boundary cannot
be recovered.
turn.publish_summary is a thread-agent tool. A recipient supplies the admitted delivery ID and a summary text or a use_original outcome. The grant is scoped to that recipient, principal and exact source turn. Only terminal turn notifications and manual footer sends can grant publication. A grant does not confer history access. An explicitly retried queued notification retains its original grant. A first send that aborts before provider acceptance revokes its grant and restores any preceding eligible delivery. An uncertain first send reports that recovery is required. Ordinary events sent to a thread never request a callback.
thread.send@4 returns an operation ID and deliveryMode on admission.
Submit starts a turn. A busy recipient uses its saved Steer or Queue
preference. Sedes queues the input when it cannot reliably steer or an earlier
input must go first. The receipt describes how Sedes admitted the input.
An uncertain or aborted send has no confirmed mode.
Set callback: true to receive the terminal outcome in the authenticated
calling thread. Omit it or set it to false for fire-and-forget delivery.
Several sends from the same caller that reach the same recipient turn produce
one report, including when the turn fails or is interrupted. If a backend reopens
a completed turn and produces a different terminal reply, that completion can
produce a new report. Each other caller
that requested a callback receives its own report. The report prioritizes final
answer text over progress updates. If the caller has an active turn and its
backend supports exact-target Steer, Sedes steers the report into that turn. A
stale target demotes to durable Queue. When Steer is unavailable, or no turn is
active, the result is durably queued and starts a new turn as soon as the
thread is idle. The model sees ordinary user-role content, while authenticated
inter-agent provenance lets the transcript render collapsed Activity-style
disclosures with Agent message · <source thread> for the original send and
Agent result · <source thread> for its callback. Each disclosure retains a
one-line content preview and expands to the complete input. Callback result
text remains untrusted agent output.
The named sedes thread send form exposes --callback true|false when the
current schema advertises it. Principal Tool clients must not request callbacks
because they have no trusted calling thread.
The checked-in mode-specific skills explain the live workflow without copying the catalog:
The native skills also cover Codex, Claude, and Antigravity Native presentation, where the MCP client prefixes the same tool names with its server namespace.
All four skills default task creation and review to the calling thread; a broader scope requires the user's request. Individual skills permit implicit selection for task requests and describe their required Native or CLI presentation. Progressive skills remain explicit-only.
npm run dev does not build the provider CLI. Run
env -u NODE_ENV npm run build in a fresh source checkout before expecting CLI
presentation.
A callback: true send registers a principal-scoped callback obligation for
the exact target operation in the same database transaction that durably admits
the send, so an admitted send never leaves an unregistered obligation and an
aborted first send cancels its registration. The obligation follows the
authenticated calling thread rather than the turn that registered it.
Authoritative completion is recorded on the shared
submission_completion_observations rail, enriched with the normalized
application turn, outcome, and an immutable bounded assistant-result snapshot.
Materialization joins registered callbacks to that exact completion and
atomically creates a callback-origin queued-input row while marking the
callback materialized in thread_completion_callbacks, whose rows are
registered, materialized, or cancelled. Materialization is deterministic
and idempotent across all sends from one caller consumed by the same
target turn, including replay after a process restart. The
existing queued-input dispatcher then owns Steer, stale-turn demotion, retry,
delivery uncertainty, idle submission, and restart recovery. Callback queue
rows carry immutable agent_result provenance distinct from composer or
ordinary agent-control input: the callbackId, the source thread, and its
display label captured at materialization.
Startup recovers the ordinary durable queue first and only then materializes registered callbacks whose completion snapshot already exists, so a recovered result is delivered through the queue that already owns it. Registered callbacks block archival at either endpoint, a force reset cancels the affected registrations, and archived or snoozed calling threads are never silently revived. A target input that is cancelled, whose failure is dismissed, or that fails where no later evidence can accept it was never authoritatively accepted and can never record the completion its callback awaits, so the same queue transaction cancels that registration; the calling thread receives no result for it. A Steer whose delivery outcome is unknown keeps its registration until dismissed, because late provider evidence can still accept it.
The CLI requires SEDES_AGENT_TOOL_ENDPOINT plus exactly one caller
credential:
SEDES_AGENT_TOOL_SOURCE_CAPABILITY # injected thread-agent reference
SEDES_AGENT_TOOL_CLIENT_TOKEN # copied principal Tool client token
Managed thread processes also receive SEDES_AGENT_TOOL_CLI_MODE as
progressive or individual. This non-secret hint selects the matching CLI
presentation; it is not caller identity or authorization.
Eligible CLI runtimes receive their environment even when the master flag is
off or no tool IDs are selected. This applies to local Pi SDK, local or
persistent-sidecar native Pi, local and sidecar Codex/Claude/Antigravity, and
local Grok. OpenCode retains its explicit created-root and runtime admission.
Unsupported topologies still fail closed.
Enabling access during a turn therefore needs no new credential or environment
injection; the next request uses live server policy. A Native Codex or Claude
thread likewise starts sedes mcp while access is off; it lists no tools.
A thread reference accepts an HTTP(S) management origin or one canonical
unix:///... sidecar address. A principal-client token accepts HTTP(S) only;
the CLI rejects it with a Unix endpoint before opening a transport. There is no
fallback and no CLI option for tenant, principal, source thread, client, or
credential-generation override. Sedes deterministically encrypts a thread
association with a domain-separated key derived from the installation key and
authenticates the server-derived tenant, principal, ingress transport, and
presentation. It stores no token alias. Reissuing a reference for the same
thread, ingress, and presentation returns the same bytes, including after a
restart. A management-HTTP reference is invalid on the sidecar relay and a
sidecar reference is invalid on management HTTP.
The presentation binding separates the CLI from sedes mcp: the two
references for one thread and ingress differ, and the server derives the
calling adapter (cli for discovery and http for invocation over HTTP,
cli over the relay, or mcp) from the reference rather than from the
request. Both presentations therefore share the same routes and
agent_tools_cli@7 frames without a wire discriminator, and admission rejects
a reference whose presentation does not match the thread's current surface.
CLI references keep the bytes issued before MCP presentation existed.
The reference survives Sedes process and provider-runtime replacement. Each request still resolves the thread's current workspace, environment, backend, inventory, and policy from application state. Provider-native turn identity is not an authorization input: discovery and invocation are governed by the resolved thread and its current policy. Request cancellation aborts the exact invocation. Every admitted invocation retains its source application runtime; runtime replacement cancels that invocation. Deleting or archiving the thread or changing the installation key makes the reference unusable.
A Tool client token is a separate HTTP bearer credential. Authentication resolves its tenant/principal, current generation, enabled state, exact policy, allowlist, and defaults from the retained client record. It never substitutes for a thread reference and is never accepted by the sidecar. CLI environment builders strip ambient client tokens and presentation-mode hints before installing the server-resolved thread values so caller classes cannot collide and ambient process state cannot select the managed mode.
Eligible local Codex, Claude, Grok, and Antigravity processes use the local
management listener.
Local Pi CLI presentation uses Pi's existing shell tool and never enables shell
access by itself. Claude inherits its complete per-query environment before
Sedes adds CLI variables, so injection cannot discard its normal HOME,
PATH, or external login.
Codex over SSH can use CLI presentation only when the environment explicitly
enables agent_tools_cli and the sidecar advertises agent_tools_cli@7.
Sedes deploys one owner-only Unix socket beside the managed sidecar, and the
sidecar relays the strict v6 agent-tool protocol over its current persistent-service
connection. Codex and sidecar health remain independent. Missing
capability, unavailable sidecar, imported thread, disabled network policy, or
unverifiable environment isolation fails closed. Network access is currently
still required for this admission even though the agent endpoint itself is a
Unix socket.
Claude over SSH or an outbound connection uses the same independently admitted agent_tools_cli@7 relay
with its exact thread/query context. The sidecar retains the provider query
when main disconnects, but tool invocation still needs current main-server
authority and fails closed while that connection is absent. Remote Grok
execution and agent-tool relay remain unsupported.
Native Pi uses the eligible host CLI endpoint locally or the independently admitted sidecar relay over SSH/outbound. Its resident process retains scoped CLI credentials while every invocation rechecks current main-server authority.
Antigravity uses the admitted host endpoint locally and the independently
authorized agent_tools_cli@7 relay on SSH/outbound hosts for both MCP and CLI.
OpenCode uses its private tool relay on qualified remote Linux runtimes.
A Pi SDK SSH target never receives the CLI in remote Bash. The Pi SDK model loop and native session stay on the Sedes host while only its seven built-in workspace tools execute remotely. See Remote Pi workspace tools.
thread.create@6 and saved_agent.list/get/options/create/update@7 expose
toolPolicySelection and optional toolPresentation in their contracts.
Earlier schemas are no longer admitted; callers must describe the
current tool before invocation. saved_agent.delete retains its version because
its wire shape is unchanged.
Every invocation is independent. requestId is correlation metadata, not a
deduplication key. A write that returns timed_out has an indeterminate outcome
and may already have applied. Configuration and lifecycle operations with durable
domain receipts must be retried with their original mutationId and unchanged
input, or inspected through their receipt operation. Other writes can create a
second resource/run or fail a domain revision check when repeated. Adapters do
not retry writes automatically.
A direct resource outside the configured scope fails admission immediately.
For admitted work, caller cancellation and source-runtime replacement abort
that exact invocation. Cancelling a background Bash command propagates through
the command's existing cancellation path to the CLI invocation. Browser
connectivity is not invocation authority. CLI list and describe remain
bounded discovery operations; invoke follows caller cancellation without an
additional transport execution deadline.
Optional workspace, project, or thread inputs may default from trusted caller context. Explicit IDs are still resolved under the server-derived principal. A missing, disabled, wrong-version, wrong-scope, malformed, or stale request fails closed.
The local CLI uses these normalized routes:
GET /api/agent-tool-csrf
GET /api/agent-tools
POST /api/agent-tool-descriptions
POST /api/agent-tool-invocations
The server requires exactly one thread-reference or principal-client header; duplicates, comma-combined values, both, and neither fail closed. For a thread caller it derives tenant/principal, decrypts the opaque reference, revalidates the source thread, and loads current policy. For a Tool client it verifies the current stored generation and atomically snapshots its policy/default/environment authority before invoking the same canonical implementation. The CSRF route returns the existing per-process token so a short-lived CLI need not load the browser bootstrap.
The principal token authenticates only these agent-tool routes; it does not add login or account authentication to Sedes's broader management API. Likewise, the thread reference is a bearer capability inside the trusted provider process, not a boundary against a compromised agent runtime. A holder can exercise only its current caller policy and still passes scope, environment, resource, and caller-specific admission checks. Host validation, CORS, CSRF, private addresses, and Unix-socket ownership remain defense in depth. Use both caller classes only within the trusted boundary in Operations.
The deterministic restart-safe format is htr2_. It intentionally rejects
older random htr1_ references instead of carrying a dual decoder. A provider
process that retained an htr1_ value must be restarted or reattached once.
Rolling back to a pre-htr2_ binary likewise requires another provider restart
or reattach.
Tool client persistence and principal-client provenance are one-way database changes. Back up the complete application state and installation key before upgrading. Rolling back across those migrations requires restoring the matching pre-upgrade state; an older binary must never open the migrated database.
Changes must cover generated schema parity, exact-ID catalog filtering,
thread-policy and Tool-client revision conflicts, token rotation/disable/
revocation, wrong-principal and wrong-environment denial, default resolution,
project member, non-member, empty, and removed cases for both caller classes,
cross-project/environment scope filtering and denial, source-runtime
cancellation, and automation fail-closed behavior. Adapter tests must exercise
every supported row in the presentation matrix: Pi SDK/native Pi Native tools,
eligible CLI modes, both MCP modes for Codex/Claude/Antigravity, and OpenCode
Native Progressive and owned-root CLI. Include the sedes mcp protocol subset
against the MCP SDK client, presentation-bound references, admitted sidecar
ingress, transport credential separation, cancellation,
timeout and outcome-unknown semantics,
and every unsupported presentation. Mutating operations must retain their
domain revisions, receipts, recovery rules, and prohibition on automatic
retry. Live provider and skill gates remain separately opt-in.
- No Sedes-hosted HTTP MCP endpoint, MCP for principal Tool clients, MCP resources, prompts, or list-change notifications, per-tool executables, automatic write retry, or generic asynchronous invocation lifecycle.
- Tool clients do not authenticate the management UI/API, use Unix/sidecar ingress, impersonate a thread, receive interactive access approvals, or manage other credentials through agent tools. Execution/policy administration and thread/template tool-settings operations are thread-agent-only.
- No Native Grok presentation, no Native MCP on Windows execution hosts, no Grok SSH target, no Pi SDK remote CLI, and no surface or transport fallback.
- Missing CLI or sidecar admission disables agent tools for that presentation; it does not disable ordinary provider conversation capabilities.
- Native policy and surface/mode changes wait for idle. For a bound thread, Sedes retires its local runtime and releases its provider residency before committing the new policy. The next attach reconstructs presentation state and the CLI environment from the current policy. Codex reconstruction also requires other external clients to unsubscribe from that native thread; Sedes does not disconnect those clients or restart their shared app-server.
Contract generation and opt-in live skill gates are documented in Development.
Back to Internals · Blocking interactions · Workspace Files · Remote Pi workspace tools