The website colour reader parsed each channel with from_str_radix, which accepts a leading '+', so a malformed colour such as #+1+2+3 was read as rgb(1,2,3). Each channel must now be two hex digits.
OpenCode prints its typed error on stdout and only "HTTP 503 Service Unavailable" on stderr, and a failed run's error kept only stderr. So the retry for a server still starting its plugins never saw the typed answer, and the person was shown the bare HTTP status (#1859). Model discovery now reads the typed line, retries on its tag, names its message in the error and keeps it in the details.
A Windows game's folder copied to Linux or macOS has no file with an executable bit, so no program was found and Deep mode skipped the decompiler. A Windows .exe now counts as the program to study on every system, while runtime study starts only a program this computer can run, in both its window and console runs.
Follow-up to #1941. Where a program is about to start or be checked (Play, making a pin, the build's run and screenshot checks), Cargo itself is asked for its target directory, which also covers CARGO_BUILD_TARGET_DIR, the Cargo home's config and a parent workspace's target folder. The Project screen keeps the file lookup, so it starts no process; without Cargo the result is the file lookup. Outside the project only a program the manifests name is taken.
An API backend's `tools` setting (auto, lean or full) could only be changed by editing config.toml. Settings → AI now has a "Builder's tools" choice per API backend, with a caption saying what Auto works out to for that AI, and `ai tools <name> [auto|lean|full]` shows or sets it from the CLI. Auto is saved as no setting; agent apps are refused, as they choose their own tools.
A build on an API model refuses every tool that needs consent outside the Build tools without asking anyone, and the model was told "The user said no", so it made up a reason (#1938). The model is now told that nobody was asked and that a plugin's `consent` setting decides; the journal records the case as `refused`. Whether such a build should ask the person is left as a decision line in the roadmap.
The file lookup from #1941 stays for frequent reads (the Project screen). Where a
program is about to start or be checked (Play, pins, the build's run and
screenshot checks), launch_now also runs cargo metadata from the project and
looks in its target_directory first, which covers what the files don't:
$CARGO_HOME/config.toml, CARGO_BUILD_TARGET_DIR and a parent workspace's
target/. Outside the project, only a program the manifests name is taken.
A shared or ancestor target directory outside app now supplies only a program the manifests name. Without a name, only target directories inside app are searched, so another project's executable isn't started. built_program_in(app, env) makes the tests independent of the process's CARGO_TARGET_DIR.
The ancestor walk starts from a normalized absolute app, so a relative app reaches a config above the working directory; normalized paths also keep .. out of selected programs. Cargo's legacy config wins over config.toml when it exists, and a config without the key or with invalid TOML doesn't fall through.
A pin copies a program built outside app into pin-program/ and records that relative path; other executables in a shared folder are not copied, and the frozen pin keeps working when the external build is removed.
A project whose Cargo settings move the build output (build.target-dir in .cargo/config.toml, or CARGO_TARGET_DIR) built, but Play and the screenshot/self-test checks only looked in app/target, so they could not start the program. built_program now looks under CARGO_TARGET_DIR, then the closest project or ancestor .cargo setting, then the default target/ as a fallback, and starts the first target directory that has the named program.
The new AI regression uses a project with target-dir = "out" and fails before the fix; engine tests cover the environment path (relative and absolute), a project setting, an ancestor setting, the environment coming first, and the default fallback.
write_failure_log wrote the error's message, which repeats what the
service or a proxy in front of it answered (up to 1,000 characters of an
HTTP error, all of a stream's error message), so a key or words from the
request repeated there were kept in logs/. The log now keeps Craft
Anything's code for the error, the HTTP status, the context window and
request size, and the service's error code only when it is one of
failure::KNOWN_PROVIDER_ERRORS, written from that list.
* Let Claude Code use the model its own settings name by default
Claude Code runs are no longer passed a hardcoded --model: with no choice
saved, the agent uses whatever its own settings name (a custom model, an
alias, opusplan…), and `ai model --default` clears a saved override back
to that. The Settings → AI picker lists "Default (its own settings)" first
for Claude Code (saved as `claude-code` or `claude`), choosing it clears
the saved model, and the typed "Another model" field is gone since the
list carries the choice. effort_levels detects Claude Code by adapter id
so the `claude` agent id gets every effort level too.
* Translate "Default (its own settings)" in the remaining eight catalogs
The i18n gate requires every catalog to carry the same key set; the
first commit only added the new picker label to six of them.
A turn refused by a used-up Claude plan limit ends with a closing result error, which is the one the run keeps, and it carried the generic advice, so "which limit, and when it resets" was lost. The closing error now carries the same plan-limit advice as the error before it. Follow-up to #1931.
When a Claude plan's 5-hour or weekly limit was used up, Claude Code's rate_limit error was read as a per-minute rate limit, so the build waited and tried again and failed the same way each time. Claude Code's stream reports each turn's plan limits; when that report says the turn was rejected, the failure is now a usage limit, which isn't retried, and the fix names which limit is used up and roughly when it resets. A rate limit on a turn the plan allowed is still waited for and retried. Fixes#1919.
A local MCP plugin that exited before answering only said "The X plugin exited." It now gives its exit code and the last lines it printed, and a write to a server that has already gone gives the same error. When a local plugin can't be started, exits, or doesn't answer in time, a failure log is written to logs/ in the config folder and named in the error. The plugin's environment is left out of the log, and a remote plugin or a stop writes none. The failure-log writer moves to the engine crate so plugins and agent runs share it.
Aider's setup check read this computer's environment and home folder even for a run on another computer over SSH, so a working remote setup could be refused and local keys could pass a remote run that would then wait at a sign-in page. The check now runs on the host: one bounded, stoppable ssh command looks at that account's environment and Aider's settings files and returns only an exit status. Only the two definite answers refuse the run (no model or key; an OpenRouter model without its key); a check that can't run lets the run start and logs why. Not run against a real SSH host.
The hint for a tool Codex refused told the person to add a [mcp_servers.craft-anything.tools.<tool>] table, but setup writes tools as one inline table, and TOML refuses to extend an inline table that way, so Codex's config stopped parsing. The hint and docs/codex.md now say to add the tool inside tools, and a test checks that the old form fails and both valid forms parse. For #1867.
Addresses #1178 (which also consolidates #1277).
## The problem
The website study a build starts with opens a fresh private browser, so a web app behind a login is studied as its sign-in or landing page, and the builder then builds a sign-in page.
## What this adds
- **`web_site_sign_in { url }`** opens a visible browser window on the site. The person signs in there themselves and closes the window. The browser's profile is then saved in Craft Anything's own folder, keyed by the site's host and port. Craft Anything never sees or stores a password and still never reads cookie or storage values.
- **`web_site_open`** uses a saved sign-in for that exact host and port when there is one, by copying it into the usual temporary profile (headless as before, deleted afterwards). `signed_in: false` forces the private profile; `signed_in: true` with nothing saved is a clear error naming the sign-in tool. Nothing else about the private path changes.
- **`web_site_sign_out { url }`** forgets a saved sign-in.
- **A check right after saving.** The sign-in tool reopens the site headless exactly as a later study will, and reports whether it still looks like a sign-in page, plus a screenshot kept in the site's owner-only folder (path, hash and size are returned, not the picture, so the person's account screen is not sent to an agent).
- **Typed facts through to the builder.** `signed_in`, `signed_in_site` and `sign_in_page` are in the open result, the capture result and `capture.json`. The website briefs tell the builder the capture is the signed-in view only when it is signed in and does not look like a sign-in page. A not-signed-in capture with a password field says how to sign in; a signed-in one says the sign-in may have ended.
- The check phase opens the built site with `signed_in: false`.
Because a study already starts with `web_site_open`, a normal build of that site is signed in after one `web_site_sign_in`, with no new build option.
## Decisions for maintainers
These are policy calls I made so the change is usable; each is small to reverse.
1. **Clean room allows the two tools** (two lines in `clean_room.rs`). Reasoning: the person signing in as themselves and looking at pages is watching from outside, as a user would; `visitor_view()` strips exactly what it did before.
2. **A saved sign-in is used by default** for later opens of that site, until `web_site_sign_out`. Saving it is treated as the consent, and the tool text and evidence say so. The alternative is opt-in per study, which needs an option in the Make screen and `rebuild`.
3. **Restricted MCP mode refuses both tools even with `--allow-web`**, since sign-in opens a window on the person's desktop.
4. The saved profile sits on disk (owner-only on Unix; on Windows it relies on the per-user config folder). On Linux it is launched with the basic password store so the visible and headless launches can read the same cookies. The tool text says that anyone who can open the person's files could use the sign-in.
## Trade-offs and limits
- Needs a desktop: on a computer with no display the tool refuses at once with what to do instead.
- Sites that tie a sign-in to the browser, or expire it quickly, will capture signed out; the check after saving and the `sign_in_page` field say so.
- Session-only cookies are kept by setting the profile to continue where it left off; restored tabs are not copied.
- The saved profile can also hold single sign-on providers' sign-ins made in that window. It is used only when that exact host and port is opened.
- Screenshots and page text of a signed-in study contain the person's own account data; the evidence says so. Result URLs drop the query and fragment when a sign-in is used.
- Not in this PR (roadmap lines added under R2.9): a Make-screen button, showing the person the study's first screenshots to confirm before the builder starts, attaching to the person's running browser, refreshing a saved sign-in from a capture, and a live run on a real site and with the Snap browser.
## What was verified
Run locally on Linux (x86-64), on the branch before its final rebase onto `main` (the rebase was clean; after it: `cargo fmt --all --check`, `cargo xtask layers`, `locks`, `secrets`, `tools --check`, `i18n-coverage` pass):
- `cargo test -p craft-anything-engine` (583 passed, 12 ignored), `-p craft-anything-mcp` (22), `-p craft-anything-ai` (580, 3 ignored).
- `cargo clippy -p <crate> --all-targets -- -D warnings` for engine, mcp and ai.
- **Live, with Chromium 157 under a virtual display against a local test site** (the new `#[ignore]` tests in `site_sign_in/tests.rs`; a helper plays the person over the browser's own debugging port and closes the window):
- a sign-in made in the visible window is seen by a later headless open and capture, including an HttpOnly cookie and a session-only cookie (removing the continue-where-you-left-off setting makes that assertion fail, so the setting is what keeps it);
- `signed_in: false` and a signed-out site show the signed-out page with the private-profile limitation;
- a site that forgets the cookie is reported as still a sign-in page by the check after saving;
- two overlapping signed-in opens both work and leave the saved sign-in byte-identical;
- the timeout path stops the browser, keeps what was saved and leaves no process behind;
- with no display the tool refuses immediately.
- The two existing live website tests still pass.
**Not verified:** a real third-party site; a confined Snap or Flatpak browser (reasoned from the existing profile-location code, not run); Windows and macOS behaviour, including the browser-exit signal (the profile lock going away) and cookie decryption there; the workspace-wide `cargo xtask ci` steps and `--features wasm-plugins` (not enough disk locally, so CI is the first run of those); how the egui app shows the new tools.
An independent review pass was done before opening; its findings (copying only after the browser has exited, not treating one slow probe as a closed window, a whole-or-nothing replacement of the saved profile, reserved Windows names in site keys, owner-only permissions) are fixed in the later commits.
Python 3.10's argparse reads -v=m "old task" as -v -m "old task", so a message saved that way in Aider's extra arguments still replaced the request in its file. An = after a single valueless short flag is now read before looking for m: the m and its message go and -v stays. Later Python versions refuse that form.
A saved message in a short-option group was still passed to Aider: -vm "old task" means -v -m "old task", so the saved task replaced the request in its file. A group of Aider's valueless flags (-v, -h) followed by m now loses the m and its message and keeps the other flags. Any other short option is kept whole.
A new build is stopped before its first turn when its stack's program (Cargo, for Rust) isn't on this computer, but the check was skipped for any backend with an SSH host. An API builder over SSH still builds on this computer, so it found the missing program only after a whole turn. Only a coding agent over SSH, which builds on the other computer, skips the check now.
In Deep mode a build starts Ghidra's one-time analysis on its own thread, and it kept running after its project was deleted, using a core and about 12 GB of memory until the app closed. The analysis now also stops once the project's record is known to be gone, checked on its existing polls. Pausing is unchanged, and a record that can't be read for a moment doesn't stop it. Fixes#948.
Aider handles a --message before it reads --message-file, so a --message saved in a backend's extra arguments ran instead of the person's request once the request went in a file. When the message is in a file, saved --message, --msg and -m arguments (and their joined forms) are now left out; other saved arguments are kept. With the message in argv nothing changes: it comes last and wins.
When Auto mode or a project's approval setting refuses an action, the build feed now names the kind and how to be asked next time, for example /approvals publish ask for a refused push. The refusal itself is unchanged. Repeated refusals of one kind share one notice, and the next build clears old notices.
An API backend's requests per minute could only be set by editing config.toml. Settings → AI now has a field for it on each API backend, and the CLI has ai request-rate <name> [n]; zero removes the limit. Agent apps send their own requests, so they have no such setting. The save runs on a worker through the hub's usual save path.
Aider got its whole message, brief included, as one --message argument, and a builder's brief can pass Windows' 32,767-character command line, so the run failed before Aider started. A run on this computer now writes the message to a private file in the temp folder, passes it with --message-file and removes it when the run is over. Over SSH, or when the file can't be written, the message still goes in --message. Refs #402.
OpenCode's private server can answer the model check with a 503 ServiceUnavailableError while its plugins start, which stopped a question or build before it began. The check now asks once more after a two-second pause when that typed answer is what it got. Any other failure, a timeout or a stop isn't retried, and a second 503 is the error as before. For #1859.
When codex exec refused one of our tools, the feed always said to run setup --client codex, which changes nothing for a tool setup doesn't approve, such as build_command_run. For those tools the message now says how to approve the tool in Codex's own config.toml; the setup hint stays for the tools setup approves. Fixes the wrong hint in #1867.
game_unity_asset_export now takes AudioClips (Unity 5 and later). The sound is read from the .resource file beside the serialized file or inside the bundle, 256 MiB at most. A single 16-bit PCM sample in mono or stereo is saved as a WAV; anything else (Vorbis, ADPCM, a bank that isn't read) is saved as the FMOD bank it's stored in, with a limitation saying so. The output's extension is set to .wav or .fsb to match.
Codex started a fresh conversation on every turn. The adapter now continues the thread Codex reported (codex exec resume) on later turns and when a saved project is reopened, with the same model, sandbox and tool configuration and the prompt on stdin. A saved thread Codex no longer has is cleared and the next turn starts fresh. Codex's --ephemeral and --worktree options are refused before a run, since neither can continue a saved conversation.
The Deep website study from #1838 sent `web_walkthrough_record` a step shape it doesn't accept, so no recording was ever written. The step is now the tool's own (a test reads it as the tool's params), request bodies are kept so two operations to one endpoint are told apart, a body cut at its cap is left out rather than replayed incomplete, headers are read from the shape the browser keeps them in, and the file is written with private permissions.
`project_builder_set` chooses the AI that builds a project's later changes by an enabled backend's name, `default` gives it back to the app's own choice, and with no name it says which is chosen and which builds now. A name that is off or unknown is refused before anything is saved. It runs in Clean room, since it never looks at the target. The project page's own control is still open (R2.9).
A Deep website study now records the start page's requests and answers to `capture/original.har` (bodies within their cap, credential headers and declared secrets left out as in every capture; a failure is noted in how-it-works.md, not fatal). When that recording is there, the brief tells the builder that `web_standin_build` and `web_standin_start` can serve those answers to its own front end. Clean room is unchanged. Starting a stand-in automatically stays open (R3.11).
`claude auth status --json` is now read from the first JSON object it prints, so a warning or banner before it (a certificate notice on Windows) doesn't hide the status. A probe that can't run, has no JSON, or reads `loggedIn: false` writes a debug log line with the exit code and output size, never the answer's content (helps diagnose #1830).
After a stopped build, the startup sweep reported `opencode session delete exited with 1` for a session that no longer existed, told the person to delete it by hand, and retried on later sweeps. A delete that says the session isn't there ("Session not found", "Session does not exist") now counts as done; any other failure is reported and retried as before (part of #1707).
An OpenCode builder runs with `--auto`, so it once wrote its notes into `inbox/build-progress.json` and stopped the build. A build's OpenCode config now carries permission rules that deny its edit tool every record Craft Anything keeps in the project (`craft.json`, `feed.json`, `inbox/`, `investigation.cany/`, `reference/`…, from `workspace::OWN_NAMES`), except `checks/`, in either project layout. Chats and questions are unchanged. Its shell and folders outside the project aren't covered (roadmap R2.2).
Agents over ACP report context use, not a turn's tokens, so their turns now say the token count is unknown instead of 0, in the CLI, the build's activity and the app. Project and session totals keep what was reported: "Unknown" when nothing was, and a lower bound such as "1.9M+" when some turns had no count. usage.json gains `tokens_incomplete`; older files read as before.
A new build whose stack needs a program this computer doesn't have now stops before the builder's first turn, saying what's missing and how to get it, instead of failing at its first check. The stacks in stacks.toml name their program (Cargo for Bevy and the Rust stacks). A project already in app/ and a build over SSH aren't checked (part of #1837).
The Effort setting in Settings → AI appeared only for the Claude API and Claude Code. OpenAI, OpenRouter, Gemini and OpenAI-compatible AIs now offer OpenAI's levels (none to xhigh), starting at default, which sends nothing; once a level is picked, requests carry reasoning_effort (OpenRouter: reasoning.effort), and craft-anything-cli ai effort lists and sets the same levels. Claude no longer accepts none or minimal. Refs #1813.
Just ask goes only to an agent that can be held to reading; with any other builder (Codex, OpenCode) the question was sent and only then refused. With Just ask on, the ask box now says beforehand that this builder isn't asked questions and to ask with Claude Code or an AI with an API key, and Send keeps such a question in the box with the same reason. Refs #1695.
A website build only needs a build script, since Craft Anything serves the built folder itself, so outside the app nothing said how to run one (#1590). A new website's brief now asks the builder for an app/README.md saying which commands build it and which folder to serve with any static server; a person's own project isn't asked for it.
A model turn on an API backend that stops after its fallbacks now writes a log to `logs/` in the config folder, as a failed agent CLI does: the backend, the server's message and code, and the fix. The error the person sees names the file.
A builder that kept its own notes in inbox/build-progress.json stopped every later run with an unexplained parse error. The run still stops on a progress record it can't read, but now says the file is Craft Anything's record of the build, that something else changed it, and to rename or delete it to go on; a record from a newer version still says to update. Every brief now names craft.json, feed.json and inbox/ as Craft Anything's own records.
Every builder on a local model got the lean tool list and no memory steps, whatever its window. Each API backend now has tools = auto, lean or full in config.toml: Lean keeps today's local list, Full offers every tool and the memory steps, and Auto (the default) is Full on a paid service and on a local model whose conversation budget is at least 49,152 tokens (a 64k window), else Lean, choosing again before each turn once the server names its window. A chat keeps every tool.
Reading the context window from a llama.cpp server now asks /props with autoload=false, so a router serving several models doesn't load the one named just to answer, which with --models-max could unload the model in use; a single-model server ignores it. The context_tokens doc now says a paid service's window only ever lowers its 150k default.
OpenCode's message (with its preamble) now goes in on stdin instead of as opencode run's last argument, which it reads when given no message argument, so a long brief can't pass Windows' command-line limit (os error 206, #402). The roadmap line is split: Aider, Hermes, Maki, Devin and Antigravity still take theirs on the command line.
The console-run check names the original so that a usage line printing the program's name still matches. Since #1759 that name came from reading an app bundle's Info.plist in every mode; Clean room now takes it from the picked path's own name and reads nothing inside, and Deep mode keeps the program the bundle names.
An app picked as Name.app was studied as a plain folder, so Deep mode skipped Ghidra, the console runs and the window picture, and the app-screenshot check had nothing to compare with. A folder ending in .app now resolves to the program its Info.plist names, or the one named like the bundle; a bundle with no program, and any other folder, stay as picked. Fixes#1757.
Before a backend's first request (and once more while the server hasn't said), the agent asks its server for the context window it has loaded: the model list's context fields for OpenAI-compatible services and OpenRouter, and on this computer or its network llama.cpp's props, llama-swap's upstream (only for a model already loaded), LM Studio's loaded length and Ollama's /api/ps. A local model's budget becomes three quarters of that window instead of a fixed 24k; for a paid service a window read this way only lowers the 150k default. A refusal's window and a budget the person set still win.
With an API builder, refreshing the investigation after a tool finished waited for the session behind the next tool, such as a decompile waiting on Ghidra, so the feed showed nothing during that wait. The refresh now takes the session only when it is free and tries again on the next tick; the end of the turn still waits for it.
While native_function_pseudocode waited on Ghidra the feed showed only "start native function pseudocode" for up to 15 minutes, because the tool runs in our MCP server inside the coding agent and its progress reaches only the agent (#1714). A decompile now says, once a minute, how long it has waited (or that it is queued behind another decompile), as the tool's progress and as a line in the project's inbox; the run shows each new line in the feed, the line goes when the wait ends, and a run starts by clearing lines a stopped tool left.