Skip to content

Gemini exits before first turn in ~1.7s with ambiguous authentication/startup error (7.0.8 / runtime 5.0.9) #233

Closed

Description

@sumitake

Observed failure

One authorized read-only review.repository invocation explicitly targeting Gemini returned provider_error before its first model turn.

  • Installed plugin: 7.0.8; signed runtime: 5.0.9, macOS x86_64.
  • Selected carrier: gemini/advisory.repository.
  • Native process duration: 1,723 ms; aggregate duration: 1,754 ms.
  • Native exit code: 1, cleanup confirmed.
  • Native result: ERROR, authentication failed or timed out, empty conversation ID, zero reported turns/input/output tokens.
  • Request ID: f5c1c102-21cd-4c8b-9da3-6dd02396fac0.
  • Installed manifest matches the result's manifest digest. No review verdict or response-scoped model identity was returned.

The private review payload, application identity, credentials and runtime data are deliberately omitted.

Investigation result

The caller used the normal installed coordinator, EOF-delimited JSON, non-PTY stdin and no outer timeout. Its initial 1,000 ms execution-tool yield did not cancel the process; the caller later collected completion. Runtime remaining deadline was 86,397,999 ms. The client transported the complete native error successfully; its outer status=ok is not a successful review.

Checked installed package source:

  • coordinator.py:374-393: EOF request framing; :438-442: synchronous client call before response.
  • runtime_client.py:42,1144-1184: 24-hour default and remaining deadline forwarding.
  • runtime_client.py:995-998: collector waits while streams are open or process is alive.
  • runtime_client.py:1023-1035: progress-pipe EOF retains the existing lease while the response drains.
  • runtime_client.py:1238-1242: waits for process completion with the remaining deadline.
  • runtime_client.py:829-866: canonical OS-account HOME and native SSH context are preserved.

Supported conclusion: early native startup/authentication failure with insufficient phase diagnostics. Not established: missing credentials, caller timeout, or a confirmed startup race. The operator suspects Agy was not given sufficient startup time. That remains a plausible hypothesis for the native readiness/authentication boundary, rather than evidence that the caller stopped at its first yield.

The native adapter/authentication implementation is inside the installed compiled runtime bundle, so this bounded inspection could not distinguish terminal auth denial from transient startup readiness or identify the internal phase budget.

Related history: #214 (older HOME/SSH projection issue) and #164 (PTY noncanonical-readiness race). Neither is established as this failure: this call preserved HOME/SSH and used closed non-PTY stdin.

Requested correction and qualification

Inspect the native startup/authentication boundary. Emit bounded, nonsecret diagnostics distinguishing startup-not-ready, terminal authentication rejection and elapsed authentication timeout, including phase, elapsed time and applicable budget.

Any readiness wait should occur before prompt submission, within the original invocation. Preserve native owner/profile context, confirmed cleanup and the single-attempt/no-replay contract; do not add blind retries or copied authentication profiles.

Qualify delayed startup, terminal auth rejection and startup timeout separately. Delayed readiness must not become an immediate false authentication failure, and no model request may be replayed.

No provider replay, raw CLI workaround, credential inspection, runtime modification or live recovery test was performed during this investigation.

