Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

PII redaction filter on the model gateway blocks agent chat requests outright when its redaction context is lost, aborting agent rounds mid-flight

Open
#5,932 64 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
csharp
Domain
ai

Research direction

Start by locating the model gateway’s content-filter/redaction middleware and the code that emits redaction_context_lost; trace how per-request redaction context is keyed, stored, and looked up. The request path named in the issue is MeshWeaver.AI.AgentChatClient through ChatClient.CompleteChatAsync. Determine why the lookup misses and verify that affected requests are redacted and forwarded rather than rejected; the issue does not name source files or tests.

Written by the indexing model from the issue text.

Description

bug sev:M

What is failing

The PII redaction layer in front of the model gateway rejects an outbound chat-completion request from MeshWeaver.AI.AgentChatClient outright with HTTP 403 (Request blocked: PII detected (redaction_context_lost)) instead of redacting and forwarding it. The ClientResultException surfaces inside the agent's streaming chat call and aborts the entire agent round — in the observed case a pr-reviewer round that had already completed its analysis (~29k tokens of output) and never got to post its review for Systemorph/MeshWeaver.Plugins#2619.

Probable cause

The gateway-side redaction filter could not find or restore its per-request redaction context — the reason code redaction_context_lost says the filter lost the state it needs to mask PII, and its fail-closed policy is to block rather than send unredacted or redact statelessly. Moderate confidence on the mechanism (the 403 body names it directly); low confidence on why the context was lost. One circumstantial hint: the blocked call came late in a long-lived round (after a ~9-minute model call and a failed patch confirmation), so expiry/eviction of redaction context on long rounds is a plausible trigger — but the evidence does not establish this.

Impact

A single occurrence on one pod so far, but the failure mode is expensive when it fires: the whole agent round is lost, including tool work already done, and the round ends in Error with nothing written back. For the PR-review pipeline that means a review silently not posted. Workaround: re-run the round. Severity left at M given one occurrence; if this recurs, it degrades every long agent round and should be re-ruled.

Where to look

The content-filter/redaction middleware on the model gateway serving z-ai/glm-5.3, on the request path behind MeshWeaver.AI.AgentChatClient → OpenAI ChatClient.CompleteChatAsync (top frame OpenAI.ClientPipelineExtensions.ProcessMessageAsync). Start from the code that emits the redaction_context_lost reason code: where redaction context is keyed, stored, and looked up per request, and what makes the lookup miss. Related known issue, same layer but a different failure mode (masking/corruption instead of blocking): Systemorph/MeshWeaver.Plugins#2567 — not a duplicate, but the same component and worth fixing together.


Evidence
Fingerprint 367de820103e2273
Category MeshWeaver.AI.AgentChatClient
Severity Error
Exception System.ClientModel.ClientResultException
Top frame OpenAI.ClientPipelineExtensions.ProcessMessageAsync(ClientPipeline pipeline, PipelineMessage message, RequestOptions options)
Namespace memex
Pods memex-portal-deployment-747567ff6d-zsvvw
Occurrences 1
First seen 2026-09-30 18:34:21Z
Last seen 2026-09-30 18:34:21Z
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-30 18:34:21Z memex-portal-deployment-747567ff6d-zsvvw fail: MeshWeaver.AI.AgentChatClient[0]
      [ThreadExec] ERROR: 18:34:21.177 threadPath=Hosting/Triage/_Thread/review-pull-request-systemorph-meshweave-fa96
      System.ClientModel.ClientResultException: HTTP 403 (: )
      
      Request blocked: PII detected (redaction_context_lost)
         at OpenAI.ClientPipelineExtensions.ProcessMessageAsync(ClientPipeline pipeline, PipelineMessage message, RequestOptions options)
         at OpenAI.Chat.ChatClient.CompleteChatAsync(BinaryContent content, RequestOptions options)
         at OpenAI.Chat.ChatClient.<>c__DisplayClass20_0.<<CompleteChatStreamingAsync>b__0>d.MoveNext()
      --- End of stack trace from previous location ---
         at OpenAI.AsyncSseUpdateCollection`1.GetRawPagesAsync()+MoveNext()
         at OpenAI.AsyncSseUpdateCollection`1.GetRawPagesAsync()+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
         at System.ClientModel.AsyncCollectionResult`1.GetAsyncEnumerator(CancellationToken cancellationToken)+MoveNext()
         at System.ClientModel.AsyncCollectionResult`1.GetAsyncEnumerator(CancellationToken cancellationToken)+MoveNext()
         at System.ClientModel.AsyncCollectionResult`1.GetAsyncEnumerator(CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
         at Microsoft.Extensions.AI.OpenAIChatClient.FromOpenAIStreamingChatCompletionAsync(IAsyncEnumerable`1 updates, ChatCompletionOptions options, CancellationToken cancellationToken)+MoveNext()
         at Microsoft.Extensions.AI.OpenAIChatClient.FromOpenAIStreamingChatCompletionAsync(IAsyncEnumerable`1 updates, ChatCompletionOptions options, CancellationToken cancellationToken)+MoveNext()
         at Microsoft.Extensions.AI.OpenAIChatClient.FromOpenAIStreamingChatCompletionAsync(IAsyncEnumerable`1 updates, ChatCompletionOptions options, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
    …[truncated]

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

Dominant language
C#
Stars
12
Forks
5
Avg merge
4h 19m
Merged PRs (30d)
932

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Systemorph/MeshWeaver

All issues in Systemorph/MeshWeaver

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.