[MODEL] Spurious Edit tool calls with constant arguments emitted twice in same session (Opus 4.7)
Preflight Checklist
- [x] I have searched existing issues for similar behavior reports
- [x] This report does NOT contain sensitive information (API keys, passwords, etc.)
Type of Behavior Issue
Other unexpected behavior
What You Asked Claude to Do
Nothing related to this path. The unsolicited tool calls happened mid-task while Claude was performing legitimate edits on a different codebase. The path /home/ishigetani/cli-temp/dist/cli-native.js was never mentioned by me, never existed in the project, and never appeared in any CLAUDE.md or session context.
What Claude Actually Did
Within a single long-lived session, Claude emitted two unsolicited Edit tool calls with completely identical (constant) arguments targeting a path that does not exist on the filesystem and was never referenced anywhere in the session.
Tool call (verbatim, both occurrences):
{
"name": "Edit",
"input": {
"replace_all": false,
"file_path": "/home/ishigetani/cli-temp/dist/cli-native.js",
"old_string": "test",
"new_string": "test2"
}
}
- First occurrence: 2026-04-28T01:23:04.956Z (request_id: req_011CaVJ2Xh6a6PHPQ6gfLVaT)
- Second occurrence: 2026-04-28T06:35:48.177Z (request_id: req_011CaVhsihvkCmgsRugVX5Ye)
- Interval: ~5h 12m 43s, same session
- Both occurrences happened immediately after a TodoWrite update
- Both calls failed immediately ("File does not exist") with no side effect
The constancy of the arguments (test → test2) suggests a degenerate generation pattern rather than reasoning.
Expected Behavior
Tool invocations should be grounded in:
- user input
- project context (existing files, referenced paths)
- or the assistant's explicit prior reasoning
The assistant should not emit tool calls with constant placeholder-like arguments to paths it has no basis to reference.
Files Affected
None — both calls targeted a non-existent path and failed immediately with no side effect.
Target path (does not exist): /home/ishigetani/cli-temp/dist/cli-native.js
Note: The username prefix /home/ishigetani/ matches the session's working directory (/home/ishigetani/Docker/local-japanex-docker), so this part is plausibly derived from environment context (cwd / shell prompt). However, the cli-temp/dist/cli-native.js suffix has no source in user input, project files, CLAUDE.md, or session transcript.
Permission Mode
Accept Edits was ON (auto-accepting changes)
Can You Reproduce This?
Sometimes (intermittent)
Steps to Reproduce
Not deterministically reproducible. Both occurrences happened during normal editing workflow within a single long-lived session, immediately after a TodoWrite update. No specific user input or project context preceded either call.
Claude Model
Opus
Relevant Conversation
[The exact tool call JSON is shown in "What Claude Actually Did" above. There was no preceding text response or reasoning shown to the user — the unsolicited Edit call appeared in the middle of legitimate work.]
Impact
Low - Minor inconvenience
Claude Code Version
2.1.120
Platform
Anthropic API
Additional Context
- Tool use IDs and session ID available on request if helpful for tracing.
- The pattern (constant args "test" → "test2", non-existent path, occurring twice with identical content) suggests this is not a one-off sampling artifact but a degenerate generation mode worth investigating at the model/serving layer.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