Activity

  1. sumitake commented on Oct 16, 2026

    @sumitake
    OwnerAuthor

    Additional investigation — October 15, 2026 (Pacific)

    A separate occurrence on plugin 7.0.8, signed runtime 5.0.9, and installed agy 1.3.6 now has native-log evidence. It narrows the cause of this occurrence; it does not retroactively establish the cause of the original 1.7-second report.

    Observed result

    • Request: b6f8cdee-61bc-4a81-a81f-915d61358814; carrier gemini/advisory.repository.
    • Native duration 27,205 ms; aggregate 27,234 ms. Exit 1, cleanup confirmed, zero turns/tokens and no conversation ID.
    • Native terminal text: authentication failed or timed out.
    • Remaining routing deadline was 86,397,999 ms. The caller collected the process's terminal response; no short outer timeout ended this invocation. Outer transport status=ok did not mean the review succeeded.

    Native timeline (sanitized)

    Pacific time Observation
    23:08:54.792928 Language server initialized successfully in 3.774 seconds.
    23:09:04.930415 Print mode began silent authentication.
    23:09:04.949785 Existing token was loaded and required refresh.
    23:09:12.957726 Refresh failed with lookup oauth2.googleapis.com: no such host.
    23:09:12.957887 Native diagnostic explicitly said token validation failed due to network error and the token may still be valid.
    23:09:12.957961 Silent authentication ended unsuccessfully.
    23:09:12.958051 CLI reported no controlling terminal for interactive login.
    23:09:17.965129 Language-server shutdown timed out, accounting for roughly another five seconds.

    A later existing native log on the same host records silent authentication starting at 23:48:42.276428 and succeeding at 23:48:50.888029 (8.612 seconds). This investigation did not initiate that invocation or replay the failed review. This proves later authentication success, not review completion. DNS resolution of the OAuth and GitHub hosts also succeeded during the subsequent read-only inspection.

    Supported conclusion: this 27-second occurrence was a native token-refresh network/DNS failure, followed by native shutdown delay. It is not evidence of revoked credentials, a caller-imposed 27-second deadline, or a still-running authentication operation that the caller abandoned. Whether the earlier 1.7-second occurrence has the same cause remains unknown.

    Recommended bounded correction

    1. Preserve the native terminal outcome and existing no-replay behavior. Once agy has exited, waiting longer in the caller cannot complete that process's authentication.
    2. Surface a sanitized phase/cause hint from the existing bounded request-private native-log capture when it is available: startup/authentication, network lookup/refresh failure versus explicit credential rejection versus actual elapsed timeout. Missing or unreadable logs must remain optional diagnostics; they cannot manufacture success or change execution authority. Do not publish raw logs, OAuth material or private paths.
    3. Keep initialization/authentication within the original process lifecycle and applicable budget. Do not treat intermediate not authenticated/login/refresh messages as terminal while the process is alive. Use documented native timeout/readiness controls if available; the installed help exposes no separate authentication-timeout option. Increasing the overall review deadline alone does not repair this observed DNS failure.
    4. Add focused regressions: delayed authentication followed by a valid result beyond a short startup threshold; explicit credential rejection; token-refresh DNS failure; actual supervisor timeout; and missing diagnostic logs. Verify delayed success remains success, network failure does not imply invalid credentials, timeout provenance is accurate, and no request is replayed.

    The native implementation correction belongs in the private producer and must reach this plugin through a rebuilt signed runtime release. Caller guidance and privacy-safe diagnostics can be tracked here. No runtime/source, authentication, network configuration or parent-task workspace was modified by this investigation.

  2. sumitake commented on Oct 19, 2026

    @sumitake
    OwnerAuthor

    Additional recurrence during an authorized issue-fix/release task on 2026-10-19 UTC:

    • Installed plugin 7.0.8; manifest digest f2131b3870244b9be2016cf839886deaf6c9470ff8c0d3b6b8e19a81a455b405.
    • Request f5ba203b-c091-4879-b252-89e0bfa61c91, action context.documents.intent, ordinary untargeted routing selected gemini/context.documents.
    • Shape: quality_profile=standard, effort_class=standard, max_parallel=1, dispatch_requested=true, one work unit containing a bounded document comparison. No repository restrictions or outer timeout; EOF-delimited JSON, non-PTY stdin.
    • Native duration 1,956 ms; aggregate 1,979 ms. Native exit 1, cleanup confirmed, zero reported turns/tokens, no conversation ID or model identity. Preserved terminal content reports authentication failed or timed out.
    • The planning-only request had returned an eligible Gemini route. Live outer transport status=ok did not establish task success. Optional observation persistence also reported observation_write_failed / PermissionError under the caller sandbox; it did not remove the native content.

    This is another early native authentication/startup failure with no substantive intent assessment. It does not establish credential revocation, provider outage, a short caller timeout, or the exact underlying cause. No replay, provider fallback, credential inspection, or runtime modification was performed. The raw result is retained privately; the payload is omitted here.

  3. sumitake commented on Oct 23, 2026

    @sumitake
    OwnerAuthor

    The bounded diagnostic correction is shipped: optional sanitized Agy startup/authentication/network/timeout hints preserve the original status, content, lifecycle and single-attempt behavior. Fixture regressions cover delayed success, rejection, DNS evidence, supervisor timeout and missing diagnostics; fresh staged and installed Google checks also succeeded. This closes the diagnostic correction only: the original 1.7-second event remains unexplained, and this does not claim to cure external authentication/DNS failures or authorize replay.

    Published and verified: agent-collab 7.0.9, signed runtime 5.0.12. Distribution #235 and merged closeout #239 record the released scope. All 184 released files match the observed installations; bounded native checks do not guarantee future provider availability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions