Skip to content

Commit 59e0bf0

Browse files
authored
Merge pull request #396 from depot/billy/fix/claude-code-org-id
feat: use org ID sent from the API
2 parents 826a49c + 915deb5 commit 59e0bf0

File tree

12 files changed

+451
-2955
lines changed

12 files changed

+451
-2955
lines changed

pkg/api/rpc.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ func NewClaudeClient() agentv1connect.ClaudeServiceClient {
4444
return agentv1connect.NewClaudeServiceClient(getHTTPClient(getBaseURL()), getBaseURL(), WithUserAgent())
4545
}
4646

47-
func NewAgentClient() agentv1connect.AgentServiceClient {
48-
return agentv1connect.NewAgentServiceClient(getHTTPClient(getBaseURL()), getBaseURL(), WithUserAgent())
49-
}
50-
5147
func NewSessionClient() agentv1connect.SessionServiceClient {
5248
return agentv1connect.NewSessionServiceClient(getHTTPClient(getBaseURL()), getBaseURL(), WithUserAgent())
5349
}

pkg/cmd/claude/claude.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ func saveSession(ctx context.Context, client agentv1connect.SessionServiceClient
355355

356356
req := &agentv1.UploadSessionRequest{
357357
SessionData: data,
358-
SessionId: sessionID,
358+
SessionId: &sessionID,
359359
Summary: new(string),
360360
ToolSessionId: claudeSessionID,
361361
AgentType: agentv1.AgentType_AGENT_TYPE_CLAUDE_CODE,

pkg/cmd/claude/remote.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,16 +139,17 @@ func RunAgentRemote(ctx context.Context, opts *AgentRemoteOptions) error {
139139

140140
sessionID := res.Msg.SessionId
141141
sandboxID := res.Msg.SandboxId
142+
orgID := res.Msg.OrganizationId
142143

143144
// If not waiting, just print the URL and exit
144145
if !opts.Wait {
145146
fmt.Fprintf(opts.Stdout, "\n✓ Claude sandbox started!\n")
146147
fmt.Fprintf(opts.Stdout, " Session ID: %s\n", sessionID)
147-
fmt.Fprintf(opts.Stdout, " Link: https://depot.dev/orgs/%s/claude/%s\n", opts.OrgID, sessionID)
148+
fmt.Fprintf(opts.Stdout, " Link: https://depot.dev/orgs/%s/claude/%s\n", orgID, sessionID)
148149
return nil
149150
}
150151

151-
return waitAndStreamSandbox(ctx, sandboxClient, token, sessionID, sandboxID, opts.OrgID, invocationTime, opts.Stdout, opts.Stderr)
152+
return waitAndStreamSandbox(ctx, sandboxClient, token, sessionID, sandboxID, orgID, invocationTime, opts.Stdout, opts.Stderr)
152153
}
153154

154155
func isGitURL(s string) bool {

0 commit comments

Comments
 (0)