Skip to content

Claude Code chat client aborts agent threads with AuthRequiredException at token resolution — CLI credentials missing on memex-portal #5752

Description

@systemorph-com

What is failing
Agent thread execution on the memex-portal deployment fails with AuthRequiredException before any Claude Code CLI round can run: ClaudeCodeChatClient.ResolveToken throws "Not logged in to Claude Code. Run /login to connect your Claude subscription." (ClaudeCodeChatClient.cs:185), aborting the thread ([ThreadExec] ERROR) with no agent reply.

Probable cause
High confidence: the Claude Code CLI credential store on the affected pod has no valid session — expired, revoked, or missing in that container. This is the same underlying condition as the two earlier incidents (Admin/_LogIncident/573a90667445a82d, Admin/_LogIncident/d0b80e494a4c7326, filed as #4988, which folded the first two occurrences spanning 2026-09-17 to 2026-09-20 with reasons ranging from "Not logged in" to "401 Invalid bearer token"). The new occurrence shows the failure now surfacing earlier, at token resolution rather than inside RunProcessAsync, so tokens are still absent ~6 days after the first sighting. The remediation question from #4988 (pre-flight auth check + actionable surfacing instead of a raw ERROR stack, plus ops alerting on auth failure) remains open.

Impact
Minimal: a single occurrence on one pod (memex-portal-deployment-7fd48bdcd4-vhm9l, namespace memex), killing one agent thread run. However, any Claude-Code-backed thread routed to a pod without valid credentials will fail until the credential store is restored.

Where to look
MeshWeaver.AI.ClaudeCode/ClaudeCodeChatClient.cs — ResolveToken (~line 185) and RunProcessAsync (~line 364). First action is operational: re-authenticate the Claude Code CLI / refresh the stored credentials on the memex-portal deployment; this is likely a near-duplicate of #4988 and can probably be closed against it once the credential refresh is confirmed.


Evidence

Fingerprint 2c7fde55c5639cba
Category MeshWeaver.AI.AgentChatClient
Severity Error
Exception MeshWeaver.AI.AuthRequiredException
Top frame MeshWeaver.AI.ClaudeCode.ClaudeCodeChatClient.<ResolveToken>b__21_0(CancellationToken ct)
Namespace memex
Pods memex-portal-deployment-7fd48bdcd4-vhm9l
Occurrences 1
First seen 2026-09-26 09:54:36Z
Last seen 2026-09-26 09:54:36Z
Routing not determined — no configured route matches the category MeshWeaver.AI.AgentChatClient. This repository is the configured fallback, not a finding about who owns the fault; the category names the LOGGER, which may not be the subject.
Recent log lines
2026-09-26 09:54:36Z memex-portal-deployment-7fd48bdcd4-vhm9l fail: MeshWeaver.AI.AgentChatClient[0]
      [ThreadExec] ERROR: 09:54:36.246 threadPath=rbuergi/Task/713c40def4/_Thread/you-are-the-triage-partner-participant-i-d932
      MeshWeaver.AI.AuthRequiredException: Not logged in to Claude Code. Run /login to connect your Claude subscription.
         at MeshWeaver.AI.ClaudeCode.ClaudeCodeChatClient.<ResolveToken>b__21_0(CancellationToken ct) in /repo/src/MeshWeaver.AI.ClaudeCode/ClaudeCodeChatClient.cs:line 185
         at MeshWeaver.Mesh.Threading.IoPool.<>c__DisplayClass73_2`1.<InvokeBlockingCore>b__3() in /home/runner/work/MeshWeaver/MeshWeaver/src/MeshWeaver.Mesh.Contract/Threading/IoPool.cs:line 895
         at System.Threading.Tasks.Task`1.InnerInvoke()
         at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
      --- End of stack trace from previous location ---
         at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
         at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
      --- End of stack trace from previous location ---
         at System.Threading.Channels.AsyncOperation`2.GetResult(Int16 token)
         at MeshWeaver.Reactive.ObservableTopNExtensions.ToAsyncEnumerableSequence[T](IObservable`1 source, CancellationToken ct)+MoveNext() in /home/runner/work/MeshWeaver/MeshWeaver/src/MeshWeaver.Messaging.Hub/Reactive/ObservableTopNExtensions.cs:line 146
         at MeshWeaver.Reactive.ObservableTopNExtensions.ToAsyncEnumerableSequence[T](IObservable`1 source, CancellationToken ct)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
         at MeshWeaver.AI.ThreadExecution.<>c__DisplayClass29_7.<<ExecuteMessageAsync>b__42>d.MoveNext() in /home/runner/work/MeshWeaver/MeshWeaver/plugins-repo/src/MeshWeaver.AI/ThreadExecution.cs:line 2654
      --- End of stack trace from previous loc…[truncated]

Opened automatically from Admin/_LogIncident/2c7fde55c5639cba. Recurrences are folded into this issue rather than opening new ones.
It also stands for the whole log site ceaf1d0cedf26da6: other fingerprints of this site fold in here as comments rather than opening tickets of their own.

Activity

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 workingsev:LLow - cosmetic, rare edge case, or developer-only

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions