Files
PaperClipAI/packages/adapters/codex-local
Tonio 429a004da5 Honor device sign-in expiry during onboarding (#23270)
## Thinking Path

> - Paperclip connects agents to model providers.
> - Onboarding starts a device login for OpenAI.
> - The login starts its session clock before it acquires a sandbox.
> - The command must stop by the deadline shown for the session.
> - The wizard can then offer a fresh code when that session expires.

## Linked Issues or Issue Description

**Subsystem affected**

Subscription onboarding and displayed-code login. Refs #23268.

**Current behavior**

An unattended OpenAI login can show a generic failure at expiry.

**Proposed behavior**

Use the session deadline and show the same expiry message as Claude.
Show “Waiting…” for OpenAI and “Waiting for code…” for Claude.

## What Changed

Bound the command timer to the remaining session lifetime. Arm the host
timer before the command can schedule its own timeout. Keep the outcome
fixed during cleanup. Updated the OpenAI waiting label.

## Verification

All 79 tests in the device login service, runner, and login card suites
passed. These cover delayed sandbox setup, failure before expiry, and
timeout at the deadline.

## Risks

Early command failures still need their own failure state. The change
preserves those failures and explicit cancellation.

## Model Used

OpenAI GPT-6 with Codex repository and test tools.

## Checklist

- [ ] I have included a thinking path that traces from project context
to this change
- [ ] I have specified the model used (with version and capability
details)
- [ ] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have searched GitHub for duplicate or related PRs and linked
them above
- [ ] I have either (a) linked existing issues with `Fixes: #` / `Closes
#` / `Refs #` OR (b) described the issue in-PR following the relevant
issue template
- [ ] I have not referenced internal/instance-local Paperclip issues or
links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip`
URLs)
- [ ] My branch name describes the change (e.g. `docs/...`, `fix/...`)
and contains no internal Paperclip ticket id or instance-derived details
- [ ] I have run tests locally and they pass
- [ ] I have added or updated tests where applicable
- [ ] I have updated relevant documentation to reflect my changes
- [ ] I have considered and documented any risks above
- [ ] All Paperclip CI gates are green
- [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [ ] I will address all Greptile and reviewer comments before
requesting merge
2026-11-30 08:34:29 +00:00
..
2026-03-12 13:09:22 -05:00