Repository navigation
Description
Found in: v1.0.5-rc2 (af465288a), release-test row B22. Unchanged between rc1 and rc2 and identical on dev.
What happens
When a turn fails because the model credential is refused, the error stored on the execution carries the subscription walk trail, built from subscription names:
Authentication failure: Failed to authenticate. API Error: 401 OAuth access token is invalid.. Check subscription token or API key configuration. Tried: <subscription-name> (auth); every candidate refused.
For a turn the person sent themselves, the Workspace replaces this with a fixed person-safe sentence. For a turn the platform started and then reports into a person's Workspace thread, it does not: the thread gets a message
Didn't finish — failed
Authentication failure: … Check subscription token or API key configuration. Tried: <subscription-name> (auth); every candidate refused.
Observed in the browser as a Workspace-only account (role user): an agent's platform-started first turn failed on a rejected credential and the text above appeared in the person's Main conversation, naming the subscription.
Subscription names are operator data (commonly a person's or a plan's name), and "Check subscription token or API key configuration" is operator guidance. Neither belongs in front of a Workspace viewer or an external client.
Why (code)
- The trail:
src/backend/services/subscription_auto_switch.py:915-930(trail_text, "Tried: A (rate limit) -> B (auth); every candidate refused."), appended to the row error atservices/task_execution_service.py:3375,services/chat_execution_service.py:939,services/pull_coordination_service.py:862(bug: a Workspace turn on a pull-pilot agent does not walk the subscription pool (SUB-003 walk is push-only) #3487). - Protected paths: the person's own Workspace turn (
client_portal/service.py:3567-3613), public links (routers/public.py:876-883), inline channel turns (adapters/message_router.py:929). - Unprotected path: completion reports.
services/channel_completion_report.py_portal_body(:588-593) and_summarize(:118-142) pass the raw error through_sanitized_detail(:82-115), which redacts credential patterns and truncates, nothing else. Its own docstring notes that raw failure text reaching a client "contradicted bug(workspace): failed turns are invisible to the client — fast failures misreported as "lost track", backend error discarded, Retry suppressed where it is safe #2320's rule that raw failure text is operator-only". - By the same code (not observed in a browser): schedule results delivered to a Workspace thread, delegated children, approved gate runs, background Slack/Telegram completion reports, and the Workspace Work card (
client_portal/work/service.py:326, row error cut to 200 characters).
Tests
tests/unit/test_2320_portal_failed_turn_visibility.py:402-425pins "no subscription / api key wording" for the person's own turn only.tests/unit/test_ent457_portal_completion_report.py:204-209asserts the raw error text appears in the portal body.- Nothing pins "no subscription name or operator guidance reaches a portal viewer" for completion reports or the Work card.
Expected
Completion reports and the Work card give non-operators the same person-safe failure sentence the own-turn path uses; the trail and the raw provider text stay on operator surfaces (execution detail, operator alert).
Reproduce
- Register a subscription whose token is rejected and assign it to an agent a Workspace-only account can open.
- Cause a platform-started turn whose result is reported into that person's Workspace thread (for example a schedule with Workspace delivery).
- Open the thread as the Workspace account.
Not verified
The own-turn auth_switched branch (client_portal/service.py:3593-3602) interpolates the new subscription's name into the person's message; whether it is reachable in practice was not tested.
Activity
obasilakis commentedon Nov 13, 2026
/claim
github-actions commentedon Nov 13, 2026
Claimed by @obasilakis. Label
status-in-progressadded.Next steps:
feature/4482-<short-slug>Fixes #4482fix(portal): room failure line and refusal-with-trail are person-safe…
fix(portal): failed background turns report a person-safe sentence, n…