#6675·deepagents

Support thread resume in non-interactive mode

Author: open-swe[bot]Created Sep 30, 2026Updated Sep 30, 2026
Labelsorg:internalpackage:dcodepriority:triage

Feature request

Support resuming an existing conversation with dcode -r <thread-id> -n "..." -q, so scripts can send successive messages to the same thread without launching the interactive UI.

Current behavior

The non-interactive path does not forward the resume argument and generates a new thread ID for each invocation. Combining -r with -n silently starts a new conversation instead of continuing the requested thread. Quiet mode only affects output.

Expected behavior

When an explicit thread ID is supplied with -r and -n, load its persisted conversation state and append the new message to that same thread. Report a clear error if the requested thread cannot be resumed rather than silently creating a new one. Preserve the existing new-thread behavior when -r is omitted.

Motivation

Reported by @darieldatoon while testing headless, non-interactive scripting. Repeated invocations need to retain conversation context. The specific scripting workflow has not yet been provided.

Implementation context

Verified against upstream commit a4046e25511c6626aa14b095b034428abc786a0f: the non-interactive dispatch in main.py does not pass resume intent to run_non_interactive, and client/non_interactive.py unconditionally calls generate_thread_id().

Requested by @mdrxy.