Skip to content

Feature request: compact JSON result for non-interactive print mode #12

Description

@arjitj2

Request

Please add a compact machine-readable output mode for non-interactive Devin, for example devin --print --output-format json. The flag name is a proposal, not an existing option. A final result object would solve the immediate need; an optional NDJSON event mode would also be useful for progress.

Current gap

With Devin CLI 3000.11.3 (9c803229faa4), installed help and the command reference offer plain --print, after-turn ATIF --export, and the bidirectional devin acp server. I found no documented compact structured result mode for print.

Open Pstack launches one assigned worker task and needs its final answer and a reliable terminal outcome. We currently export the conversation to a private temporary file, inspect its final agent step, then remove the export. Plain text can include intermediate narration, so nonempty stdout alone cannot prove completion. Exporting the conversation adds transcript handling and cleanup obligations. Implementing ACP requires session management and permission/cancellation round trips for a client that otherwise only needs one result.

Comparable CLI interfaces

These examples show the desired level of integration, not interchangeable schemas or identical guarantees:

CLI Existing interface Relevant behavior
Cursor cursor-agent --print --output-format json One success result with answer, status, duration and session ID. Its failure path remains stderr plus nonzero exit. Docs.
Claude Code claude -p --output-format json, or --output-format stream-json --verbose Explicit choice between a JSON result and an event stream. CLI reference.
Antigravity agy -p "Reply with OK" --output-format json Final envelope with response, terminal status, conversation ID and token usage. Also supports stream-json. Docs.
Codex codex exec --json JSONL distinguishes message items from turn completion and failure, so consumers can wait for a terminal event. Official event definitions.

Desired contract

  • Emit the final answer and a documented terminal status/reason, without exporting prompts, reasoning, tool arguments/results or the full conversation.
  • Distinguish a completed response from denied permissions, refusal, interrupted/incomplete execution and provider failure. A completed answer saying project tests failed is still a completed model turn.
  • Include a session ID, elapsed time, and available usage/cost with documented scope. Missing accounting should remain absent or null, not fabricated zero.
  • Include structured error codes where known and document how they relate to process exit codes. Handleable failures should ideally emit an error envelope; crashes or forced termination may prevent one.
  • Keep requested/resolved model selection separate from any provider-reported response model. If the latter is unavailable, say so. Usage-accounting keys should not be presented as proof of the answering model.
  • Document cancellation and partial-output behavior. An optional stream should end with a terminal result when possible; progress events must not imply completion.
  • Keep permissions, model selection and authentication behavior unchanged by the output-format option. Preserve existing print and export modes.

Acceptance examples

A successful no-tool prompt yields one parseable terminal object and its final answer. A denied tool or incomplete run yields an explicit non-success outcome rather than an indistinguishable text prefix. Consumers can operate without an ATIF export or an ACP client. Result mode excludes intermediate transcript content. If event mode is added, its final result agrees with result mode for the same outcome.

This is a feature request for the CLI output contract, not a request to alter model behavior, bypass permissions, or add automatic retries. No private transcripts are attached.

Activity

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

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