Jaxxxxnn on X (magpie 0.1.2669, Claude Code 2.1.316, macOS arm64): a
saved Claude account's config directory had a .claude.json without
hasCompletedOnboarding. Claude Code's interactive mode then asked for a
login method beside a sign-in that works, the run ended on it, and both
requests and the usage read failed as if signed out. Adding the mark by
hand fixed it with the same token.
magpie wrote the mark only when it made .claude.json itself, so a
directory -p ran in (before the interactive mode was the default) or one
an earlier magpie made kept a file without it. claudeOnboarded now adds
the mark to the file that is there, every other key kept (numbers read
with UseNumber), on both paths of claudeSavedDir (sign-in put in, or
there already) and in claudeTokenDir. A file that can't be read or
parsed, which Claude Code may be writing, is left as it is.
Run (mote, at this tree):
- go test -count=1 ./internal/provider ./internal/claudetui: ok
- go vet ./internal/provider, GOOS=linux and GOOS=windows: ok
- gofmt -l: clean
Broken by hand: with claude_dirs.go and claude_setup_token.go at
origin/main, TestClaudeSavedDirMarksOnboardingDone and
TestClaudeTokenDirMarksOnboardingDone are red.
Not tried: a real Claude Code 2.1.316 run in a directory without the
mark; the reporter's own fix (the same mark) is the evidence. Not the
full suite.