colab_drive_auth: no consent window on a headless CLI, tool waits silently #14
Labels
No labels
area/backup
area/cli
area/docs
area/dsh
area/forgejo
area/host
area/mcp
area/plugin
area/security
area/ux
needs-operator
priority/later
priority/next
priority/now
type/bug
type/research
type/task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
dsh-plugins/dsh-colab#14
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Real-account report after the v0.1.3 timeout fix.
Observed
colab_drive_authstarts the handoff, but no browser window opens and the tool does not return untiltimeout_sexpires. The consent URL is only visible indata.urlafter the timeout.Root cause
commands/automation.pyprints the URL and blocks on the Enter prompt; only 0.8.0'sshow_drive_auth_url()calls a browser opener.DISPLAY, so even 0.8.0's opener cannot show a window.data.urlonly in the finalauth_pendingresult, so the operator had no actionable URL while the retry loop burned the budget.Fix (0.1.4)
auth_pending+ URL after the first failed attempt by default;wait_for_consent: truekeeps the old one-call loop;xdg-open/open) anddata.browser {opened, reason}(no-display,not-installed,failed,launched) so the reason is diagnosable; disable withdriveOpenBrowser: false;colab logdrive_auth_neededevents when stdout does not carry it;data.last_tailcarries the redacted automation output; no URL ⇒ hint points atcolab_session_status/colab_session_restartinstead of asking for a nonexistent URL.Still worth knowing
CLI 0.8.0 keeps its OAuth token in the OS keyring (0.7.5 used
~/.config/colab-cli/token.json). A headless host without a keyring backend prompts for OAuth on every invocation; use a keyring backend orcolab --auth=adcthere.Fixed in 0.1.4 (
6541015, tagv0.1.4; Forgejo registry and release page are live; npmjs staged).colab_drive_authreturnsauth_pending+data.urlimmediately after the first failed consent attempt instead of waiting outtimeout_sat 180s.wait_for_consent: truerestores the old one-call retry loop.xdg-open/open) and reportsdata.browser {opened, reason}:launched,no-display,not-installed,failed,disabled. SetdriveOpenBrowser: falseto skip the attempt.colab logdrive_auth_neededevents if stdout does not contain it;data.last_tailcarries the redacted automation tail.colab_session_status/colab_session_restartrather than a nonexistent URL.Retest: upgrade, restart the profile, then call
colab_drive_auth(session=…, project=…). Expect an immediateauth_pendingwith the URL; open/approve it, then call again — the retry mounts.Environment notes confirmed while reproducing: CLI 0.7.5 never opens the consent page (0.8.0 does), and 0.8.0 stores its OAuth token in the OS keyring. This box has no keyring backend and no display, so it cannot complete a full live mount; a headless host needs a keyring backend or
colab --auth=adc.Follow-up in 0.1.6 after the real-account report that the plugin auto-propagated before consent and returned 400.
colab drivemount, waits at its Enter prompt, and asks a blocking Next/Cancel question. Only Next writes the newline; Cancel terminates the child and returnsauth_pendingwith the URL. This is the manual terminal flow encoded in the tool.detail(the card's title is plain text, which is why the earlier card had no clickable URL).colab_runforwards the calling agent so the same card works inside a recipe.userQuestionsanswerer keep the timer fallback.Verified on 2026-11-12 with a real CPU session on srvbtw: fresh session, real
colab_drive_authmounted/content/drive(attempts: 1, verified), a realcolab_lslistedMyDrive, then the session was stopped. Account consent was already on file for this account, so that mount did not need a prompt; the Next/Cancel card path was exercised in the Web UI against the fake CLI backend. 101 tests pass on Node 26 and 22.6.