buildMessages now sends a role:"system" notice partway through a conversation as a user prompt that keeps its cache mark and its place. Before, the notice was lost or merged away. A notice that arrives while tool calls are still waiting for results is held until those results are answered, so it never comes between a call and its result. A notice after an interrupted call goes after the missing-result placeholder. An empty notice is skipped.
By leosocy (#599), reviewed at 647039a.
Run on the Mac mini with Bun 1.4.2 and HOME=$(mktemp -d), on 647039a merged with main 1a05a77:
- `bun test packages/devin`: 182 pass, 0 fail.
- The new tests on main's index.mjs: 4 of cache-marks.test.mjs fail (13 pass, 4 fail), as they should.
- Whole repo `bun test` (with #606 and #596 merged in too): 4592 pass, 11 skip, 0 fail. `bun scripts/check.mjs`: exit 0.
Not tried: a real Devin account.
zelong77 asked for two things once 0.1.30's keep-alive worked: the pings
were invisible in magpie, and the interval and ping count could only be
edited in plugins.json.
- Each ping that wasn't cut short is reported through magpie.usage (new
in magpie, plugins#592) with kind cache_keepalive, the conversation's
model (chat.model) and account (magpie.account at request time), its
input, output, cache read and write tokens, status, time, and why it
failed. The ping still goes straight to Devin, never back through the
gateway: the gateway re-shapes a request, and the cache would no
longer match. An older magpie or OpenCode has no magpie.usage and is
told nothing; the pings go on the same.
- pingOnce now also reads output tokens (usage field 3) and keeps the
failure's message.
- package.json magpie.options gives the two settings' defaults
(285 s, 6), which magpie's Plugins › Options editor now starts from
for a provider plugin. The switch's description says where they are
and that pings show in Usage, in all five languages, each under the
host's 300-character cap.
Run (on mote, sandbox HOME): bun test in packages/devin, 174 pass;
bun scripts/check.mjs devin ok.
Broken by hand: reporting aborted pings too fails "a ping cut short by
the conversation's next request isn't told"; dropping the report call
fails "each ping is told to magpie".
Not tried: a real Devin account's ping reported into a real magpie.
Devin's prompt cache lasts 5 minutes and has no longer TTL to ask for.
A switch, "Keep the cache warm" (cache_keepalive, off by default, with
zh, zh-TW, ja and de labels), keeps it as the CLI's cache_keepalive.rs
does: after a reply that read or wrote the cache, whatever it stopped
for, the same GetChatMessage goes again every 285 s with one more user
prompt, "continue", and max_tokens 1. The request's bytes are encoded
once, and the ping is them with that prompt and field 8's max_tokens.
- A conversation is session + Claude Code agent id (when the headers
reach the plugin) + a hash of the instructions, tool names and first
user message; its next real request stops its pings, so a subagent
never stops its lead's.
- Stops on 401, 402, 429, two pings in a row reading under half their
prompt from the cache, the most pings (6), the switch going off, and
process exit. Timers are unref'd. At most 32 conversations are kept.
- Options cacheKeepaliveInterval (30-299 s) and cacheKeepaliveMaxPings
(1-50); OpenCode, which has no switch, takes cacheKeepalive: true.
- README says the cost (each ping is a cache read of the whole context,
spent whether the user comes back or not) and why it is off.
Run (mote, HOME=$(mktemp -d)):
- bun test packages/devin: 170 pass, 0 fail (14 new in keepalive.test.mjs).
- Whole repo bun test: 4520 pass, 9 skip, 1 fail: gcp-ai's "a lock held
by another process is waited for, then taken" (ENOENT in abandoned()'s
stat, a race in lib/lock.mjs; passes 3 of 3 alone), filed as #594.
- bun scripts/check.mjs: ok.
- The new tests against the old index.mjs: 14 of 14 fail.
Broken by hand, each red in the test named for it: no cancel on the next
request, no agent id in the key, no prefix hash, no stop on 401/402/429,
no miss count, no cap, no unref, max_tokens kept, pings after a reply
that touched no cache.
Real account (the owner's Devin sign-in read, nothing written, sandbox
HOME, this Mac): claude-sonnet-5-5-low, an 11k-token prompt wrote 10,984
to the cache; one ping 287 s later read 10,984 from it (cacheWrite 3,
output 1) and, at max 1, stopped.
Not tried: more than one ping or a long Claude Code session; the OpenCode
2 (v2) path, which has no keepalive. magpie doesn't pass
x-claude-code-session-id / x-claude-code-agent-id to a plugin's fetch, so
under magpie the key rests on the prefix hash (a lead and a subagent
differ there; two sessions with the same prefix share one keepalive).
0.1.28 moved Devin's Claude models onto Anthropic's Messages API, where
a failed result arrives as tool_result is_error. On chat completions
magpie's gateway writes it into the text, "Error: " first (failedAsText:
Devin has no failed mark), and TestPluginToolFailureSaid holds that; the
Messages path dropped is_error. It now says it the same way.
Run:
- mote-run: HOME=$(mktemp -d) bun test in packages/devin, 156 pass 0
fail; bun scripts/check.mjs ok.
- Broken by hand: without the prefix the new test fails.
Not tried against the real Devin API (the change is text only).
Claude Code's growing classifier history read only ~558 tokens from
Devin's cache: the plugin declared @ai-sdk/openai-compatible for every
model, so magpie turned Anthropic Messages into chat and the blocks were
joined into one text with no cache_control, and encodeMsg never sent
ChatMessagePrompt.prompt_cache_options.
- Claude models (id matching /claude/i) now declare @ai-sdk/anthropic
(config provider.npm, runtime api.npm, variants {effort}); every other
model is unchanged (chat, {reasoningEffort}).
- The loader serves .../messages: buildMessages makes each text block,
system block, assistant text, tool-call turn and tool result its own
ChatMessagePrompt in order, every boundary kept (yetone/magpie#3835),
with field 8 {1: 1} (EPHEMERAL) where the client put cache_control.
The encoding is the devin CLI's own: a capture of devin 3000.11.92
through a recording proxy carries 0801 at field 8 of its user prompt.
Claude Code's billing line (cch changes each turn) is dropped. Tools
with a server type are not offered; tool_choice none offers none.
Effort: output_config.effort, else the thinking budget, none when
thinking is disabled.
- Replies come back as Anthropic's message / SSE events, usage with
cache_read_input_tokens and cache_creation_input_tokens; errors in
Anthropic's shape, X-Magpie-Sign-In: kept; /messages/count_tokens 404.
- The chat path's request bytes are unchanged (build's tail moved into
encodeRequest).
Run:
- mote-run: HOME=$(mktemp -d) bun test in packages/devin, 155 pass 0
fail (19 files, at this tree rebased on 42a5055); bun scripts/check.mjs
ok.
- Broken by hand: without the field 8 line, 3 of the 8 new tests fail;
with user blocks joined into one prompt, the two cache tests fail.
- Real Devin account (sandbox credentials, the plugin's completeMessages
called directly, no magpie), the issue's sequence ~7.3k tokens, first /
resend / grown history / resend, cache read/write:
claude-haiku-5-5 whole: 558/6760, 7318/0, 7318/560, 7878/0
claude-opus-5-5 streamed: 558/6760, 7318/0, 7318/560, 7878/0
old 0.1.27 chat path, same text: 558/6787, 7345/0, 558/7344, 7902/0
A tool round trip on haiku (streamed tool_use, then a tool_result
marked, two assistant text blocks as two prompts) answered correctly.
Not tried: through a magpie gateway end to end with Claude Code (the
non-streaming Messages path for plugin accounts is yetone/magpie#4571);
images in a Messages request against the real API; the v2 (OpenCode 2)
path, which is unchanged.
zws13579 (magpie Discord #general, devin 0.1.26): a Devin Free plan
account ($0) can't use SWE-2 through the plugin, while Devin CLI/Desktop
can. They listed five places SWE-2 could be lost silently; checked each
against the code:
1. configsFor swallowed every error (real). Its reason is now kept
(c.error), logged once to stderr when the asks start failing (the host
routes it to magpie's log), and usage adds an aside row "Free models:
unknown: Devin's model list couldn't be read (<reason>)" when a quota
window exists and Devin has never answered for the account. The windows
still count every model then (a failed read means unknown).
2. notModels only rides on a window (as designed: with no window nothing
counts SWE-2). A plan with no quota window gives none and no error;
a test holds that. The real gap behind it was 1, now visible.
3. A family the account's list leaves out (picked from SNAPSHOT's list,
which the OpenCode config offers) went to Devin as the bare family id
("swe-2"). variantFor now falls back to SNAPSHOT's family, so it goes
as swe-2-high (swe-2-max at max). The listing is unchanged: no model
is added that the account's list doesn't have.
4. variantFor's effort-less default and listed()'s free check took
f.models[0]. Devin's captures (10-14, 10-15) list swe-2-high first, so
it isn't hit today, but a first -lightning variant (High cost tier)
would have sent effort-less SWE-2 to a paid variant and unmarked it
free. defaultModel skips such suffixed variants.
5. v2Models/v2Setup: not a magpie path. magpie's host loads server()
(DevinAuthPlugin), whose usage hook carries notModels; OpenCode 2 has
no usage hook, and a free model's cost there is already 0.
usage.test.mjs's stub answered GetCliModelConfigs with a JSON parse
error, so those tests ran with the model list unreadable; it now serves
a one-model list, so they test what they name.
Run (mote, from the repo root, as CI): HOME=$(mktemp -d) bun test:
3866 pass, 9 skip, 0 fail; bun scripts/check.mjs: every package ok.
Broken by hand: the new free.test.mjs against origin/main's index.mjs:
3 red (lightning default "swe-2-medium-lightning", bare "swe-2", no
"Free models" row), 6 green.
Not tried: a real Devin Free plan account. No Free plan GetUserStatus or
GetCliModelConfigs has been captured, so whether Devin gives a Free
account SWE-2 at the Free cost tier (its pricing lists free SWE-2 for
Pro) is unknown; nothing here assumes a shape for it.
blue12345655 (magpie Discord #help): a Command Code account signed in
through the plugin was signed out, and magpie offered no 重新登录, on
v0.1.1844 and still on v0.1.2021.
Cause: commandcode said X-Magpie-Sign-In "kept" on every answer and
signIn "kept" on every usage read, so a revoked key came back as a card
saying "Unauthorized" while magpie kept the account signed in, routed to
it, and never showed Sign in again on its rows. Devin and Kiro did the
same in their usage reads: their errors already said "sign in again",
but "kept" stops magpie from reading those words.
- commandcode: a usage read whose credits are refused (401/403), or a
request answered 401, asks /alpha/whoami; when whoami refuses the key
too, the usage says signIn "expired" with "Command Code's sign-in has
expired; sign in again", and the answer carries X-Magpie-Sign-In:
expired, its body unchanged. A 403 for a model the plan lacks, a 401
whoami still takes, and a whoami 500 keep the account. A clean usage
read says "renewed", which takes a mark off.
- devin: a usage read Devin answers 401 says "expired"; a clean read
"renewed"; other failures "kept". Requests unchanged.
- kiro: a usage read whose sign-in Kiro refused (the errors made by
gone) says "expired"; a clean read "renewed"; other failures "kept".
auth.refresh and requests unchanged.
The response bytes in commandcode/signed-out.test.mjs are what
api.commandcode.ai answered an unknown key on 2026-10-29 (whoami,
billing/credits, billing/subscriptions, provider/v1/chat/completions).
Run (WSL magpie-desktop, Bun 1.4.2, HOME=$(mktemp -d)):
- bun test in packages/commandcode: 82 pass, 0 fail; packages/devin:
142 pass; packages/kiro: 67 pass.
- bun scripts/check.mjs: every package ok.
Broken by hand: signed-out.test.mjs against the 0.1.18 index.mjs, 4 of
9 red (usage expired, clean read renewed, Provider API expired, Go
expired). kiro's and devin's changed usage tests against their old
index.mjs: red ("kept" received where "expired" expected).
Not tried: a real revoked Command Code, Devin or Kiro account; the
whoami check is only against an unknown key's real answers.
songyq26's Kimi Code Read tool (line_offset: anyOf of two integers) and
any Optional field made every devin/gemini-4-argon request 400 "There is
an issue with this request". The cause is a type beside the anyOf:
magpie's gateway (geminiToolTypes) writes the type the branches agree on
beside an untyped anyOf for a Gemini-named model, and Devin's Gemini
models refuse {type: T, anyOf: [...]} anywhere below the root. An untyped
anyOf, a root anyOf and a oneOf beside a type are taken, which is why the
reporter's matrix showed oneOf as OK.
geminiSchema now changes only an anyOf beside a type, at depth > 0: null
branches become nullable, one branch left of the same type (or none) is
merged into the schema, two or more go as a oneOf (into allOf if a oneOf
is already there). The recursion already reaches properties, items,
additionalProperties and anyOf/oneOf/allOf members, so each gets it.
Run:
- HOME=$(mktemp -d) bun test in packages/devin (on mote): 119 pass, 0 fail.
bun scripts/check.mjs devin passes.
- Broken by hand: with index.mjs at origin/main, 9 new tests fail
(8 fixtures incl. kimiRead from the reporter's literal line_offset, and
the unit test); the 30 others pass.
- Real account, plugin fetch to gemini-4-argon: on 0.1.24, typed anyOf in
properties / items / of objects and Kimi's line_offset with the
gateway's type 400; untyped anyOf, root anyOf and typed oneOf 200. With
this change all 17 probe shapes 200. A first try that turned every
nested anyOf into a oneOf made {nullable, oneOf} with no type, which
Devin refused, so untyped anyOf is left as it came.
Not tried: Claude / swe-2 models live (their path is unchanged);
other plugins (grok, qoder, workbuddy, kimi-work) have their own
cleaners for other vendors' rules and don't share geminiSchema.
Releases #396 (metadata.cli saved as "true", so OpenCode 1 keeps the
account). Adds the test #396 lacked: the "Devin CLI's sign-in" method,
with a sandbox credentials.toml and a stubbed GetUserStatus, must save
cli as "true" and every metadata value as a string.
Run: bun test in packages/devin (sandbox HOME): 102 pass, 0 fail.
bun scripts/check.mjs devin passes. With index.mjs put back to
`cli = true`, the new test fails and the other cli-key test passes.
By mameikagou. Reviewed at 0966b4b (comment on #297); squashed onto
origin/main dc59000 with the version bump.
Run at this tree: HOME=$(mktemp -d) bun test: 2083 pass, 0 fail;
bun scripts/check.mjs ok. Earlier, at 0966b4b with main's
packages/devin/index.mjs put back, the three new or changed tests
(empty-reply, error-after-metadata, metadata-only) were red.
Not tried: a real Devin account answering with an empty reply.
Co-authored-by: mameikagou <mameikagou@users.noreply.github.com>
Two Devin organizations under one email both answered GetUserStatus with
the same email, so the plugin saved both sign-ins as the same
metadata.email and magpie's host (settle, which matches on it) put the
second over the first. The account is now named "email · <organization>"
when Devin names an organization (devinInfo.accountDisplayName) that isn't
the email, with orgId and teamId in its metadata. The usage hook brings an
older sign-in's name and ids up to date through client.auth.set, which the
host scopes to that account. `devin auth status`'s Team ID must match
before the CLI is taken to answer for a key. An account with no
organization in its status is left as it was and nothing is written.
Existing users: on the next usage poll, a sign-in whose status names an
organization is renamed "email · <org>" once; its slot, key and plan stay.
metadata.orgId and teamId aren't read by magpie's host today; the slot
split comes from the distinct name. The magpie side (a CLI account's label
overwritten by `devin auth status`) is yetone/magpie#3198.
Run at the reviewed head 7d589ab45323ee46a03af0f4b496c2dc94e67ba4
(base af360a5), on macOS, bun 1.4.2:
- HOME=$(mktemp -d) bun test: 2051 pass, 0 fail; bun scripts/check.mjs ok.
- Red without the change: the two new tests (identity, usage) fail against
main's index.mjs.
- Ad-hoc test (not committed): a status with no organization writes
nothing through auth.set and keeps the name; an organization named as
the email adds no suffix.
- With #297's change on the same tree: 2052 pass, check ok.
Not tried here: real Devin accounts (the author reports two live Devin Max
organizations under one email on Windows 11).
magpie's built-in Devin (internal/gateway/devin.go buildDevin) sends the
images a tool returned on the tool message that answers the call
(inlineImages(p.Images), field 10). A chat's tool message holds text
alone, so magpie's gateway hands the plugin those images in the user
message after the results (buildChat's seeLater: "[From the result of
<tool> (tool call <id>):]" then the images, and the result's text ends
"[The tool returned an image; it follows in the next message.]"). The
plugin sent them to Devin as a user message of their own, and a tool
message's own image_url parts were dropped.
build() now puts each result's images back on its tool message: the
images under a heading naming a result just sent, up to the number its
note says (so the user's own images after them stay the user's), and a
tool message's own data: image_url parts. The note is taken off the
result's text when every image it names went back with it; an empty
result is "(no output)", as the built-in words it. Images without bytes
(URLs) are left out, as inlineImages leaves them. A heading that names no
result just sent is left as the user's text.
Run:
- bun test in packages/devin under a mktemp HOME: 93 pass, 0 fail.
- bun scripts/check.mjs devin: ok.
- tool-images.test.mjs against the old index.mjs: 3 of its 4 tests red
(the fourth guards a heading naming no result, which held before too).
With the count limit broken by hand (images past the note's number taken
as the tool's), the two-results test goes red.
- The fixtures in testdata/ are magpie's literal buildChat output at
origin/main b03031738, captured with a throwaway test in a separate
magpie worktree (codexViewImage, and an Anthropic request with two Read
results and the user's own image).
Not tried: a real Devin account (whether Devin's model reads a tool
message's images better than a user message's was not measured); OpenCode
itself, outside magpie, whose own shape for a tool's images was not read.
Devin's GetChatMessage has no field for the answer's format, so magpie's
built-in Devin (internal/gateway/devin.go, req.inSystem()) told the model
in the instructions: the json_schema's schema, or any JSON object for
json_object. The plugin dropped response_format, and magpie's generic
plugin path falls back to inSystem only when an upstream answers 400
naming the format, so a moved user asking for JSON got prose. build()
now adds the built-in's words (format.go's instruction) after the
system messages, ahead of the tool descriptions, at the head of the
first user message. A json_schema with no schema asks for any JSON
object, as the built-in's openAIFormat reads it.
Checked against the built-in, no change needed:
- Lightning variants (swe-2-high-lightning, swe-1-7-lightning-medium):
the built-in's tiers are fast and priority only (devinTiers), so a
-lightning id is no effort and no tier and is listed as its own model,
as the plugin lists it.
- A failed tool's result: magpie sends its content as "Error: …", and
build() passes a tool message's text to Devin as it came; a test now
holds that.
Run: HOME=$(mktemp -d) bun test in packages/devin: 89 pass, 0 fail.
structured-output.test.mjs: 3 of its 5 tests red with the index.mjs
change taken out (the other two: no format unchanged, and the
"Error: " pass-through). bun scripts/check.mjs devin: ok.
Not run: a real Devin account, nor magpie end to end.
太陽と向日葵 on magpie's Discord: Usage no longer shows what calls through
Devin cost. Two causes, both in what the list gives magpie:
- Every model went with a price of 0 (runtimeModel's cost), and magpie
falls back to models.dev, which has none of Devin's own models (SWE-2,
SWE-1.7 Lightning). Devin lists each paid model's price in
GetCliModelConfigs: field 32 of a config, one per "Input", "Cached input"
and "Output", a float32 in USD per "1M tokens". parsePrices reads it
(fields() now keeps a fixed32's bytes), and listed() gives an entry the
price its variants share, none when they differ. Read from Devin's own
response on 10-15: Opus 5.5 4/20 (cache 0.2), its fast run 8/40, SWE-1.7
Lightning 2.5/12.5, SWE-2 Lightning 1/5, GLM-5.2 1.4/4.4. The Free tier
lists none.
- Devin now files swe-2-high-, -medium- and -max-lightning under SWE-2 at
the High cost tier. A family was free only when every model under it
was, so swe-2 lost free (seen in the owner's plugin-providers.json on
0.1.17), and with it 0.1.16's rule that a used-up day and week don't hold
SWE-2. A family is now judged by the variants variantFor sends it as:
those at an effort and its default.
Run: HOME=<mktemp -d> bun test in packages/devin: 84 pass. prices.test.mjs
uses Devin's real GetCliModelConfigs bytes of 10-15, cut to 11 configs
(testdata/model-configs-1015.bin, no account data in it). Without the
index.mjs change: 3 of its 4 tests red. Broke by hand: the family's free
over every model again turns 2 red; cost back at 0 turns 1 red.
bun scripts/check.mjs devin: ok. Every price above checked by decoding the
full real response with a separate Python reader.
Not run: magpie end to end with this version (magpie reads a plugin's
price from its next commit on).
7eleven, in ZCode on devin/gemini-4-argon, got every turn refused:
"Devin: There is an issue with this request, please try a different
model." (invalid_argument). It is the request content, on Gemini models
only. On a real account, gemini-4-argon, gemini-3-1-pro and
gemini-3-8-flash refuse a request offering a tool whose schema has, at
any depth:
- a list type: ["string","null"], ["string"], ["string","number"];
- type "array" with no items, items true, or items that are a list;
- properties with no type;
- an enum with no type.
claude-sonnet-4-6 and swe-2 take all of them. Nullable written as anyOf,
items {}, nullable:true, const, $ref/$defs, additionalProperties and
format all go through on Gemini.
geminiSchema rewrites them, for a Gemini uid only:
- a list type becomes its one type, nullable when it had "null", or
anyOf of each type;
- such an array's items become {} (a one-schema list becomes that
schema);
- a schema with properties gets type object;
- an enum gets its values' type, and an enum of mixed values is dropped.
The caller's schema is not changed. Claude and swe-2 requests are byte
for byte what they were.
What was run:
- HOME=$(mktemp -d) bun test packages/devin: 80 pass.
- gemini-schema.test.mjs, with the gemini line in build() turned off by
hand: 10 red, one per refused shape.
- bun scripts/check.mjs: ok.
- Real account: each refused schema, sent as built here, went through on
gemini-4-argon-medium and gemini-3-1-pro-high.
- build() end to end with a search tool holding a list type, an array
with no items and an untyped enum: gemini-4-argon called the tool, where
0.1.16 got invalid_argument. claude-sonnet-4-6 called it on both.
Not tried: ZCode itself against the plugin. The reporter's exact tool is
not known; ZCode's own zod 4 tools write anyOf, so it is likely one of
their MCP or plugin tools.
太陽と向日葵 on magpie's Discord: SWE-2 costs nothing, but with the
account's quota used up magpie said so and didn't send SWE-2 to the
account, while a test of the model worked.
Devin's GetCliModelConfigs gives each model a model_cost_tier (field 24;
the CLI labels 1-4 "Low cost", "Med cost", "High cost", "Free"). On the
owner's account on 2026-10-14, of 262 configs only swe-2-high, -medium
and -max were 4. The plugin now reads that (parseFree), lists those
models and the entries standing only for them (swe-2) with free: true,
and gives the "1 day" and "7 days" windows notModels with their ids, so
magpie's allowance no longer counts them. ACUs are unchanged. When
Devin's configs can't be read, nothing is marked free and the windows
count every model, as before.
Run: bun test in packages/devin (58 pass) with HOME and TMPDIR in a
scratchpad dir; bun scripts/check.mjs. Broke it by hand: FREE_TIER=5
fails 3 of free.test.mjs's tests; dropping notModels fails the usage
one. Not tried: an account whose quota is really used up (the owner's
had 100% of the day and week left), so that Devin itself serves SWE-2
then is the reporter's word, not checked here.
On Windows the devin CLI reads %APPDATA%\devin\ whatever folder it is
given (#17), so cliAnswersFor turned it away for every account before
looking at whose sign-in it reads, and an account without the CLI never
asked at all. Both kept the 2026-09-30 SNAPSHOT, which has no Gemini 4
Argon; moving a built-in Devin with it ticked then failed with "the
plugin doesn't serve Gemini 4 Argon" (NieiR).
The list now comes from GetCliModelConfigs, asked with the account's
token (the call the plugin already made for images): its configs carry
each model's label, context (18), output (model_info 13), family uid
(model_info 23) and family label (30.1). Read over Devin's real response
for the owner's account, parseConfigFamilies gives exactly the 52
families and 262 variants `devin models list --format json` prints, in
its order, less Adaptive and Fusion. When Devin can't be asked, the CLI's
list is used if the CLI names the account Devin names the token's, even
when it reads its own folder (the Windows case); else SNAPSHOT, now
refreshed from the CLI (Gemini 4 Argon and Claude Haiku 5.5 added,
Inkling and Claude Sonnet 4.5 kept for the accounts still offered them).
Run:
- TMPDIR/HOME in a scratch dir, bun test packages/devin: 54 pass, 0 fail.
With index.mjs put back to 0.1.14, the 4 new identity tests fail
(parseConfigFamilies missing; familiesFor without gemini-4-argon;
"models list" never run for a same-account CLI reading its own folder;
provider.models without gemini-4-argon).
- bun scripts/check.mjs devin passes.
- Real account (owner's Devin, sandbox HOME, no devin CLI on PATH):
provider.models gave 85 models with gemini-4-argon (1048576/1000000)
and claude-haiku-5-5; 0.1.14 gave the declared list only.
Not tried: the Windows box itself; the new path doesn't run the CLI.
Devin plans billed by quota have a daily and a weekly quota. GetUserStatus
answers in proto JSON, which leaves a 0 out, so a week with nothing left
came as no weeklyQuotaRemainingPercent at all beside the day's 100. usage
skipped a window whose share was left out, so the card showed "1 day 0%"
alone and magpie's routing, seeing no full window, kept sending to an
account Devin refuses until the week resets.
On a BILLING_STRATEGY_QUOTA plan a window with a reset time and no share
is now used up (100%, its reset kept), so routing holds the account until
then. A hidden quota and one with no reset are still not shown, and a plan
billed otherwise still has no quota windows from a share left out.
usage.test.mjs: the new test (the week left out beside the day's 100, and
both left out) fails on 0.1.13 and passes now; the old test that took a
left-out share for "no quota" on a quota plan is replaced.
HOME=$(mktemp -d) bun test packages/devin: 50 pass, 0 fail.
bun scripts/check.mjs devin passes. Against the owner's real Devin Teams
account (read-only GetUserStatus): both windows are read as before
(1 day 0%, 7 days 1%), so present shares are unchanged. A real account
with the week used up wasn't available; the left-out field is how the
reporter's card lost its week.
SWE-2 names a call after its tool and turn ("Bash:0#a65b6a5e02194b87bbc796c4428c946d"), and the plugin passed that on as the call's id. Claude Code takes a tool_use id only of [A-Za-z0-9_-]: it dropped every such call and the turn failed with "The model's tool call could not be parsed (retry also failed)". Codex and pi take any id and were fine.
An id with any other character, or one that begins "dv_", now goes out as "dv_" and its base64url (stateless, so it holds across restarts and accounts); build() turns it back into Devin's own id on the assistant's call and on the tool result that answers it, so Devin still sees the id it gave. A safe id goes both ways as it came. magpie passes a chat tool_call id through unchanged to Anthropic's tool_use.id, Responses' call_id and Chat, so the one mapping covers all three.
tool-ids.test.mjs builds Devin's reply frame from the reporter's literal id: with the change taken out, both the whole and the streamed test fail (Received: "Bash:0#a65b6a5e02194b87bbc796c4428c946d" against /^[A-Za-z0-9_-]+$/); with it, the id out is safe and the call and its result reach Devin as "Bash:0#a65b…". HOME=$(mktemp -d) bun test packages/devin: 45 pass; the 4 CLI tests in identity.test.mjs time out at 30 s on this Mac with and without the change (a script just written under $TMPDIR doesn't start: exec of a fresh /bin/sh script hangs here), and pass in CI. bun scripts/check.mjs devin passes. Not tried against a real Devin account.
An agent can send one turn's tool calls in two assistant messages in a
row, answered together after. build() answered the first message's calls
at the second one: toolu_a went to Devin as "Tool use was interrupted and
did not produce a result." and its real result A! was dropped.
joinSplitCalls now joins an assistant message onto an assistant message
before it that made tool calls, as Anthropic reads consecutive assistant
messages and as magpie's built-in buildDevin does since 7067fce5. A call
of the split turn that really went unanswered is still answered for; two
text-only assistant messages stay two.
split-calls.test.mjs is #1275's request in Chat form: 3 of its 4 tests fail
on 0.1.10 and pass now. HOME=$(mktemp -d) bun test (43 pass, 0 fail) and
bun scripts/check.mjs pass. Not tried against a real Devin account.
objectRoot dropped any anyOf/oneOf branch that was itself a union. Codex
desktop's automation_update (zod 4: root anyOf of view, delete, and create
and update, each a union on kind) folded to only view's mode and id, both
required, so the model was offered a tool that could only view. Found
while fixing the same fold in magpie's built-in for #1271.
A nested union branch is now folded first (up to 8 deep); a field the
root doesn't define takes every distinct schema the branches give it, as
anyOf when they differ; a field every branch requires stays required.
Verified: schema.test.mjs's new test fails on 0.1.9 (no "name" among
[id mode]) and passes now; HOME=$(mktemp -d) bun test in packages/devin:
39 pass, 0 fail.
success() named a key's account by `devin auth status`, run with APPDATA and XDG_DATA_HOME set to a data folder of the plugin's own; the Windows CLI ignores both and reads %APPDATA%\devin\credentials.toml whatever it is given, so every browser sign-in was named after the CLI's own account. familiesFor() had the same flaw: `devin models list` there lists the CLI's account's models for every key.
- success() asks GetUserStatus with the key (the call usage() makes, now shared as userStatus()) and names the account by its email (or name) and tier (TEAMS_TIER_DEVIN_PRO is "Devin Pro", else planName); a key Devin refuses (401) fails the sign-in. Only when Devin can't tell does it fall back to the CLI.
- identity() no longer trusts a CLI whose report names a credentials file outside the data folder it was given (the "File:" line); it can't tell then, and the account is "Devin".
- familiesFor() asks the CLI for a key's models only once the CLI answers for it: it reads the key's folder, and the account it names is the one GetUserStatus names. Otherwise (Windows) the account keeps the declared SNAPSHOT list, and the CLI isn't asked again for that key.
identity.test.mjs (a fake devin CLI always signed in as a@x.dev): key B is named b@x.dev; a refused key fails; with Devin unable to tell, a CLI reading its own folder doesn't name the account and one honouring the folder does; the models list isn't taken from a CLI that reads another folder or names another account, and is from one that answers for the key. They fail against 0.1.6. HOME=$(mktemp -d) bun test (474 pass) and bun scripts/check.mjs pass.
.github/workflows/publish.yml runs the tests (in a throwaway HOME) and
scripts/publish.sh on each package.json change pushed to main, or by hand;
npm's OIDC exchange stands in for a token and an OTP. Every package now
names magpie-community/plugins' publish.yml as its trusted publisher on
npmjs.com, and gets the repository field npm checks it against.
- every {type:"failed"} carries an error reason magpie shows
- commandcode/devin: accounts taken from the CLI are marked metadata.cli and re-read its credentials on each request, usage and models
- factory: a refused refresh answers 401 authentication_error (Anthropic shape on /llm/a/, OpenAI's elsewhere) instead of throwing; the whoami back-off is per account; 403 hints name the account to sign in again
- versions: factory/devin/commandcode/cursor/kiro/mimo/zed/zcode 0.1.2, workbuddy 0.1.3