Cannot handle OAuth when the brower is Finicky #6433

Open
opened 2026-02-16 18:04:12 -05:00 by yindo · 1 comment
Owner

Originally created by @zerobell-lee on GitHub (Jan 16, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

Hello. I'm using [Finicky](https://github.com/johnste/finicky), which is a browser router app. You can specify which browser should be opened with specific URLs. I'm using this for my job.

Since Finicky is using Default Browser mechanism, it is treated as a browser app, but I don't think it can support full features of the browser app.

When I use /connect command and try to auth with OAuth, the callback result crashes and show logs like following;


opentui: fatal: undefined is not an object (evaluating 'local.agent.current().name')

TypeError: undefined is not an object (evaluating 'local.agent.current().name')
    at <anonymous> (src/cli/cmd/tui/component/prompt/index.tsx:841:75)
    at <anonymous> (../../node_modules/.bun/@opentui+solid@0.1.73+897ebc1644d3edd0/node_modules/@opentui/solid/index.js:148:62)
    at runComputation (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:742:22)
    at updateComputation (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:724:3)
    at runTop (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:833:7)
    at runUserEffects (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:928:18)
    at runUpdates (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:849:17)
    at completeUpdates (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:900:17)
    at runUpdates (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:850:5)
    at setStore (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/store/dist/dev.js:221:5)
    at processTicksAndRejections (native:7:39)...

Despite error logs, the auth itself works, so when I restart opencode, I can check it is connected to AI providers.
Please check this issue. Thank you.

Plugins

oh-my-opencode

OpenCode version

1.1.23

Steps to reproduce

  1. Install Finicky and set it as default browser
  2. run /connect command and try to do OAuth (in my case, it was Github copilot)
  3. Do auth
  4. Now you can see error logs

Screenshot and/or share link

No response

Operating System

macOS Sonoma

Terminal

iTerm2

Originally created by @zerobell-lee on GitHub (Jan 16, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description Hello. I'm using `[Finicky](https://github.com/johnste/finicky)`, which is a browser router app. You can specify which browser should be opened with specific URLs. I'm using this for my job. Since Finicky is using `Default Browser` mechanism, it is treated as a browser app, but I don't think it can support full features of the browser app. When I use `/connect` command and try to auth with OAuth, the callback result crashes and show logs like following; --- opentui: fatal: undefined is not an object (evaluating 'local.agent.current().name') ``` TypeError: undefined is not an object (evaluating 'local.agent.current().name') at <anonymous> (src/cli/cmd/tui/component/prompt/index.tsx:841:75) at <anonymous> (../../node_modules/.bun/@opentui+solid@0.1.73+897ebc1644d3edd0/node_modules/@opentui/solid/index.js:148:62) at runComputation (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:742:22) at updateComputation (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:724:3) at runTop (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:833:7) at runUserEffects (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:928:18) at runUpdates (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:849:17) at completeUpdates (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:900:17) at runUpdates (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:850:5) at setStore (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/store/dist/dev.js:221:5) at processTicksAndRejections (native:7:39)... ``` --- Despite error logs, the auth itself works, so when I restart `opencode`, I can check it is connected to AI providers. Please check this issue. Thank you. ### Plugins oh-my-opencode ### OpenCode version 1.1.23 ### Steps to reproduce 1. Install `Finicky` and set it as default browser 2. run `/connect` command and try to do OAuth (in my case, it was Github copilot) 3. Do auth 4. Now you can see error logs ### Screenshot and/or share link _No response_ ### Operating System macOS Sonoma ### Terminal iTerm2
yindo added the opentuibug labels 2026-02-16 18:04:12 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 16, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #7918: Crash when local.agent.current() returns undefined during startup/auth - exact same error at src/cli/cmd/tui/component/prompt/index.tsx
  • #7550: TUI crashes after successful native OpenAI account connection with the same TypeError
  • #8056: ChatGPT OAuth crash with identical error during callback
  • #8672, #8800, #8648, #8637, #8628, #8579: Additional instances of the same 'local.agent.current().name' undefined error
  • #8274: /connect command failures related to OAuth callback and browser routing issues
  • #8552: GitHub Copilot authorization failures (same provider as your use case)

The common pattern is a race condition where the TUI component tries to access local.agent.current().name during authentication callback before the agents array has finished initializing. This appears to be a known issue affecting multiple OAuth providers and browser configurations.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 16, 2026): This issue might be a duplicate of existing issues. Please check: - #7918: Crash when local.agent.current() returns undefined during startup/auth - exact same error at src/cli/cmd/tui/component/prompt/index.tsx - #7550: TUI crashes after successful native OpenAI account connection with the same TypeError - #8056: ChatGPT OAuth crash with identical error during callback - #8672, #8800, #8648, #8637, #8628, #8579: Additional instances of the same 'local.agent.current().name' undefined error - #8274: /connect command failures related to OAuth callback and browser routing issues - #8552: GitHub Copilot authorization failures (same provider as your use case) The common pattern is a race condition where the TUI component tries to access `local.agent.current().name` during authentication callback before the agents array has finished initializing. This appears to be a known issue affecting multiple OAuth providers and browser configurations. Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6433