# Devin CLI adapter

Shows the sessions of Devin CLI, the program `devin`, in the notch, and lets you answer its permission requests from Blossom: working, done when a turn ends, needing you while it asks a question or presents a plan, what the tool in use does, its first prompt, its repository and its branch as its name, and its tool calls as steps.
Devin CLI reports through hooks: each hook posts its event with `curl` to a Unix socket in your own folder, `~/Library/Application Support/Blossom/devin/socket`, where this adapter listens. Blossom launches the adapter.
The hooks of Devin CLI take the groups of the hooks of Claude Code, with a payload and an answer of their own: no `transcript_path` and no `cwd`, the names of its tools in lowercase, such as `exec` and `edit`, and a permission answered with `decision`, `approve` or `block`. This adapter reads them with the code of the SDK that reads the hooks of Claude Code, told those differences.
The hooks are an entry `hooks` of your configuration of Devin CLI, `~/.config/devin/config.json`, added after yours. The files of a project, `.devin/hooks.v1.json`, `.devin/config.json` and `.devin/config.local.json`, are never touched.

**This adapter was written from the documentation of Devin CLI and was never run against a real one.** What the documentation says and what is only supposed is in [../../documentation/roadmap/devin.md](../../documentation/roadmap/devin.md); the checks at the end say what to look at.

You need:

