Skip to content

Comments

fix: multiline for yaml on share#1797

Open
abaez-pantheon wants to merge 1 commit intodocker:mainfrom
abaez-pantheon:push-wplxyovnsywy
Open

fix: multiline for yaml on share#1797
abaez-pantheon wants to merge 1 commit intodocker:mainfrom
abaez-pantheon:push-wplxyovnsywy

Conversation

@abaez-pantheon
Copy link
Contributor

@abaez-pantheon abaez-pantheon commented Feb 19, 2026

The following patch fixes a bug discovered on yaml marshaling when handling multiline input. Essentially, when pushing to an OCI artifact to an OCI complaint registry, the yaml for multiline indentation is removed. Causing issues with marshaling the yaml for usage.

Tested the change by working locally and sharing to an OCI registry for comparison.

@abaez-pantheon abaez-pantheon requested a review from a team as a code owner February 19, 2026 18:21
@dgageot
Copy link
Member

dgageot commented Feb 20, 2026

@abaez-pantheon do you have an example of case where the current code fails?

@abaez-pantheon
Copy link
Contributor Author

abaez-pantheon commented Feb 20, 2026

@dgageot I do! Sorry for not referencing prior. 😅

So when doing a cagent share push ./some.yaml <oci-ref>, the pull and run commands return the following:

version: "5"
agents:
  root:
    name: root
    model: pro-high
    description: Designs the software changes. Analyzes the user's request, understands the existing codebase, and creates a plan for the developer to implement. Uses the researcher to gather any necessary information.
    toolsets:
    - type: think
      remote:
        url: ""
      api_config: {}
    - type: filesystem
      remote:
        url: ""
      api_config: {}
    instruction: |
    You are an architect agent responsible for gathering user requirements and creating a development plan.

Notice the instruction multiline pipe string. The indention is lost and so an error on yaml parsing returns as if the line is not a string but a key with.

And on execution:

❯ cagent run $SOME_OCI_REF
looking for version in config file
[27:5] non-map value is specified
  24 |       path: .memory/mem_root.db
  25 |       api_config: {}
  26 |     instruction: |
> 27 |     You are an architect agent responsible for gathering user requirements and creating a development plan.
           ^

@abaez-pantheon abaez-pantheon force-pushed the push-wplxyovnsywy branch 3 times, most recently from 9581074 to b511f04 Compare February 21, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants