← Engel's Notebook

How Projects is built

The design decisions behind OpenHands Projects in SDK #6602: what the agent chose, what it chose it over, and what it would recommend now. The last sections list every change that reaches Agent Server users whether or not the projects flag is on.

The same overview as a narrated film. Written at head ba97ceedd, 18 November 2026.

The shape of it

A project is a coordinator conversation, the Cat, and the worker conversations it starts. They are ordinary Agent Server conversations. What makes them a project is a project tag, a board that watches their turns, and a set of tools that only project members get. The PR touches 45 source files (+8,361 / −192) and 26 test files (+7,153).

projects_router.pyHTTP surface: create, board, resolve, artifacts, memory. 404 when the flag is off.1,340
project_service.pyProjectService: starts members, owns the server tags and their lock, resolve, restart catch-up, attaching the board.727
project_wake.pyWakes the Cat with a header that says who spoke and what changed; passes answers on.686
project_turns.pyTurnTracker: pure. Events in, signals out.462
project_board.pyActs on the tracker's signals: writes the board, runs the judge, notifies.365
sdk …/resolution.pyThe auto-resolve judge's questions and the code that decides from the answers.399
project_artifacts.py, project_memory.pyShared files with a base_revision so writers can't overwrite each other blind.440
project_prompts.py, project_profiles.pyRole prompts and the predefined Cat and worker profiles.350
tools/projectThe agents' project tools; they call the server over HTTP.1,672
conversation_service.pyNet +284. Four new public methods the project code uses, nothing private.3,345

The decisions

D1Projects live inside Agent Server

Projects could have been a client feature in Canvas or a separate service next to the server. The agent put them in the server, because the board has to see every turn, including turns that happen while no client is open, and a restart has to pick up where it left off. To keep that from spreading through the conversation code, ProjectService (reached as ConversationService.projects) only calls public methods: create_conversation, start_copied_child, get_event_service, update_conversation, ensure_active.

RecommendationKeep it. The public-methods-only rule is the boundary worth defending in review; any new reach into private conversation state is the moment to stop and add a method instead.

D2Membership and board state are tags

A conversation belongs to a project because it carries project=<id>. Its board state lives in tags too: turn, ask, resolved, resolvenote. Tags already persist, already come back on every conversation read, and already filter in search, so no new store or migration was needed. The cost is that tags are strings with no schema, so the server reserves those keys, guards them with a lock, and rejects clients that try to set them.

Recommendation, still openKeep project as a tag; it is a real label. Move the board state into a small typed record stored next to the conversation's meta, written by ProjectService only. The reserved-key list and the tag lock then disappear, and the board stops being visible to (and editable by) generic tag code. You have this one marked as undecided.

D3Only the coordinator starts members

Earlier, a client could start a conversation with a project tag or add an existing one. Now start_child refuses with 409 unless the parent is the coordinator, start and fork with a server-owned tag are 422, and the add-existing route is gone. An existing conversation joins a project only by becoming its coordinator. This makes "who is in the project" a fact the server decides, not one any caller can assert.

RecommendationKeep it. If adopting an existing conversation as a worker ever comes back, it should be a coordinator tool call that goes through the same start path, not a client route.

D4Roles are prompt presets and predefined profiles

The Cat and its workers are not new agent classes. They are the normal Agent with a prompt_preset (PROJECT_COORDINATOR, PROJECT_WORKER), an AgentContext.project_context section, and predefined SDK profiles. Project tools are added at launch and withheld while the flag is off. A worker without a profile copies its parent's agent.