- Blossom. It includes this adapter and the Bun that runs it; from a clone, `bun run build` makes one.
- Devin CLI, `devin`, signed in. The hooks follow the pages [Hooks](https://docs.devin.ai/cli/extensibility/hooks/overview.md) and [Lifecycle Hooks](https://docs.devin.ai/cli/extensibility/hooks/lifecycle-hooks.md), read on 2 December 2026.
- `curl` and `ps`, which every hook runs by their full paths under `/usr/bin` and `/bin`. The page says a hook runs a shell command; the hooks were tested with `sh`, `bash` and `zsh`.

## Connect from Blossom

The quickest way. Blossom finds `devin` on your Mac, in your `PATH` or the usual folders, and connecting it is one click: "Continue" on the second step of the introduction, with Devin CLI checked, or its switch in Settings > Agents. Blossom then adds this adapter to its configuration, starts it, and puts the hooks of `adapters/devin/config.json` in `~/.config/devin/config.json`, after the hooks you already have, as it does for Claude Code. Nothing 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/devin/`, 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. "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, which then holds what it held before. What Blossom writes and why is in [the decision](../../documentation/decisions/connecting.md). `/hooks` in Devin CLI lists the hooks it loaded and the file of each.

## Run Blossom with the adapter

From the root of the clone:

```sh
bun install && bun run bootstrap && bun run build
BLOSSOM_CONFIGURATION=adapters/devin/configuration.json apps/macos/build/Build/Products/Debug/Blossom.app/Contents/MacOS/Blossom
```

The notch shows nothing until a session of Devin CLI 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 devin cli` and exits.

An app opened from Finder reads `~/Library/Application Support/Blossom/configuration.json`; name the adapter there by its package, `{ "adapters": [{ "package": "devin" }] }`.

## What you should see

- Nothing when the session opens. The tile appears next to the notch with the first prompt, in initials, named after the first line of that prompt and the repository of the project, with its branch beside it.
- No badge while it works, and the tool in use in live.
- A permission request in the request panel when Devin CLI needs a decision before a tool: what it wants to run, with Allow and Reject. For `exec` it also carries the command, which the panel shows unless "Show what a request would do" is off.
- The amber badge, and no panel, while Devin CLI asks you a question with `ask_user_question` or presents a plan with `exit_plan_mode`: answer in the terminal.
- The green badge when a turn ends.
- The tile gone when the session ends.

## Install by hand

For a clone without the app. The `hooks` of `adapters/devin/config.json` go into your `~/.config/devin/config.json`, next to the hooks you have; the merge of [the Claude Code adapter](../claude/README.md#install-by-hand) does it, with `~/.config/devin/config.json` and `adapters/devin/config.json` in place of the files of Claude Code.

## Remove by hand

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](../../documentation/privacy.md#removing-it). The `jq` command of [the Claude Code adapter](../claude/README.md#remove-by-hand) does it, with `~/.config/devin/config.json` and `Blossom/devin/socket`. Then check that nothing is left; this prints `0`:

```sh
grep -c 'Blossom/devin/socket' ~/.config/devin/config.json
```

## What to know

- **Permissions are answered in Blossom, or in Devin CLI.** The page says Devin CLI runs `PermissionRequest` when a permission decision is needed, and shows a hook that approves one by printing `{"decision": "approve"}`; `{"decision": "block"}` with a `reason` denies an action. Allow answers `approve`; Reject answers `block` with the reason "Rejected in Blossom.". When the hook prints nothing and exits 0, Devin CLI goes on as without the hook. A request not answered within sixty seconds leaves the panel; the hook names a `timeout` of 65 seconds, the field the page gives. A request you answer in Devin CLI leaves the panel when the call runs, when the turn ends or after sixty seconds at the latest. Always is never offered: Devin CLI suggests no rule.
- **What a request would do.** The input of `exec`, `command` with `shell_id`, is the one the page shows, so the command travels with the request, after the other fields of the call as for every agent. The input of the other tools is not shown, so they carry their title alone.
- **Questions and plans are answered in Devin CLI.** `ask_user_question` and `exit_plan_mode` make the session need you from their `PreToolUse` until the next event of the session; their `PermissionRequest` gets no answer. How a hook could answer them is not documented.
- **The folder of a session.** The payload carries no `cwd`. Every hook sends `DEVIN_PROJECT_DIR`, the root of the project the page says Devin CLI sets for its hooks, in the header `Blossom-Folder`, only when it is an absolute path of 1024 characters at most of letters, digits, spaces and `. _ / @ , + = : % -`; the adapter checks it again and takes it only when the payload names no `cwd`. A folder with other characters, such as an accent, leaves the session named after its prompt alone.
- **A session shows up with its first prompt**, or with a permission request. `SessionStart` and `PostCompaction` are not installed.
- **The name and the steps** follow the Claude Code adapter: the first line of the first prompt, the repository and the branch of the project; one step per tool call, paired by the name of the tool, since the payload carries no identifier of the call, saying what it does and never what it holds: a label for each tool, such as `Running a command` for `exec`. A call whose `tool_response` says `success: false` fails. Subagents are not counted: Devin CLI sends no event of a subagent.
- **The terminal of a session.** The hook of `UserPromptSubmit` also finds the terminal the session runs in, with the shell of the SDK, and sends it in headers.
- **The hooks send the whole payload, and the adapter keeps a few fields.** Each hook posts the payload as Devin CLI gives it on standard input, your prompt and the input and output of tools included. The adapter keeps the identifier of the session, the title taken from the first line of the prompt, the name of the tool and the words of its step, whether it failed, the folder, and for a permission request what it would do while it waits. Nothing else is kept, logged or sent to Blossom.
- **The hooks print nothing but the answer to a permission.** Every hook but that of `PermissionRequest` sends what `curl` receives to `/dev/null`, and every command ends with `|| /usr/bin/true`, so a hook never fails and never exits 2, which Devin CLI reads as a block. With Blossom closed, each hook gives up at once and Devin CLI works as before.
- **A session whose `devin` was killed leaves within seconds.** Every command names the parent of its shell, which is supposed to be Devin CLI, in the header `Blossom-Process`, and every five seconds the adapter asks whether it still exists.
- **The hooks name `$HOME` and nothing else without a default**, and ignore your curl configuration with `-q`.
- **Devin CLI also runs the hooks of Claude Code, and a session is counted once.** Devin CLI loads the hooks of `~/.claude/settings.json`, `~/.claude.json`, `~/.claude/settings.local.json` and those of `.claude/` in a project, unless `read_config_from.claude` is turned off. Every hook Blossom puts there for Claude Code tests `DEVIN_PROJECT_DIR` first and ends before it posts when it has a value, and the Claude Code adapter takes no payload without `transcript_path`, which Devin CLI does not send. So a session of Devin CLI posts only to this adapter, and its permission requests are held once. A test runs both sets of hooks as Devin CLI would.
- **Devin Desktop and the cloud.** The page says the same events fire in Devin Desktop and in cloud sessions, through plugins. A session of Desktop that reads `~/.config/devin/config.json` would show as one of Devin CLI; that is not documented. A cloud session runs on another machine and cannot reach the socket.
- **The socket is yours alone.** See [../../documentation/decisions/socket.md](../../documentation/decisions/socket.md).

### Not confirmed

Read in the documentation, never seen in a run:

1. That the parent of the shell of a hook is the process of Devin CLI, the same on every event of a session.
2. That `{"decision": "block"}` from the hook of `PermissionRequest` denies the call, as the page says of an action, and that Devin CLI waits for the hook up to its `timeout` before it asks in its terminal.
3. That the payload carries no `cwd`, as the page shows, or carries the one the adapter prefers.
4. That `DEVIN_PROJECT_DIR` is set for the hooks of the user configuration, as the page says of every command hook.
5. That `tool_response.success` is `false` for a call that failed.
6. That `devin` is the name of the program on the `PATH`.

## Checks by hand

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 `devin` signed in, connected from Blossom, and Blossom running with the adapter. Write down what the line in italics asks.

1. **A turn.** In a repository, ask `hi`. *Does the tile appear with the prompt and the repository, with no badge, and turn green when the answer ends?*
2. **A permission.** Ask `run the shell command touch probe.txt`. *Does the request panel open with the command, and does Devin CLI show its own prompt at the same time or only after the panel?* Answer Allow. *Does `probe.txt` exist?* Ask again with `rejected.txt` and answer Reject: *is there no file, and does Devin CLI say it was rejected in Blossom?*
3. **Answering nowhere.** Ask `run the shell command touch late.txt` and wait more than a minute. *Does the request leave the panel, and does Devin CLI still take an answer?*
4. **A question.** Ask `use ask_user_question to ask me which database to use`. *Does the tile turn amber with no panel?*
5. **Counted once.** With Claude Code connected too, ask `hi` in Devin CLI. *Does one tile show, of Devin CLI, and none of Claude Code?*
6. **The end.** Quit `devin`. *Does the tile leave at once?* Start it again, ask `hi`, and `kill -9` its process. *Does the tile leave within about five seconds?*
