Skip to content

fix unterminated string errors in workflow edit tool args #20757

Closed as not planned

Description

@sudorest

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

  1. Use a GitLab workflow-backed model in opencode.
  2. Trigger an edit-writing flow that emits a tool call with multiline arguments.
  3. 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.

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 2, 2026
  2. github-actions commented on Apr 2, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If your issue is distinct (specifically about GitLab Duo workflow wrapping args in fenced JSON/prose), please clarify the difference in a comment.

  3. removed
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  4. github-actions commented on Jul 3, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions