claude-code - 💡(How to fix) Fix [BUG] False-positive AUP block on z/OS HLASM development, Opus 4.7, mid-session regression [1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52688Fetched 2026-04-24 10:42:23
View on GitHub
Comments
1
Participants
1
Timeline
6
Reactions
0
Author
Participants
Timeline (top)
labeled ×4commented ×1cross-referenced ×1

Error Message

Here's a fragment of the larger attached session copy:

● Bash(echo "=== local file bytes / encoding ==="; file /home/joede/git2026/zoweclang/zowe-common-c/c/hlasm_mini.c; wc -l -c /home/joede/git2026/zoweclang/zowe-common-…) ⎿  === local file bytes / encoding === /home/joede/git2026/zoweclang/zowe-common-c/c/hlasm_mini.c: C source, Unicode text, UTF-8 text 48 1485 /home/joede/git2026/zoweclang/zowe-common-c/c/hlasm_mini.c … +6 lines (ctrl+o to expand)

Called zos 2 times (ctrl+o to expand)

● Let me isolate whether it's upload-specific by creating a minimal file DIRECTLY on z/OS (not via upload) and compiling it.

Called zos 2 times (ctrl+o to expand)

● Upload-specific issue. Native-created file compiles fine; uploaded file can't be opened by ibm-clang64 despite looking normal. Let me compare the upload-created files against the native-created one at byte level.

● Calling zos… (ctrl+o to expand)

✻ Building configmgr with ibm-clang64… (1m 22s · ↑ 4.0k tokens · thought for 8s) ⎿  ✔ Fetch + checkout feature branch on z/OS ◼ Run build_cmgr_clang.sh zos on z/OS ◻ Functional test configmgr on z/OS ◻ Fix em-dash chars in source comments

❯ /effort ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ❯ Press up to edit queued messages ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── esc to interrupt · ctrl+t to hide tasks

● The EDC5122I Input/output error is the same charsets.c-style I/O failure — probably a file-tagging issue from my upload. Let me check the tag.

Called zos 5 times (ctrl+o to expand)

❯ If you make a file locally in UTF8 and you use zos_upload_files all should go well.

● Taking you at your word — UTF-8 local + zos_upload_files should be fine. So this I/O error is probably transient or something specific. Two things I'll do:

  1. Fix the RC detection in the build script — | tee ... was eating the compiler exit code, so the rc=0 was misleading. Using PIPESTATUS[0].
  2. Suggest a fresh re-upload, since I don't see anything wrong with the local file and your observation is that the upload-to-compile path normally works.

● Write(build/build_hlasm_mini.sh) ⎿  Added 3 lines, removed 4 lines 9 # 10 # Output: build/hlasm_mini.o + build/hlasm_mini.log 11 12 -set -e 13 - 12 V=${1:-1} 13 14 BUILD_DIR=$(cd "$(dirname "$0")" && pwd) ... 31 -ferror-limit=100
32 "$SRC" 2>&1 | tee "$LOG" 33 36 -RC=$? 34 +# Use PIPESTATUS[0] to capture clang's exit code, not tee's. 35 +RC=${PIPESTATUS[0]:-$?} 36 echo "---" 38 -echo "rc=$RC obj=$OBJ log=$LOG" 37 +echo "compiler rc=$RC obj=$OBJ log=$LOG"

Called zos (ctrl+o to expand)

● Re-uploaded both. Try ./build_hlasm_mini.sh 1 again — the fresh upload may fix whatever the I/O error was, and the script's exit-code reporting now shows the real compiler rc.

✻ Churned for 2m 18s

❯ if you use zos_exec to run the build script, what do you see?

Called zos (ctrl+o to expand)

● Same EDC5122I I/O error as Joe saw. And the rc=0 is spurious — PIPESTATUS doesn't work under /bin/sh. Let me look at the local file for anything unusual.

● Bash(echo "=== local file bytes / encoding ==="; file /home/joede/git2026/zoweclang/zowe-common-c/c/hlasm_mini.c; wc -l -c /home/joede/git2026/zoweclang/zowe-common-…) ⎿  === local file bytes / encoding === /home/joede/git2026/zoweclang/zowe-common-c/c/hlasm_mini.c: C source, Unicode text, UTF-8 text 48 1485 /home/joede/git2026/zoweclang/zowe-common-c/c/hlasm_mini.c … +6 lines (ctrl+o to expand)

Called zos 2 times (ctrl+o to expand)

● Let me isolate whether it's upload-specific by creating a minimal file DIRECTLY on z/OS (not via upload) and compiling it.

Called zos 2 times (ctrl+o to expand)

● Upload-specific issue. Native-created file compiles fine; uploaded file can't be opened by ibm-clang64 despite looking normal. Let me compare the upload-created files against the native-created one at byte level.

Called zos (ctrl+o to expand) ⎿  API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (https://www.anthropic.com/legal/aup). Please double press esc to edit your last message or start a new session for Claude Code to assist with a different task. If you are seeing this refusal repeatedly, try running /model claude-sonnet-4-20250514 to switch models.

Code Example

Here's a fragment of the larger attached session copy:


Bash(echo "=== local file bytes / encoding ==="; file /home/joede/git2026/zoweclang/zowe-common-c/c/hlasm_mini.c; wc -l -c
      /home/joede/git2026/zoweclang/zowe-common-)
  ⎿  === local file bytes / encoding ===
     /home/joede/git2026/zoweclang/zowe-common-c/c/hlasm_mini.c: C source, Unicode text, UTF-8 text
       48 1485 /home/joede/git2026/zoweclang/zowe-common-c/c/hlasm_mini.c
+6 lines (ctrl+o to expand)

  Called zos 2 times (ctrl+o to expand)

Let me isolate whether it's upload-specific by creating a minimal file DIRECTLY on z/OS (not via upload) and compiling it.

  Called zos 2 times (ctrl+o to expand)

Upload-specific issue. Native-created file compiles fine; uploaded file can't be opened by ibm-clang64 despite looking normal. Let me
  compare the upload-created files against the native-created one at byte level.

 Calling zos… (ctrl+o to expand)

Building configmgr with ibm-clang64… (1m 22s · ↑ 4.0k tokens · thought for 8s)
  ⎿  ✔ Fetch + checkout feature branch on z/OS
Run build_cmgr_clang.sh zos on z/OS
Functional test configmgr on z/OS
Fix em-dash chars in source comments


/effort
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
❯ Press up to edit queued messages
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  esc to interrupt · ctrl+t to hide tasks


The EDC5122I Input/output error is the same charsets.c-style I/O failure — probably a file-tagging issue from my upload. Let me check the
  tag.

  Called zos 5 times (ctrl+o to expand)

If you make a file locally in UTF8 and you use zos_upload_files all should go well.

 Taking you at your word — UTF-8 local + zos_upload_files should be fine. So this I/O error is probably transient or something specific. Two
  things I'll do:

  1. Fix the RC detection in the build script — | tee ... was eating the compiler exit code, so the rc=0 was misleading. Using PIPESTATUS[0].
  2. Suggest a fresh re-upload, since I don't see anything wrong with the local file and your observation is that the upload-to-compile path
  normally works.

 Write(build/build_hlasm_mini.sh)
  ⎿  Added 3 lines, removed 4 lines
       9  #
      10  # Output: build/hlasm_mini.o + build/hlasm_mini.log
      11
      12 -set -e
      13 -
      12  V=${1:-1}
      13
      14  BUILD_DIR=$(cd "$(dirname "$0")" && pwd)
     ...
      31    -ferror-limit=100                      \
      32    "$SRC" 2>&1 | tee "$LOG"
      33
      36 -RC=$?
      34 +# Use PIPESTATUS[0] to capture clang's exit code, not tee's.
      35 +RC=${PIPESTATUS[0]:-$?}
      36  echo "---"
      38 -echo "rc=$RC  obj=$OBJ  log=$LOG"
      37 +echo "compiler rc=$RC  obj=$OBJ  log=$LOG"

  Called zos (ctrl+o to expand)

Re-uploaded both. Try ./build_hlasm_mini.sh 1 again — the fresh upload may fix whatever the I/O error was, and the script's exit-code
  reporting now shows the real compiler rc.

 Churned for 2m 18s

if you use zos_exec to run the build script, what do you see?

  Called zos (ctrl+o to expand)

Same EDC5122I I/O error as Joe saw. And the rc=0 is spurious — PIPESTATUS doesn't work under /bin/sh. Let me look at the local file for
  anything unusual.

 Bash(echo "=== local file bytes / encoding ==="; file /home/joede/git2026/zoweclang/zowe-common-c/c/hlasm_mini.c; wc -l -c
      /home/joede/git2026/zoweclang/zowe-common-)
  ⎿  === local file bytes / encoding ===
     /home/joede/git2026/zoweclang/zowe-common-c/c/hlasm_mini.c: C source, Unicode text, UTF-8 text
       48 1485 /home/joede/git2026/zoweclang/zowe-common-c/c/hlasm_mini.c
+6 lines (ctrl+o to expand)

  Called zos 2 times (ctrl+o to expand)

Let me isolate whether it's upload-specific by creating a minimal file DIRECTLY on z/OS (not via upload) and compiling it.

  Called zos 2 times (ctrl+o to expand)

Upload-specific issue. Native-created file compiles fine; uploaded file can't be opened by ibm-clang64 despite looking normal. Let me
  compare the upload-created files against the native-created one at byte level.

  Called zos (ctrl+o to expand)
  ⎿  API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy
     (https://www.anthropic.com/legal/aup). Please double press esc to edit your last message or start a new session for Claude Code to assist
      with a different task. If you are seeing this refusal repeatedly, try running /model claude-sonnet-4-20250514 to switch models.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Max plan, Opus 4.7, working day on z/Architecture assembly and C, session was stable for ~a day then degraded, error persists across retries, fallback to older Sonnet suggested by the error message isn't viable for the work. I have no idea what trigger things to go bad. We had been slinging C and assembly code all day. I have included as much as the session that was left in my WSL window. Claude version: 2.1.119 (Claude Code). I've submitted a bug report to [email protected] and "Fin" the agent said my conversation id was 215474044213289. Is this a case number?

claude_session.txt

What Should Happen?

Tell me how to tell Claude Opus that people who program in mixed C and Assembly language on ZOS are not nefarious actors.

Error Messages/Logs

Here's a fragment of the larger attached session copy:


● Bash(echo "=== local file bytes / encoding ==="; file /home/joede/git2026/zoweclang/zowe-common-c/c/hlasm_mini.c; wc -l -c
      /home/joede/git2026/zoweclang/zowe-common-…)
  ⎿  === local file bytes / encoding ===
     /home/joede/git2026/zoweclang/zowe-common-c/c/hlasm_mini.c: C source, Unicode text, UTF-8 text
       48 1485 /home/joede/git2026/zoweclang/zowe-common-c/c/hlasm_mini.c
     … +6 lines (ctrl+o to expand)

  Called zos 2 times (ctrl+o to expand)

● Let me isolate whether it's upload-specific by creating a minimal file DIRECTLY on z/OS (not via upload) and compiling it.

  Called zos 2 times (ctrl+o to expand)

● Upload-specific issue. Native-created file compiles fine; uploaded file can't be opened by ibm-clang64 despite looking normal. Let me
  compare the upload-created files against the native-created one at byte level.

● Calling zos… (ctrl+o to expand)

✻ Building configmgr with ibm-clang64… (1m 22s · ↑ 4.0k tokens · thought for 8s)
  ⎿  ✔ Fetch + checkout feature branch on z/OS
     ◼ Run build_cmgr_clang.sh zos on z/OS
     ◻ Functional test configmgr on z/OS
     ◻ Fix em-dash chars in source comments


  ❯ /effort
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
❯ Press up to edit queued messages
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  esc to interrupt · ctrl+t to hide tasks


● The EDC5122I Input/output error is the same charsets.c-style I/O failure — probably a file-tagging issue from my upload. Let me check the
  tag.

  Called zos 5 times (ctrl+o to expand)

❯ If you make a file locally in UTF8 and you use zos_upload_files all should go well.

● Taking you at your word — UTF-8 local + zos_upload_files should be fine. So this I/O error is probably transient or something specific. Two
  things I'll do:

  1. Fix the RC detection in the build script — | tee ... was eating the compiler exit code, so the rc=0 was misleading. Using PIPESTATUS[0].
  2. Suggest a fresh re-upload, since I don't see anything wrong with the local file and your observation is that the upload-to-compile path
  normally works.

● Write(build/build_hlasm_mini.sh)
  ⎿  Added 3 lines, removed 4 lines
       9  #
      10  # Output: build/hlasm_mini.o + build/hlasm_mini.log
      11
      12 -set -e
      13 -
      12  V=${1:-1}
      13
      14  BUILD_DIR=$(cd "$(dirname "$0")" && pwd)
     ...
      31    -ferror-limit=100                      \
      32    "$SRC" 2>&1 | tee "$LOG"
      33
      36 -RC=$?
      34 +# Use PIPESTATUS[0] to capture clang's exit code, not tee's.
      35 +RC=${PIPESTATUS[0]:-$?}
      36  echo "---"
      38 -echo "rc=$RC  obj=$OBJ  log=$LOG"
      37 +echo "compiler rc=$RC  obj=$OBJ  log=$LOG"

  Called zos (ctrl+o to expand)

● Re-uploaded both. Try ./build_hlasm_mini.sh 1 again — the fresh upload may fix whatever the I/O error was, and the script's exit-code
  reporting now shows the real compiler rc.

✻ Churned for 2m 18s

if you use zos_exec to run the build script, what do you see?

  Called zos (ctrl+o to expand)

● Same EDC5122I I/O error as Joe saw. And the rc=0 is spurious — PIPESTATUS doesn't work under /bin/sh. Let me look at the local file for
  anything unusual.

● Bash(echo "=== local file bytes / encoding ==="; file /home/joede/git2026/zoweclang/zowe-common-c/c/hlasm_mini.c; wc -l -c
      /home/joede/git2026/zoweclang/zowe-common-…)
  ⎿  === local file bytes / encoding ===
     /home/joede/git2026/zoweclang/zowe-common-c/c/hlasm_mini.c: C source, Unicode text, UTF-8 text
       48 1485 /home/joede/git2026/zoweclang/zowe-common-c/c/hlasm_mini.c
     … +6 lines (ctrl+o to expand)

  Called zos 2 times (ctrl+o to expand)

● Let me isolate whether it's upload-specific by creating a minimal file DIRECTLY on z/OS (not via upload) and compiling it.

  Called zos 2 times (ctrl+o to expand)

● Upload-specific issue. Native-created file compiles fine; uploaded file can't be opened by ibm-clang64 despite looking normal. Let me
  compare the upload-created files against the native-created one at byte level.

  Called zos (ctrl+o to expand)
  ⎿  API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy
     (https://www.anthropic.com/legal/aup). Please double press esc to edit your last message or start a new session for Claude Code to assist
      with a different task. If you are seeing this refusal repeatedly, try running /model claude-sonnet-4-20250514 to switch models.

Steps to Reproduce

I was working on fixing bugs in a legitimate project. I was on a session using the Claude CLI in Windows Subsystem For Linux. I am part of the zowe.org (Open Mainframe Project) part of the Linux Foundation. I am working on some nasty bugs in upgrading the C compiler and its use of embedded assembler code. Nothing really different that what kernel or device driver people might do. Anyway after about 6-12 hours of slogging away on the bug I go into a loop with the:

⎿ API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (https://www.anthropic.com/legal/aup). Please double press esc to edit your last message or start a new session for Claude Code to assist with a different task. If you are seeing this refusal repeatedly, try running /model claude-sonnet-4-20250514 to switch models.

For details sake we were working exactly on this file: https://github.com/zowe/zowe-common-c/blob/v3.x/staging/c/recovery.c, and trying to figure out how to get the new IBM clang compiler (ibm-clang64) to accept certain __asm() constructs that worked in older, more proprietary IBM c compilers. I just cannot come up with a theory of what the trigger could have been. I've included a partial transcript.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

4.7

Claude Code Version

2.1.119

Platform

Other

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

The issue is likely due to a false positive detection of a usage policy violation by Claude Code, triggered by the upload and compilation of a C file containing embedded assembler code, and a potential workaround is to try switching to a different model, such as claude-sonnet-4-20250514, as suggested in the error message.

Guidance

  • The error message suggests that the issue may be related to the usage policy, but the user believes it is a false positive, so it's worth investigating further.
  • The user has already tried re-uploading the file and checking the local file for any unusual characters, but the issue persists.
  • Switching to a different model, such as claude-sonnet-4-20250514, may resolve the issue, as suggested in the error message.
  • The user may want to try to isolate the specific code or characters that are triggering the error and test them separately to see if they can reproduce the issue.
  • It's also worth noting that the user has mentioned that this worked in a previous version (4.7), so it's possible that this is a regression issue.

Example

No specific code example is provided, but the user has included a link to the file they were working on: https://github.com/zowe/zowe-common-c/blob/v3.x/staging/c/recovery.c.

Notes

The issue is specific to the Opus model and the user is using version 2.1.119 of Claude Code. The user has already submitted a bug report to [email protected] and has a conversation ID of 215474044213289.

Recommendation

Apply workaround: try switching to a different model, such as claude-sonnet-4-20250514, as suggested in the error message, to see if it resolves the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] False-positive AUP block on z/OS HLASM development, Opus 4.7, mid-session regression [1 comments, 1 participants]