-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Checklist
- I searched existing issues and this hasn't been reported
Area
Backend
Operating System
Windows
Version
2.7.2
What happened?
Description
The GLM 4.7 model generated invalid JSON syntax in a json file when working on the planning stage, using {...} as placeholder object which is not valid JSON. This causes the system to fail validation and enter an infinite retry loop. Manual fixes are immediately overwritten by the AI regenerating the same invalid syntax.
Environment
-Auto Claude Version: Development build (open source)
-AI Model: z.ai GLM 4.7
-OS: Windows
-File: .auto-claude/specs/[task-id]/implementation_plan.json
Actual Behavior
-GLM 4.7 outputs {...} which is invalid JSON syntax
-JSON validation fails with parse error
-Auto Claude regenerates file with same error
-Manual fixes are immediately overwritten
-Workflow is completely blocked
Details
I'm not entirely sure, but I believe the AI was trying to transition from the planning stage to the code stage when the invalid JSON stopped the workflow, This is what I know for sure I did:
cloned and built the repo (already had node.js 24+, python 3.12+ and git)
-Setup GLM AI and switched to it (activated it in API profiles and could see that I wasn't in Oauth)
-Make a regular task, it referenced some files in my folder (pretty big project) and was a relatively lengthy explanation but without an implementation file or anything too long like that
-Ran the task on "Complex Tasks" agent profile, all steps use GLM 4.7
-Planning stage took almost 30 minutes, reached phase 7: IMPLEMENTATION PLANNING 2 times with messages like:
DO NOT proceed with implementation - this planning session is complete. The orchestrator will assign the next session to a coder agent.
But never left the planning stage
-AI made a mistake in a json file called implementation_plan.json:
"body": {"success": true, "appointment": {...}}
-Task continues to run and doesn't pause, but the logs tab shows an error in the execution, and scrolling all the way to the bottom of the logs shows the following error:
I tried stopping and resuming the task multiple times, moved it from Planning to In Progress back and forth, restarted and rebuilt the app multiple times, put it in Human Review and tried to tell it to proceed to the Code phase 2 times, and finally went into the JSON file and fixes the problem myself, replacing "body": {"success": true, "appointment": {...}} with "body": {"success": true, "appointment": {}} and tried saving multiple times, but the code was reset, with the following lines repeating in the logs:
[ProjectStore] Returning cached tasks for project: 0f1dafd6-dba1-43a2-adbd-d5e75c8aa772 (age: 16 ms)
[ProjectStore] Returning cached tasks for project: 0f1dafd6-dba1-43a2-adbd-d5e75c8aa772 (age: 17 ms)
[ProjectStore] getTasks called with projectId: 0f1dafd6-dba1-43a2-adbd-d5e75c8aa772 (cache expired)
[ProjectStore] Found project: project_name autoBuildPath: .auto-claude
[ProjectStore] Main specsDir: D:\path\to-root\.auto-claude\specs exists: true
[ProjectStore] Loaded 4 tasks from main project
[ProjectStore] Returning 4 unique tasks (after deduplication)
[ProjectStore] Returning cached tasks for project: 0f1dafd6-dba1-43a2-adbd-d5e75c8aa772 (age: 11 ms)
[ProjectStore] Returning cached tasks for project: 0f1dafd6-dba1-43a2-adbd-d5e75c8aa772 (age: 11 ms)
ETC
That is all I've tried so far with no luck, the task is still stuck, showing as running in the kanban board, but failed with the same error when checking the logs.
Steps to reproduce
Steps to Reproduce
-Build development version after cloning repo
-Setup GLM 4.7
-Make a task in "Complex Tasks" Agent Profile, maybe prompt the AI to purposefully write an incorrect JSON file and switch to code phase?
Expected behavior
Expected Behavior
-JSON should use valid empty object syntax: {}
-If placeholder needed, should be valid JSON: null or {}
-File should pass JSON validation
Logs / Screenshots
Metadata
Metadata
Assignees
Labels
Projects
Status