Skip to content

feat(cloud): sign in with a network secret instead of SHELLTIME_TOKEN - #15

Merged
AnnatarHe merged 1 commit into
mainfrom
claude/admiring-ride-o9tv78
Oct 22, 2026
Merged

AnnatarHe merged 1 commit into
mainfrom
claude/admiring-ride-o9tv78

Conversation

@AnnatarHe

@AnnatarHe AnnatarHe commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The ShellTime token in a Claude Code cloud environment can now be a network secret instead of the SHELLTIME_TOKEN environment variable. Anyone who uses an environment can read its variables. A network secret never enters the VM: Anthropic's agent proxy adds it to requests for the listed host outside the VM, and that host is reachable whatever the environment's network access, so api.shelltime.xyz no longer has to be allowed.

  • The SessionStart hook now signs in with ${SHELLTIME_TOKEN:-proxy-injected}. With the placeholder, the CLI sends no Authorization header (shelltime/cli PR), so the proxy's Authorization: CLI <token> is the only one. SHELLTIME_TOKEN still wins when it's set, for environments without network secrets: self-hosted ones, organizations with customer-managed keys, Enterprise without an admin role, and Team without one, whose short form has no prefix field.
  • Without either one, the hook now still starts the daemon. Its uploads are rejected until a secret is added, and shelltime doctor names the missing secret.
  • The header comment, the final message, README and CLAUDE.md describe the secret: host api.shelltime.xyz, header Authorization, prefix CLI.
  • CI test-cloud: the hook prints nothing, signs in with proxy-injected, starts exactly one daemon, switches to SHELLTIME_TOKEN and back, and then the daemon is stopped.

Merge after the shelltime/cli change is released. cloud.bash installs the latest CLI release, and an older CLI would send Authorization: CLI proxy-injected.

Test plan

  • bash -n cloud.bash
  • Ran cloud.bash with a scratch HOME in a real cloud session, then the workflow's new Verify step against it, with the CLI built from the cli branch: passed.

Generated by Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

The SessionStart hook now signs in with the placeholder token proxy-injected,
so the ShellTime token can live in the environment's network secrets, where
sessions never see it and api.shelltime.xyz needs no network access setting.
SHELLTIME_TOKEN still wins when set, for environments without network secrets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VF4QMGS5ymib7ntoJAhbUB
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-22T13:41:54.251426Z
We couldn’t complete this review. Comment @codex review to try again.
c1e660a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@shelltime

shelltime Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

☁️ Claude Code cloud · Move Shelltime cloud auth guidance to network secrets

Reviewed Claude Code network-secret authentication and updated the English and Chinese cloud-session tracking guides to recommend it for Shelltime.

💰 Cost 🔢 Tokens ⏱️ Duration 🧠 Model 💬 Prompts ✏️ Lines
$6.82 17M 16m (16m active) claude-opus-5-5 1 +101 / −66

17M tokens: 652 input · 73.3K output · 16.7M cache read · 251.8K cache write

📝 AI summary

Reviewed the Claude Code cloud-environments documentation, focusing on network secrets as a safer replacement for exposing SHELLTIME_TOKEN directly in the agent environment. The session established setup guidance for configuring Shelltime authentication through Claude Code’s network controls and clarified how this approach protects the credential while allowing outbound tracing requests.

Updated the latest blog documentation in both languages: /home/user/web/content/blogs/track-claude-code-cloud-sessions/en.mdx and /home/user/web/content/blogs/track-claude-code-cloud-sessions/zh.mdx. The edits aligned the Shelltime cloud-session tracing instructions with the network-secret workflow. No CLI or installation-script files were ultimately modified during this session.

View this session on ShellTime →

Updated 2026-10-23 13:43 UTC by ShellTime · totals for the whole session so far · the session page is visible to its owner

@AnnatarHe
AnnatarHe merged commit 61a7ee0 into main Oct 22, 2026
4 of 9 checks passed
@AnnatarHe
AnnatarHe deleted the claude/admiring-ride-o9tv78 branch October 22, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants