[Fix] Auto no longer denies calls in the first seconds of an open session - #3339
Merged
Merged
Conversation
Contributor
This was referenced Sep 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
Internal follow-up to #3116; no separate issue is linked.
Why this PR exists
What changed
With Auto on, a call Auto wouldn't run by itself is denied when the session owner is away and asked about when they're present. Presence is a 30-second lease that an open session page renews every 10 seconds. A newly opened session page sometimes drops its lease right after mounting: locally, the page sends two renewals and then a removal that lands last. Until the next renewal, the owner looked away. The agent's first tool calls usually land inside that window, so a user watching their own brand-new session had a call denied instead of getting a card.
Before denying, the session and task paths now check presence a second time, a full renewal (11 seconds) later. The owner counts as away only if both lookups find nobody. A genuinely absent owner's denial comes about 11 seconds later; nothing else changes.
How it was tested
pnpm lint, uncachedpnpm check-types, and the Judgement check pass.Checklist
[Fix],[Feat],[Improve],[Refactor],[Docs], or[Chore]followed by a user-facing descriptionpnpm lintandpnpm check-typespass locallypnpm changeset(not needed: Auto is a nightly-only experiment)Combined local smoke (2026-09-30)
All six Auto/approval PRs (#3332, #3334, #3335, #3337, #3338, #3339) were merged together locally and run on a local stack. It used a real web session with Auto on, Jev through OpenRouter, and a local MCP server whose tools only log (
list_files,delete_file,pay_invoice). The PRs merge cleanly into develop in any order, except #3332 and #3337: both add an export next to each other inpackages/types, and whichever lands second needs a trivial rebase. The combined build passes uncachedpnpm check-types,pnpm lint, and the approval suites (cloud-agents 131, sdk 23, worker 13, db 32).delete_fileauto-approved (authorization 0.97, highest risk level). Alist_fileswith no arguments now shows a card instead of failing the insert.list_fileswas assessed by Auto (auto-approved row).Not covered live: chat surfaces (Slack, Telegram, Discord) and the task (sandbox) path, because there's no local worker. Both are covered by unit tests.