Shows the sessions of ZCode, the desktop app of Z.ai and its command zcode, in the notch, and lets you answer its permission requests from Blossom: working, done when a turn ends, what the tool in use does, its first prompt, its repository and its branch as its name, and its tool calls as steps.
ZCode reports through hooks: each hook posts its event with curl to a Unix socket in your own folder, ~/Library/Application Support/Blossom/zcode/socket, where this adapter listens. Blossom launches the adapter.
The hooks of ZCode take the payload and the answers of the hooks of Claude Code, so this adapter reads them with the same code of the SDK as the Claude Code adapter. Its configuration differs: the events sit under hooks.events, and the hooks run only while hooks.enabled is true.
The hooks are in your configuration of ZCode, ~/.zcode/cli/config.json, after yours. The configuration of a workspace, <project>/.zcode/config.json or <project>/zcode.json, and the hooks of plugins are never touched.
This adapter was written from the documentation of ZCode and was never run against a real one. What the documentation says and what is only supposed is in ../../documentation/roadmap/zcode.md; the checks at the end say what to look at.
You need:
bun run build makes one.zcode in your PATH or the usual folders, which is how Blossom finds it. The hooks follow the page Hooks, read on 2 December 2026.curl and ps, which every hook runs by their full paths under /usr/bin and /bin. ZCode passes a hook of the runner command to the shell of the system; the hooks were tested with sh, bash and zsh.The quickest way. Blossom finds zcode on your Mac, and connecting it is one click: "Continue" on the second step of the introduction, with ZCode checked, or its switch in Settings > Agents. Blossom then adds this adapter to its configuration, starts it, and puts the hooks of adapters/zcode/config.json in ~/.zcode/cli/config.json: its groups go under hooks.events, after the groups you have for the same event, and "enabled": true goes into hooks when it is missing, as the page asks of a configuration edited by hand. Nothing else of yours changes, and a file that does not exist is created with the hooks alone.
Before it writes over the file, Blossom keeps a copy of it in ~/Library/Application Support/Blossom/backups/zcode/, named after the moment in UTC, and puts the new content in place in one rename. A file that is not plain JSON is left alone and the row says why. A file whose hooks.enabled is false is left alone too: you turned the hooks of ZCode off, and the row says that its configuration turns its hooks off; Blossom does not turn them on. Blossom does not change timeoutMs or maxOutputBytes. "Repair" puts the hooks back when they are missing or not the ones this Blossom installs. "Disconnect", shown while the agent is off, takes the adapter out of Blossom and its hooks out of the file; it takes out events when nothing of yours is left in it, and "enabled": true only when nothing else is left in hooks, so a file Blossom created or found without hooks comes back as it was. What Blossom writes and why is in the decision.
The page says each session reads the hooks once, when it starts: a session open while you connect reports after /reload, or from the next session.
From the root of the clone:
bun install && bun run bootstrap && bun run build
BLOSSOM_CONFIGURATION=adapters/zcode/configuration.json apps/macos/build/Build/Products/Debug/Blossom.app/Contents/MacOS/BlossomThe notch shows nothing until a session of ZCode reports. Run one Blossom at a time: the adapter holds the socket, and the adapter of a second Blossom logs cannot listen for the hooks of zcode and exits.
An app opened from Finder reads ~/Library/Application Support/Blossom/configuration.json; name the adapter there by its package, { "adapters": [{ "package": "zcode" }] }.
Write it also carries the path and the content of the file, which the panel shows unless "Show what a request would do" is off.For a clone without the app. With jq, write the merged configuration to a new file, review it, and put it in place:
jq -n --slurpfile user ~/.zcode/cli/config.json --slurpfile blossom adapters/zcode/config.json '
($user[0] // {}) | .hooks.enabled //= true | .hooks.events = reduce ($blossom[0].hooks.events | to_entries[]) as $event
(.hooks.events // {}; .[$event.key] += $event.value)
' > ~/.zcode/cli/config.merged.jsonIf ~/.zcode/cli/config.json does not exist, copy adapters/zcode/config.json there instead. A configuration whose hooks.enabled is false gets the hooks but does not run them.
After an install by hand; after connecting from Blossom, Disconnect does it, and removing Blossom takes out the hooks of every tool, see Removing it. Write the configuration without the hooks of the adapter to a new file, review it and put it in place:
jq '
def blossom: (.command // "") | contains("Application Support/Blossom/zcode/socket");
.hooks.events |= (map_values(map(.hooks |= map(select(blossom | not)) | select(.hooks | length > 0)) | select(length > 0)))
' ~/.zcode/cli/config.json > ~/.zcode/cli/config.cleaned.jsonThen check that nothing is left; this prints 0:
grep -c 'Blossom/zcode/socket' ~/.zcode/cli/config.jsonPermissionRequest only when a tool needs your confirmation, and reads hookSpecificOutput.decision.behavior, allow or deny, as its answer. Allow answers allow; Reject answers deny with the message "Rejected in Blossom.". When the hook prints nothing, ZCode goes on as it would without the hook. The rules are those of the Claude Code adapter, with one difference: a request not answered within fifty seconds leaves the panel. ZCode waits 60 seconds for a hook by default; the hook of PermissionRequest names its own timeout of 55 seconds, the field the page gives in seconds, and gives up at fifty, so it ends before that default even if the timeout of a hook were ignored. Always is offered only when ZCode suggests a rule in the shape of Claude Code, which its page does not show.Write, file_path and content, is the one the page shows, so it travels with the request. The page shows no other input, so any other tool carries its title alone.SessionStart is not installed.tool_use_id, saying what it does and never what it holds: the name of the file of Write, and a label for the rest. Subagents are not counted: ZCode sends no event of a subagent.Blossom-Process, and every five seconds the adapter asks whether it still exists; the tile leaves when it does not. If that process outlives its sessions, as the app itself would, a tile stays until ZCode quits.transcript_path is required, never read. The page says it names a temporary file deleted after the hook. The adapter takes a payload only when it carries transcript_path as text, as the code of the SDK does for Claude Code, and never opens it.UserPromptSubmit also finds where the session runs, with the shell of the SDK, and sends it in headers. A session of the app has no terminal device; the hook still sends the application that started it, from __CFBundleIdentifier, when ZCode passes it on.PermissionRequest sends what curl receives to /dev/null, and every command ends with || /usr/bin/true, so a hook never fails and never blocks: it never exits 2, which ZCode reads as a block. With Blossom closed, each hook gives up at once and ZCode works as before.matcher, which the page reads as every tool; an empty matcher would keep the whole file from loading.$HOME and nothing else without a default, and ignore your curl configuration with -q..claude/settings.json as Legacy and does not run them unless you import them in its settings. Do not import the hooks Blossom puts there for Claude Code: imported, they would post the sessions of ZCode as sessions of Claude Code, since they carry the transcript Claude Code always sends. The guard of those hooks does not test ZCODE_SESSION_ID, which the page says ZCode sets for its hooks: adding it would change the hook of every user of Claude Code and ask each to repair it, for a step only you can take.Read in the documentation, never seen in a run:
zcode is a command on the PATH of a Mac with ZCode, which is how Blossom finds it.command is sh, bash or zsh.timeout of a hook, in seconds, holds against a smaller timeoutMs of the whole file.PermissionRequest waits, or shows it at the same time.permission_suggestions and updatedPermissions take the shape of Claude Code.The adapter was tested with its hook commands run by sh, bash and zsh against the socket, with payloads written from the documentation, never captured from a run. Each check needs ZCode signed in, connected from Blossom, and Blossom running with the adapter. Write down what the line in italics asks.
hi. Does the tile appear with the prompt, with no badge, and turn green when the answer ends?