You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cargo xtask dev can't add its Claude credential on a fresh state #34
What is wrong. On a fresh state (no .fctl-dev/ and no crates/fctl-control/.wrangler/), cargo xtask dev can't add its Claude credential, so it stops with "adding a Claude credential: HTTP 404" before it starts the host.
How it works now.ensure_basics in xtask/src/dev.rs adds the credential with POST /api/v1/me/claude and the token sk-ant-oat01-fctl-dev-fake-claude. The control plane rejects it twice over:
The route is POST /api/v1/me/claude/token (crates/fctl-control/src/lib.rs). /me/claude only answers GET, so the request gets a 404.
add_token (crates/fctl-control/src/api/claude.rs) wants at least 40 characters, and the dev token has 33, so on the right route it would get a validation error instead.
Dev state that already has a credential isn't affected: ensure_basics adds one only when /auth/me lists none.
I found this while running cargo xtask dev's steps by hand for #32 (Vite needs the design package, which that sandbox couldn't fetch). Its exact POST /api/v1/me/claude call got 404 Not Found in wrangler dev's log, and a 44-character sk-ant-oat01-… token posted to /me/claude/token worked.
#33 fixed this. It merged ten minutes after this issue was opened, without linking it: ensure_basics in xtask/src/dev.rs now posts to /me/claude/token with a 44-character token.
I checked it in this session on main at 012337e, from a fresh clone (no .fctl-dev/, crates/fctl-control/.wrangler/ or node_modules):
cargo xtask dev reached "fctl dev is running". In wrangler dev's log, POST /api/v1/setup, /auth/tokens, /me/claude/token, /projects and /runners all returned 201.
fctl claude status --json listed the fake-claude token as active and the default, and fctl run -p playground "write notes.md" ran a fake-claude session to the end.
A restart on that state added nothing and was running again in 6 s. With .fctl-dev/token deleted, it signed in with the password (POST /api/v1/auth/login 200) and made a new token.
All of that needed worker-build installed first. Without it, cargo xtask dev fails when wrangler starts, which is #41. With #54, a fresh run on a machine without worker-build installs it and gets to the same place.
This issue's question for a person, whether CI should run the bootstrap, is now #53, with #41 as a second break CI didn't catch. Closing this as done.
Activity
feat: turn off claude.ai connectors for a project (#32)
fctl-sh commentedon Oct 18, 2026
#33 fixed this. It merged ten minutes after this issue was opened, without linking it:
ensure_basicsinxtask/src/dev.rsnow posts to/me/claude/tokenwith a 44-character token.I checked it in this session on
mainat 012337e, from a fresh clone (no.fctl-dev/,crates/fctl-control/.wrangler/ornode_modules):cargo xtask devreached "fctl dev is running". Inwrangler dev's log,POST /api/v1/setup,/auth/tokens,/me/claude/token,/projectsand/runnersall returned 201.fctl claude status --jsonlisted thefake-claudetoken as active and the default, andfctl run -p playground "write notes.md"ran a fake-claude session to the end..fctl-dev/tokendeleted, it signed in with the password (POST /api/v1/auth/login200) and made a new token.All of that needed
worker-buildinstalled first. Without it,cargo xtask devfails when wrangler starts, which is #41. With #54, a fresh run on a machine withoutworker-buildinstalls it and gets to the same place.This issue's question for a person, whether CI should run the bootstrap, is now #53, with #41 as a second break CI didn't catch. Closing this as done.
fix(xtask): install worker-build when cargo xtask dev needs it (#54)
ci: run one fake-claude session through cargo xtask dev (#86)