RecommendationKeep it. Prompt role slots (letting a user swap the Cat's prompt) stay parked until after the first experiments, as you said.

D5A pure turn tracker, and effects on the side

Reading turns used to be mixed with writing the board. Now TurnTracker reads events in order and returns signals such as TurnStarted, UserWrote, CardAnswered; it does no I/O and is tested as a function. project_board.py only acts on those signals. The board is attached to project members only, through subscribe_internal, which does not keep an idle conversation from being evicted.

RecommendationKeep it. This is the split that makes the rest reviewable.

D6Who is speaking is recorded, not guessed

A message into a conversation can come from the user, the Cat, another member, or the goal loop. POST /events takes a sender_conversation_id; the server records the sender and adds a short header the receiving agent can read. Project senders are limited to their own project. Who started a turn decides what happens at its end: a user-started turn wakes the Cat, a Cat-started turn reports back to it. When the user types in a worker, the Cat sees it as context without being woken.

RecommendationKeep it. The sender field is the one piece here that other multi-agent features will want too.

D7Nobody approves for the user

When a worker waits on a tool confirmation, a message from the Cat must not slip through as if it were the user's go-ahead. An admission guard, checked under the run lock, refuses such messages (refuse_pending_confirmation, a typed HeldForUser). Tool approvals stay in the worker; the Cat only says who is waiting.

RecommendationKeep it, and keep it under the run lock. It is the safety property most likely to be broken by a later refactor, so it has its own test.

D8A question for the user reaches the user

When a worker asks something only the user can answer, the turn becomes asked, even if the Cat started it. It stays asked through any number of Cat messages, until the user writes in the worker or answers the Cat's card for that worker. While it is open the judge is skipped and resolve_conversation returns 409. This came from a live run where a worker resolved itself after the Cat told it "you're finished"; it was the worker's own model, not the judge.

RecommendationKeep it. The known cost is a stale "Needs you" when the Cat answers the question itself; a Cat tool to withdraw a question on the user's behalf would fix that later, without loosening the rule.

D9A judge decides when work is done, narrowly

At the end of a turn, a small judge model answers typed yes/no questions (did the task finish, is the agent asking the user something) and code makes the call from those answers. It runs on the DecisionModel, falls back to the conversation's own model, is skipped when a worker resolves itself, and never overrides the user's own resolve. Its model is configured by environment variables (OH_RESOLUTION_MODEL, OH_RESOLUTION_API_KEY, OH_RESOLUTION_BASE_URL).

Recommendation, still openKeep the narrow-judgments design. Move the configuration into settings, next to the other LLM profiles, instead of environment variables, and drop the regex heuristics that run before the judge once the judge has been watched on real projects for a while.

D10Project tools call the server over HTTP

The project tools run inside the agent and reach the server through its own HTTP API on loopback, with the session key. That keeps one code path for every caller (the Cat's tools, Canvas, the TypeScript client) and works the same when the agent runs in a separate sandbox. The cost is a network hop and an extra failure mode inside a tool call.

Recommendation, still openKeep HTTP. Put the client behind a small interface so tests can pass an in-process transport (it already accepts an httpx transport) and a future in-process agent could skip the hop.

D11Artifacts and memory are files with revisions

Project artifacts and project memory are plain files in the project's folder, written through the server with a base_revision. A write against an old revision is refused, so two workers can't overwrite each other without noticing. Tools: write_artifact, read_artifact, list_artifacts.

RecommendationKeep it. Files are easy to inspect, back up and open in Canvas.

D12One experimental flag gates the feature

The projects flag hides the router (404), withholds the project tools, and is checked again by the board on each action and by restart catch-up. Conversations started with the flag on keep their tools if it is turned off later. Reading the flag goes through a cache of the settings file, also proposed on its own as SDK #6936.

RecommendationKeep it, and read the next section: the flag covers the feature, not everything the feature needed.

D13Nothing reads a whole event log

An event log can hold 60,000 events. Every project lookup goes through the conversation's View, an id lookup, or a bounded walk back from the end (for example find_pending_ask_back). Restart catch-up reads from the last event the board saw.

RecommendationKeep it, as a rule for the whole server, not just Projects.

Not behind the projects flag

These changes ship to every Agent Server and SDK user once #6602 merges, with the flag off.

The ones a reviewer should look at first are the shutdown pause, the reserved tags and the POST /events response change: those alter behavior an existing client can see.

If you only take three

  1. Move the board state out of tags into a typed record owned by ProjectService (D2).
  2. Configure the judge through settings, not environment variables (D9).
  3. Decide, before merge, whether the shutdown pause and the reserved tags should be gated or announced, since they reach every user (previous section).

How it was checked

The unit and integration tests run with the PR. On top of that, the 34 recipes of the F36 Projects family in the Agent Server verification skill ran live, end to end, with real agents acting, at ba97cee: 34 of 34 passed. A later live run on the DeepSeek proxy confirmed the question rule from D8: the worker asked, its own resolve was refused with 409, and the question was still open after the Cat wrote to it.

Related pages: what could split out of the Projects PR, the Projects review, lessons from a working coordinator, Projects scenarios.

Written by Claude Code from the PR at head ba97ceedd, 18 November 2026.