Skip to content

inline content payloads fail with "local path does not exist" #84

Description

@RoddieKieley

In attempting to write come content into opencode.json via payloads.content it first failed with 'local path does not exist' until a little investigation with Cursor and Opus 4.6 revealed a minor issue:

ResolvePayloads wrote inline content: temp files into payloadDir, which createSandbox then renamed to a staging directory. The rename invalidated the temp file paths stored in extraUploads, causing every retry to fail with the same stale path.

Use a separate temp directory for inline content payloads so their paths survive the payloadDir rename.

Fix with test available at fix/resolve-payloads-rename.

Full disclosure, I haven't exhaustively looked a the implications of the fix outside of having a test written and ensuring the before was broken and the after was fixed along with actually solving my problem which was to connect to a local llama.cpp inference endpoint.

Metadata

Metadata

Assignees

No one assigned

    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