Repository navigation
feat(model): sign in through a Claude Code cloud network secret - #331
Conversation
A cloud environment can keep the ShellTime token as a network secret: the agent proxy adds Authorization: CLI <token> to requests for api.shelltime.xyz outside the VM. With the placeholder token proxy-injected the CLI sends no Authorization header, so the proxy's is the only one, and shelltime doctor says the token is a network secret and names a missing one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VF4QMGS5ymib7ntoJAhbUB
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 5 files with indirect coverage changes 🚀 New features to boost your workflow:
|
⏱️
|
| Scenario | base | head | Δ | p | |
|---|---|---|---|---|---|
Startup/floor |
155 µs ±10% | 158 µs ±14% | ~ | 0.280 | A/A |
Startup/version |
1.78 ms ±15% | 1.86 ms ±15% | ~ | 0.315 | ✅ |
Track/daemon/pre |
2.06 ms ±9% | 2.13 ms ±15% | ~ | 0.353 | ✅ |
Track/daemon/post |
1.92 ms ±17% | 2.03 ms ±12% | ~ | 0.579 | ✅ |
Track/direct/pre |
1.96 ms ±10% | 1.91 ms ±10% | ~ | 0.579 | ✅ |
Track/direct/post |
3.66 ms ±16% | 3.72 ms ±17% | ~ | 0.631 | ✅ |
Track/direct/post-sync |
4.66 ms ±36% | 4.81 ms ±15% | ~ | 1.000 | ✅ |
Binary size: 19.2 MiB → 19.2 MiB (+0.0%).
CPU, tail latency and memory
Per exec, base → head (Δ when significant).
| Scenario | p95 wall | user CPU | sys CPU | peak RSS |
|---|---|---|---|---|
Startup/floor |
169 µs → 185 µs | 137 µs → 138 µs | 3 µs → 4 µs | 9.2 MiB → 9.1 MiB |
Startup/version |
2.08 ms → 2.25 ms | 1.36 ms → 1.52 ms | 485 µs → 426 µs | 15.6 MiB → 15.6 MiB |
Track/daemon/pre |
2.40 ms → 2.65 ms | 1.52 ms → 1.54 ms | 506 µs → 548 µs | 16.5 MiB → 16.5 MiB |
Track/daemon/post |
2.35 ms → 2.30 ms | 1.52 ms → 1.46 ms | 526 µs → 528 µs | 16.4 MiB → 16.4 MiB |
Track/direct/pre |
2.24 ms → 2.15 ms | 1.51 ms → 1.46 ms | 471 µs → 547 µs | 16.4 MiB → 16.4 MiB |
Track/direct/post |
4.10 ms → 4.11 ms | 2.74 ms → 2.69 ms | 1.21 ms → 1.28 ms | 17.6 MiB → 17.6 MiB |
Track/direct/post-sync |
5.93 ms → 5.65 ms | 3.41 ms → 3.59 ms | 1.73 ms → 1.56 ms | 19.5 MiB → 19.5 MiB (+0.29%) |
benchstat
goos: linux
goarch: amd64
pkg: github.com/malamtime/cli/perf
cpu: AMD EPYC
│ base │ head │
│ sec/op │ sec/op vs base │
Startup/floor-2 154.9µ ± 10% 158.2µ ± 14% ~ (p=0.280 n=10)
Startup/version-2 1.784m ± 15% 1.858m ± 15% ~ (p=0.315 n=10)
Track/daemon/pre-2 2.059m ± 9% 2.129m ± 15% ~ (p=0.353 n=10)
Track/daemon/post-2 1.920m ± 17% 2.034m ± 12% ~ (p=0.579 n=10)
Track/direct/pre-2 1.960m ± 10% 1.911m ± 10% ~ (p=0.579 n=10)
Track/direct/post-2 3.663m ± 16% 3.724m ± 17% ~ (p=0.631 n=10)
Track/direct/post-sync-2 4.655m ± 36% 4.813m ± 15% ~ (p=1.000 n=10)
geomean 1.672m 1.715m +2.56%
│ base │ head │
│ p50-sec/op │ p50-sec/op vs base │
Startup/floor-2 150.5µ ± 9% 151.7µ ± 16% ~ (p=0.529 n=10)
Startup/version-2 1.751m ± 13% 1.773m ± 15% ~ (p=0.739 n=10)
Track/daemon/pre-2 2.011m ± 10% 2.015m ± 20% ~ (p=0.529 n=10)
Track/daemon/post-2 1.879m ± 16% 1.961m ± 11% ~ (p=0.912 n=10)
Track/direct/pre-2 1.890m ± 11% 1.869m ± 13% ~ (p=0.796 n=10)
Track/direct/post-2 3.573m ± 16% 3.660m ± 17% ~ (p=0.684 n=10)
Track/direct/post-sync-2 4.550m ± 33% 4.693m ± 15% ~ (p=0.971 n=10)
geomean 1.630m 1.656m +1.57%
│ base │ head │
│ p95-sec/op │ p95-sec/op vs base │
Startup/floor-2 169.1µ ± 8% 184.9µ ± 26% ~ (p=0.165 n=10)
Startup/version-2 2.076m ± 12% 2.248m ± 28% ~ (p=0.579 n=10)
Track/daemon/pre-2 2.398m ± 17% 2.648m ± 23% ~ (p=0.315 n=10)
Track/daemon/post-2 2.347m ± 17% 2.303m ± 28% ~ (p=0.631 n=10)
Track/direct/pre-2 2.243m ± 18% 2.148m ± 13% ~ (p=0.631 n=10)
Track/direct/post-2 4.100m ± 19% 4.109m ± 25% ~ (p=0.529 n=10)
Track/direct/post-sync-2 5.930m ± 44% 5.654m ± 23% ~ (p=0.579 n=10)
geomean 1.951m 1.997m +2.31%
│ base │ head │
│ peak-rss-B │ peak-rss-B vs base │
Startup/floor-2 9.182Mi ± 1% 9.128Mi ± 1% ~ (p=0.181 n=10)
Startup/version-2 15.60Mi ± 0% 15.61Mi ± 0% ~ (p=0.225 n=10)
Track/daemon/pre-2 16.51Mi ± 0% 16.52Mi ± 0% ~ (p=0.127 n=10)
Track/daemon/post-2 16.39Mi ± 0% 16.39Mi ± 0% ~ (p=0.926 n=10)
Track/direct/pre-2 16.39Mi ± 0% 16.38Mi ± 0% ~ (p=0.427 n=10)
Track/direct/post-2 17.61Mi ± 0% 17.62Mi ± 0% ~ (p=0.239 n=10)
Track/direct/post-sync-2 19.48Mi ± 1% 19.54Mi ± 0% +0.29% (p=0.023 n=10)
geomean 15.53Mi 15.53Mi -0.03%
│ base │ head │
│ sys-sec/op │ sys-sec/op vs base │
Startup/floor-2 3.000µ ± 45% 4.025µ ± 60% ~ (p=0.436 n=10)
Startup/version-2 484.5µ ± 32% 426.0µ ± 33% ~ (p=0.280 n=10)
Track/daemon/pre-2 506.2µ ± 43% 547.9µ ± 52% ~ (p=0.218 n=10)
Track/daemon/post-2 526.5µ ± 31% 527.6µ ± 57% ~ (p=0.393 n=10)
Track/direct/pre-2 471.1µ ± 36% 546.6µ ± 26% ~ (p=0.579 n=10)
Track/direct/post-2 1.213m ± 41% 1.282m ± 22% ~ (p=0.912 n=10)
Track/direct/post-sync-2 1.732m ± 19% 1.562m ± 24% ~ (p=0.190 n=10)
geomean 325.0µ 341.6µ +5.08%
│ base │ head │
│ user-sec/op │ user-sec/op vs base │
Startup/floor-2 136.7µ ± 11% 137.8µ ± 16% ~ (p=0.481 n=10)
Startup/version-2 1.361m ± 8% 1.517m ± 9% ~ (p=0.052 n=10)
Track/daemon/pre-2 1.515m ± 15% 1.538m ± 17% ~ (p=0.684 n=10)
Track/daemon/post-2 1.521m ± 10% 1.461m ± 10% ~ (p=0.280 n=10)
Track/direct/pre-2 1.508m ± 13% 1.463m ± 6% ~ (p=0.165 n=10)
Track/direct/post-2 2.742m ± 12% 2.691m ± 17% ~ (p=0.684 n=10)
Track/direct/post-sync-2 3.413m ± 32% 3.594m ± 15% ~ (p=0.529 n=10)
geomean 1.293m 1.311m +1.35%
Δ compares medians; ~ means no significant difference (Mann-Whitney U, p ≥ 0.05). A scenario is flagged when it is more than 10% and more than 250µs slower with p < 0.05. Startup/floor runs true, not shelltime: it is an A/A check of runner noise. Runner: linux/amd64, AMD EPYC. go1.27.1, 10 rounds × 100 execs per scenario and binary.
☁️ Claude Code cloud · Move Shelltime cloud auth guidance to network secretsReviewed Claude Code network-secret authentication and updated the English and Chinese cloud-session tracking guides to recommend it for Shelltime.
17M tokens: 652 input · 73.3K output · 16.7M cache read · 251.8K cache write 📝 AI summaryReviewed the Claude Code cloud-environments documentation, focusing on network secrets as a safer replacement for exposing Updated the latest blog documentation in both languages: View this session on ShellTime → Updated 2026-10-23 13:42 UTC by ShellTime · totals for the whole session so far · the session page is visible to its owner |
Summary
Claude Code cloud environments can now keep the ShellTime token as a network secret. Anthropic's agent proxy then adds
Authorization: CLI <token>to requests forapi.shelltime.xyzafter they leave the VM, so the token is never on disk or in the session's environment.model.ProxyInjectedToken(proxy-injected) is the placeholder token such an environment signs in with. It follows Anthropic's own convention: cloud sessions readGITHUB_TOKENasproxy-injectedfor the GitHub proxy. With it,setCLIAuthorizationsends noAuthorizationheader, so the proxy's header is the only one the server reads, whether the proxy replaces a header or appends one.SendHTTPRequestJSONand theshelltime qstream both go through it.config.Token == ""gate keeps working unchanged, because the placeholder isn't empty.shelltime doctorsays the token is a network secret instead of printing a masked placeholder. A rejected token now points at the secret instead ofshelltime auth. A 404 "user not found", which is what a request without a token gets, reads as "No token reached the server".CLAUDE.mdanddocs/CONFIG.md.cloud.bashin shelltime/installation writes the placeholder, and that PR needs this change released first.Test plan
go test ./...TestSetCLIAuthorizationchecks the placeholder sends no header, on both the JSON and SSE paths, and that real tokens are unchanged.TestDoctorCheckAccount_ProxyInjectedTokenshelltime doctorwent through the agent proxy and reported "No token reached the server" with the network-secret fix.Generated by Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.