Summary
GitLab Duo workflow edit-writing flows can fail with unterminated string errors when tool arguments are wrapped in fenced JSON or surrounding prose instead of being emitted as a strict JSON object.
Reproduction
- Use a GitLab workflow-backed model in opencode.
- Trigger an edit-writing flow that emits a tool call with multiline arguments.
- Observe the tool execution path fail before the tool runs when the arguments are wrapped or malformed.
Expected
The workflow tool executor should tolerate common wrapper formats around object-shaped JSON tool args, while still rejecting malformed inputs cleanly.
Actual
The executor calls JSON.parse directly on the raw args string, which surfaces parser failures like unterminated string during edit-writing flows.
Summary
GitLab Duo workflow edit-writing flows can fail with unterminated string errors when tool arguments are wrapped in fenced JSON or surrounding prose instead of being emitted as a strict JSON object.
Reproduction
Expected
The workflow tool executor should tolerate common wrapper formats around object-shaped JSON tool args, while still rejecting malformed inputs cleanly.
Actual
The executor calls JSON.parse directly on the raw args string, which surfaces parser failures like unterminated string during edit-writing flows.