Phin Tech docs Playpen in the store →

Credential trouble: say when a key failed, and what to do

Playpen already replaces a provider's key (provider update) and renews a ChatGPT sign-in (provider refresh). What it can't do is notice that a key stopped working. Inside the sandbox, the agent gets an HTTP 502 carrying an x-openshell-request-id, and the cause is hidden.

OpenShell records the latest failure on the sandbox: sandbox get <name> -o json has last_token_grant_failure. It gives the host and port, a failure code, and a recovery action of reauthorize, fix_configuration, retry or investigate (sandboxes, "Read Token Grant Failures"). It keeps one failure, not a history, and a successful grant to the same place clears it. The field is present, and null, on this Mac's 0.1.9. For a tool server over HTTP, endpoint_statuses also reports CredentialUnavailable as its last result. Check the exact field names on a real failure before building, since none has been seen here.

What the person sees #

A banner on the chosen sandbox, naming the provider and what to do:

The sidebar marks the sandbox, as it marks one with requests waiting.

How it's built #

Also: refresh status #

provider refresh status reports when each renewed credential was last refreshed and whether that worked. Settings ▸ Providers could show "renewed 2 hours ago" or "renewal failed" beside a ChatGPT provider. That's small and can come with the banner.