Skip to content

Bug: Remote input can drop partial JSONL records written without a trailing newline #6316

Description

@VectorPeak

Remote input watches a JSONL file that can be written by another process. When the writer appends a record in multiple writes, the file can temporarily end with an incomplete JSON object that has not been terminated by \n yet.

A minimal example is:

{"type":"submit","text":"spl

followed later by:

it"}

The expected behavior is that the watcher waits until the newline-delimited record is complete, then processes the submit command once the remaining bytes and trailing newline arrive.

The observed behavior is that the trailing partial record can be parsed as a malformed line and the read offset advances past it. When the writer later appends the rest of the JSONL record, the watcher starts from the already-advanced offset and can no longer reconstruct the full command, so the submission or confirmation response is dropped.

This is adjacent to truncate/rewrite offset handling, but it is a separate append-mode record-boundary bug: an unterminated trailing JSONL record should remain pending, while complete malformed lines should still be skipped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    category/cliCommand line interface and interactioncategory/coreCore engine and logicpriority/P2Medium - Moderately impactful, noticeable problemscope/file-operationsFile system operationsstatus/needs-triageIssue needs to be triaged and labeledtype/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions