Repository navigation
Box sign-in fixes: wait for the proxy, Cursor's check reason, OpenCode Go - #2529
Conversation
The check read every failed `agent about` as "Could not verify authentication. Check provider setup and try again." `agent about` waits on Cursor's servers with no time limit of its own, so a run that cannot get through is ended at 15 seconds and prints nothing, and the status said "could not be checked" with no reason. It now says the check was ended for taking too long, or how the command failed (its exit code and last error line). An answer the command printed before it failed is still read as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OpenCode takes an OpenCode Go API key, on Switch Cloud and on machines of your own. On Switch Cloud it replaces the ChatGPT browser sign-in for OpenCode (core, box and chat-ui agree); own machines keep it. - Box: the key is checked with opencode.ai (GET /inference/go/v1/usage): 401 says the key is wrong, 403 that the account has no OpenCode Go subscription. The provider gateway holds the key and gives OpenCode only its base URL and an opaque token (OPENCODE_CONFIG_CONTENT and OPENCODE_AUTH_CONTENT). It maps each SDK suffix to its path under /inference/go, puts the real key in that route's header, passes on x-opencode-* and anthropic-* headers, and refuses other paths. - Own machines: the key is written as the opencode-go entry of OpenCode's auth.json. - Egress: opencode.ai on the controller's side of the box lists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…HOO-4637) A new box's squid learns its login only when its password file is next read, so a sign-in started right after the box comes up got 407 from the proxy. The controller now asks the proxy for a tunnel to the provider's sign-in host first and waits out a 407 for up to 2 minutes, reporting that the network is still getting ready. The dashboard shows that progress message while the sign-in starts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md
…ox-sign-in-consolidated
… fix/box-sign-in-consolidated # Conflicts: # console/packages/agent-controller/src/box/BOX-MODE.md # console/packages/agent-controller/src/box/controller-box.ts # console/packages/agent-controller/src/browser-login.test.ts
…ign-in-consolidated # Conflicts: # console/packages/agent-controller/src/box/BOX-MODE.md
| await once(server, 'close'); | ||
| const failure = await tunnelAnswer(new URL('https://auth.provider.test/'), 2_000, { | ||
| env: () => ({}), | ||
| gatewayProxy: () => `http://box-user:pw-test-only@127.0.0.1:${port}`, |
There was a problem hiding this comment.
🔵 Low severity issue identified in your code:
Hardcoded sensitive data leaked
Semgrep has detected a leak of sensitive data in this code. This secret data could be used by internal or external malicious actors. We highly recommend you change, reset, or rotate the sensitive data.
A secret is hard-coded in the application. Secrets stored in source code, such as credentials, identifiers, and other types of sensitive data, can be leaked and used by internal or external malicious actors. It is recommended to rotate the secret and retrieve them from a secure secret vault or Hardware Security Module (HSM), alternatively environment variables can be used if allowed by your company policy.
💬 To ignore this, reply with:
• /fp <comment> for false positive
• /ar <comment> for acceptable risk
• /other <comment> for all other reasons
Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by generic_uri_string_localhost.
| expect( | ||
| await tunnelAnswer(url, 2_000, { | ||
| env: () => ({}), | ||
| gatewayProxy: () => `http://box-user:pw-test-only@127.0.0.1:${open.port}`, |
There was a problem hiding this comment.
🔵 Low severity issue identified in your code:
Hardcoded sensitive data leaked
Semgrep has detected a leak of sensitive data in this code. This secret data could be used by internal or external malicious actors. We highly recommend you change, reset, or rotate the sensitive data.
A secret is hard-coded in the application. Secrets stored in source code, such as credentials, identifiers, and other types of sensitive data, can be leaked and used by internal or external malicious actors. It is recommended to rotate the secret and retrieve them from a secure secret vault or Hardware Security Module (HSM), alternatively environment variables can be used if allowed by your company policy.
💬 To ignore this, reply with:
• /fp <comment> for false positive
• /ar <comment> for acceptable risk
• /other <comment> for all other reasons
Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by generic_uri_string_localhost.
| expect(sent).toEqual([ | ||
| { | ||
| url: 'https://opencode.ai/inference/go/v1/usage', | ||
| headers: { authorization: 'Bearer oc_sk_test-key-0001', accept: 'application/json' }, |
There was a problem hiding this comment.
🟡 Medium severity issue identified in your code:
Hardcoded sensitive data leaked
Semgrep has detected a leak of sensitive data in this code. This secret data could be used by internal or external malicious actors. We highly recommend you change, reset, or rotate the sensitive data.
A secret is hard-coded in the application. Secrets stored in source code, such as credentials, identifiers, and other types of sensitive data, can be leaked and used by internal or external malicious actors. It is recommended to rotate the secret and retrieve them from a secure secret vault or Hardware Security Module (HSM), alternatively environment variables can be used if allowed by your company policy.
💬 To ignore this, reply with:
• /fp <comment> for false positive
• /ar <comment> for acceptable risk
• /other <comment> for all other reasons
Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by generic_bearer_auth_header.
Puts Raul's remaining sign-in PRs into one branch on top of main, which already has #2519:
Conflicts resolved:
controller-box.ts: the sign-in keeps Box: browser sign-ins get the box's proxy login in every spelling, and Cursor's kept login is reported (CHOO-4637) #2519's proxy login in every proxy variable (signInProxyEnv) and gets Box: browser sign-ins wait for the box's proxy to accept its login (CHOO-4637) #2523's proxy wait.browser-login.test.ts: imports from both.BOX-MODE.md: Box: browser sign-ins get the box's proxy login in every spelling, and Cursor's kept login is reported (CHOO-4637) #2519's every-variable wording, Box: browser sign-ins wait for the box's proxy to accept its login (CHOO-4637) #2523's wait, and OpenCode signs in with OpenCode Go (CHOO-4637) #2520's "every provider but OpenCode".CHANGELOG.md: kept both entries.Not included: #2508 (Console browser sign-in on remote machines). #2491 on main already ships the same feature ("Sign in with browser" first when giving a machine a login), and #2508 now conflicts with it in each file it touches. It looks superseded.
Supersedes #2523, #2483 and #2520. I didn't run tests here, as asked. CI will run.
🤖 Generated with Claude Code