Repository navigation
Conversation
A chat is private by default (the policy's default for the kind, and what
backfill registered), but GET /v1/workstreams/{id}/chats listed every other
person's chat title, owner, state and last activity to anyone who could see the
workstream (v2 ruling C10), whatever the chat's own visibility. Abir's call of
2026-11-24: chats are private by default, and a private chat is hidden from
shared lists. The list now asks the one decider whether the viewer may view each
chat, so only the owner and the people it is shared with see a private one; the
operator sees nothing private; a chat with no registry row is hidden.
An organization that wants the old listing sets the policy's default for chats
to owner or org; it applies to chats made after the change.
CONTRACT CHANGE: two tests asserted the old listing (the C10 block of
TestMySpaceChatsRunOnTheServerAndStayPrivate and
TestContractI9SharedWorkstreamChatListKeepsOnlyMetadata); they now assert that
the chat is hidden until shared, then listed with metadata only. The new
TestContractA* tests are derived from the lane's validation contract.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#2890 dropped santosh/work's chats.read method (#2650) because dev's agents.entries already follows a saved remote head under the chats.read hello word. Abir's call of 2026-11-24: nothing Santosh added is dropped. The two are different abilities: dev's reader fetches the whole saved transcript, this one fetches only the transcript's own objects and the chunks under one page, into the store a later agents.take uses. Restored from the parent of cc9ca26 (the chunk-paged reader in cellsync and cellstore, the furrow path verbs, syncsetup.ReadChatPage, the engine method and its tests), additively: the method is advertised under a NEW hello word, chats.read.paged, and the chats.read word keeps exactly the meaning it has on dev, so a client can tell which ability an engine has. agents.entries and its tests are untouched. The embedded furrow is v0.3.7 again (it adds the path verbs; its checksums match the release's SHA256SUMS); without them the word is absent from hello, not present and failing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…WE-AF and PR-AF Each image runs a pinned artifact: codeaf from a published dev release checked against its sha256, the AgentField control plane from its published image (built with sqlite_fts5) pinned by digest, SWE-AF and PR-AF built from pinned commits of their public repositories. The containers start as root only long enough to give a platform volume to the service's user, then run as that user. The runner is the engine host that registers the factory on AgentField. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Railway's builder rejects a cache mount that has no id, and an id has to be spelled with the service it belongs to, which no portable Dockerfile can know. The two Go reasoners build in about a minute without the cache, so they build the same way under Compose and on Railway. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
One `docker compose up` runs the organization server, the AgentField control plane, the factory runner, SWE-AF and PR-AF, each with a volume for its state, a health check, and a published port only where a person has to reach it (on 127.0.0.1 unless the operator opens it). The scripted stub model is an optional profile for a keyless smoke test. setup.sh writes .env with fresh random secrets and never overwrites one; .env, the model keys and the organization token never enter an image. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The control plane's health check used a glibc busybox that the distroless base is too old to run, so it is now the static musl one. The reasoner images now name the user they run as, so a platform volume is handed to the right user and git finds its home (PR-AF was looking in SWE-AF's). The node entrypoint can make a throwaway repository for the keyless smoke test to plan against. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
smoke.sh starts the stack against the scripted stub model and checks, section by section, that the nodes are registered, the operator link claims the organization, a second person joins by invite, a factory job reaches SWE-AF through AgentField with strict run-owner proofs and its plan question is answered by the owner, and that a restart of every service keeps the people, the runs and the registrations. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ec into it Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…it was shared with Sharing a private chat with one person used to un-private it, after which it inherited the workstream's shares and grants, the workstream owner's share and the operator. So sharing a chat with one person showed it, title and all, to everyone who could see the workstream. A private registration with a live grant on itself is now a closed private item: shares, organization visibility, inherited grants and the operator (unless the policy lets it see private things) stay out, and only its owner and the people its own grants name reach it. The grants list shows those grants and the audience of its events names the same people. Three older tests encoded the wider audience (the operator's chat list, the move event's audience, the sweep's lapse audience) and are changed to the contract, each with a comment saying so. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…point and never uses a fixed password Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…away, then runs unprivileged The published image is distroless and runs as uid 65532, so a root-owned platform volume left it unable to write its database, and the only way round was to run it as root. It now gets the same hand-off as the other images, done with the one busybox binary it already carries for its health check. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…uns as Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nt the Railway services A link is only accepted with exactly the address the server names itself by, so rewriting the host in the printed link broke it. The README now says what that address is on a laptop, and lists the variables each Railway service takes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ontainer stub, not a send path deploy/org/modelstub answers /chat/completions on purpose so the keyless smoke test spends nothing; like test/remote/stub it is built into its own image and the product never runs it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A request from 127.0.0.1 with no credential used to act as the factory's owner on every factory, so on a team server any program on the same machine, or any same-machine proxy that did not add a forwarding header, was the owner. The host config now has a `loopback_trust` key (true or false). Unset, it is on for a solo factory, which is one person at one computer, and off for a team factory: a credential-free local request is refused like one from any other machine, and one with a token or a session acts as that identity. A team factory used by one person at one computer can set it to true and gets the old behaviour back. The forwarded-header rule holds whatever the key says: a request carrying X-Forwarded-For, Forwarded, X-Real-Ip or X-Forwarded-Proto (even with an empty value) is not local unless a listed proxy names a loopback client in X-Forwarded-For. Tests cover an unlisted and a listed proxy with a remote client, a Forwarded-only request, X-Real-Ip alone, garbage forwarding headers, and both IPv6 loopback forms. Worker attach keeps its own local door (as it had), so a runner on this machine can still attach before its person signs in. Test fixtures that act as the host's person on a team-mode handler now say so with an explicit LoopbackTrust. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… their creator A person can make a bot (a name and, optionally, a narrower role) and gets its `cbt_` token once, in that answer. The store keeps the sha256 of the token with an eight-character hint and a last-used time, at most three live tokens per bot and twenty bots per person. A request with a bot token acts as the bot: the creator's verbs on the item right now, intersected with the organization policy's scope for `bot:<id>` and with the role the person gave the bot, through the same on-behalf-of evaluator Afi uses, with the creator as sponsor. Nothing is cached, so a creator who loses a share takes it from the bot on its next request, and a role that is later deleted means no verbs. What a bot creates is owned by its creator and recorded as created by the bot (kind `bot`, its id, the creator as sponsor); a chat it makes is private like any other chat. Revoking a token, removing a bot, or the operator removing the creator from the organization ends the credential on the next request with words that say which; an unrecognised `cbt_` token is a 401 and never falls through to loopback or the host's identity, and a bot token beside a session cookie is refused. Bots are default-deny. A bot reaches workstreams and what is under them (except the agent door, requests, drivers, jobs and imports), canvases, resources, My space, and the policy, member, team and about reads. Everything else answers "a bot cannot use this yet", and a bot cannot start an agent run. A bot cannot make bots, mint or revoke tokens, or use the operator's routes. A person lists, mints for, revokes and removes only their own bots; the operator lists every bot and may remove any, but cannot mint a token for another person's bot. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
factory.org_bots, factory.org_bot_new, factory.org_bot_token_new, factory.org_bot_token_revoke and factory.org_bot_remove follow the org_access pattern: one fixed request each, with checked path segments, advertised only by an engine that can reach an organization server. The minting answers carry the secret once; nothing logs a request or reply body on this path. PROTOCOL.md names every method and says the secret is shown once. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…isted to a workstream The chat manual now says what bots are and are not (a token shown once, never more than the person who made it, default-deny routes, no agent runs, ended with the creator), what loopback_trust does and why a forwarded request is never local, and adds probes in people's own words for both. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…f running open A fence that can apply nothing used to let the command run as it was. A Require fence returns ErrFenceRequired instead, in a sentence with none of the machine's words, so a hosted chat's commands are confined or not run, never run open. Without Require nothing changes, and the helper's spec is byte-identical. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Five tests drove a team-mode factory with no credential from the same computer and relied on the old rule that such a request is the owner. They now say it with an explicit loopback trust (a plan-revision handler, a team publish and a worker fixture, the worker reply fixture), or, where the point is how a local client reaches its factory, send the token from the discovery file as every client does (the factory command test). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…LE shortens the idle windows Both are read only by the engine door and only when set, so an engine started without them is what it was. A hosted engine builds its own fence, which ignores jail.allow: off, because a chat's own shell can write that file. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…folder per chat codeaf sessionhost serve|probe|health, plus the hidden helpers it re-executes as the chat's user. The supervisor keeps five capabilities, fails closed when it cannot switch users or confine commands, and answers its API only to the organization server's shared secret and a named person. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…door a chat reaches its model through /v1/hosted/sessions[/...] proxies to the sessionhost with the shared secret and the verified person only; the wire is a reverse proxy that parses no frames. /v1/model/ takes a bearer the server minted for one chat (twelve hours, ended on stop or delete) and adds the organization's key itself. With CODEAF_HOSTED_URL unset neither exists and every path answers as before. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The thin client: the same surface as --at over a WebSocket to the organization server, the bearer only in a header, a chat picked or made for the person, plain sentences for every refusal. It advertises no client tools and drops the automation banner raiser, so nothing an engine sends makes this computer write a file, run a program or open an address. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… people ask them Where the chat runs, what stays on a person's computer, who can see a hosted chat, what the operator of the machine can see, what happens when the person disconnects, the limits and the refusal sentences, and how an operator turns it on. Probes in chat_hosted_test.go keep the questions reaching the page. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Says what was true and what is true now for private chats, the shared-chat audience, the paged remote read, loopback trust on a team server and bots, including the sentence in the #2890 entry that is no longer true. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nto the manual docs/organizations.md and deploy/org/README.md describe both settings where the policy is described, and the two known limits that mention them (a guest's `--once` starting a chat for its owner, and a tool approval staying with the owner) now say what the setting changes. The app protocol's policy shape lists the two fields. The chat's own manual has a section for each setting on the hosted-chats page, in the words someone would ask with, and the refusal, keyboard and sharing sections name the new sentences. Probes keep each question on its page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 25, 2026
…e owner, and two policy settings loosen that Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A refusal from the organization's model door is shaped like a provider's, so a client could not tell the organization's own sentence from a service's failing account. The error envelope now has a `door` field, and a refusal carrying `door: organization` is flagged on the APIError, with OrgLimitWords giving the organization's sentence for the limit refusals (402, payment-shaped) and false for every other refusal. Terminal handling of the refusal is untouched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…number it is Every error the organization's model door writes now carries the `door` mark, so a client can show its sentence as written. A provider's refusal passed through the door is not signed and keeps its own wording. The limit sentences wrote every cap with two decimals, so a limit of a tenth of a cent read "$0.00"; a whole number of cents keeps two places ($5.00, $0.50), anything finer is spelled by the one door that spells a cap (teams.Money: $0.001). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s sentence The engine's ending and the page's failure line put "<service> accepted the key but the account cannot pay" in front of a door's limit sentence, blaming the vendor and the person's account for a limit the organization set. A refusal the organization's door signed is now shown as the door wrote it, with no service name, and it no longer asks for a read of the person's own OpenRouter credits. A provider's own payment refusal reads exactly as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nization's sentence Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y hold A person who joined through an anonymous access link and was then removed stayed in People as "away" and kept the grants others had given them on their chats. closeInvitesOf found invites by the handle they admitted, and an anonymous link carries none. Removal now marks the person's own use on every link that admitted them as removed (the use stays spent, so the link never reopens for anyone else), and deletes every grant that names them, whichever door they came in by. A named invite is removed exactly as before. Joining again, by a new link or by the old one, brings no old grants back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Removing a person left an empty /chats/people/p_<hash> folder on the volume. Deleting a chat now also tries to remove the person's folder, and rmdir only succeeds when nothing else is in it, so another chat of theirs stays put. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The production run found two calls that stopped the script on Railway CLI 5.71.0. `railway volume add --service <name>` is now `railway volume --service <service ID> add`, with the ID read from the JSON `railway add` prints (a name panics the CLI); an older CLI whose `volume add` still lists --service gets the old form. The sessionhost limits edit had no --message, so a terminal run waited forever at "Apply changes now?". railway_scripts_test.sh now runs --apply against a stub CLI that records its arguments and refuses what the real one refuses, so the exact volume and edit calls are pinned, along with the older CLI and the fail-fast when no service ID comes back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ecipe, two known limits From the production run-through of the hosted organization: - Railway volumes come out at 50 GB and the CLI has no size option; the README says so and gives the resize step (what was done, and what was not tried). - `railway templates create` makes a draft; the README says what to do with it, and the script's closing note says the volumes need resizing. - A backup recipe for Railway (`railway ssh` plus tar), with what the run checked on the restored scratch copy and what it did not do. - Known limits: the chat sandbox has python3, git and curl but no pip, pytest, go, node, make or gcc; and SWE-AF, PR-AF and the runner call the model provider directly, so their spend is not in the spend table or any limit. - The README and docs/organizations.md now say removal also drops a person from People and ends every share they hold. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…emoval ends The manual law, for the same change: organization-hosted-sessions gets a section on what a hosted chat's machine has (and lacks) and one on why SWE-AF, PR-AF and the runner are not in the spend or the limits; inviting-people says removal works the same for an anonymous link and ends every share. Five probes pin that the questions reach those pages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 25, 2026
Open
…cipe Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ays satisfied The worker law reads the word "swe" in any manual page as a removed worker, and SWE-AF tripped it. The page now names the factory's code-writing service, its pull-request review service and the runner, and the probe asks about a factory job. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
AbirAbbas
marked this pull request as ready for review
November 25, 2026 20:12
This was referenced Nov 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The hosted organisation line, landing on
dev: a team-mode org server with one access model, hosted chats in a per-chat sandbox, bots, policy, and a self-hosting stack (Docker Compose, published images, a Railway path). Org mode only runs against a team server orcodeaf chat --org; with no organisation, behaviour is unchanged. This merges intodevonly; stable stays on the release before it.What
org/mainholdsOne PR replaces the six drafts it consolidates: #2894, #2895, #2896, #2898, #2899 and #2900.
The org server and its access model.
codeaf factory servein team mode decides every request through one access layer:Hosted chats. In an org, every chat runs on the org server, not on a laptop. The
sessionhostservice gives each chat its own uid inside a Landlock fence:umask 077;It refuses to start chats on a host without Landlock unless the operator explicitly opts out. The thin client is
codeaf chat --org <url>, and the desktop app reaches the same server (org: the desktop app opens hosted chats on an organization's server (engine) #2904).Shared chats. The owner owns the chat: it runs in the owner's sandbox, with the owner's credentials and GitHub identity. Other people act through their verbs on a frame-aware wire:
A guest's access is re-decided on every heartbeat. The server sends each person's verbs on list rows (org: hosted chat rows carry the asker's verbs from the server #2905). The person who asked is recorded on each prompt, spend row and git-token audit line. Stopping or deleting a chat needs
manage.Bots. A bot is owned by its creator and never holds more rights than the creator. A view or comment bot cannot start chats (org: websocket origin check, bots stay in scope, and the hosted limits written down #2913).
Policy. A new, additive
Hostingsection holdslocal_sessionsandmax_session_cost_usd.chats.move_bysays who may move a chat: the owner, or anyone withmanage(org gaps: ignore deploy/org/.env, Compose builds codeaf from source, chats.move_by policy, entry 2900 wording #2910).loopback_trustis off for a team factory.The wire. The hosted websocket refuses a page from another site; a client that sends no Origin header is still allowed (org: websocket origin check, bots stay in scope, and the hosted limits written down #2913).
Self-hosting.
deploy/org/is one Docker Compose file: team server, sessionhost, AgentField control plane, SWE-AF and PR-AF. It builds codeaf from source by default.org imagesworkflow builds amd64 and arm64 images behind a leak gate (secret scan, history and ENV check, private-host grep). It runs on pull requests intoorg/mainwithout pushing, and pushes only fromdevororg/mainwhen Docker Hub credentials are configured.Docs.
docs/organizations.md, the operator README indeploy/org/, and the manual pages (docs: organizations, an entry point for operators and people, and a manual that matches the code #2908, org: the Compose path walked as a stranger, docs corrected and a terminal path written #2915).CI.
org/mainis added to the PR gate's pull-request and push branches.Merged into this line since it was cut
deploy/org/.envignored, Compose builds from source,chats.move_byoperator-link.shandgitstubprofile fixes,--orgin--helpci-fullon this lineanswercould approve a tool call through the question door; addschats.approvals_by(owner by default, oranswer) andchats.wake_by(viewby default,runorowner)Test round
ci-full) onorg/main0207f82f89Not yet tested: the metadata-address guardrails on EC2 or GCE (#2923), pushing through the git door with a real token (#2942), Docker on native Linux and Windows.
Known limits, written down rather than fixed
chats.approvals_by: answer(Who may approve a tool call in a shared hosted chat #2929).chats.wake_bycan limit that torunorowner(A guest opening a stopped hosted chat starts it for its owner #2930). Under the default, aviewguest's one-shot (--once) still leaves the owner's window reporting a different mode until the chat stops or idles.local_sessionsyet (org: the local_sessions policy is enforced by no client #2922). The desktop's org window is always hosted.docs/organizations.mdgives the raw requests.🤖 Generated with Claude Code