From 7a00e8bfdb76a20dff30f238b57ce924054a8f4c Mon Sep 17 00:00:00 2001 From: Cody De Arkland Date: Tue, 12 May 2026 08:43:32 -0700 Subject: [PATCH] docs(cli): document railway agent --list and resume-with-history Why: 4.57.5 ships a --list flag and replays prior messages when resuming via --thread-id; the CLI docs only described the original single-prompt and interactive flows. Co-Authored-By: Claude Opus 4.7 (1M context) --- content/docs/cli.md | 2 ++ content/docs/cli/agent.md | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/content/docs/cli.md b/content/docs/cli.md index 8332eb901..e638681ce 100644 --- a/content/docs/cli.md +++ b/content/docs/cli.md @@ -223,6 +223,8 @@ railway functions push # Push function changes ```bash railway agent # Chat with the Railway Agent railway agent -p "..." # Send a single prompt +railway agent --list # List previous agent threads +railway agent --thread-id # Resume a previous thread railway setup agent # Configure Railway agent tooling railway mcp install # Configure MCP for AI coding tools railway skills install # Install Railway agent skills diff --git a/content/docs/cli/agent.md b/content/docs/cli/agent.md index f1cbf06f4..87ff9d3d4 100644 --- a/content/docs/cli/agent.md +++ b/content/docs/cli/agent.md @@ -17,7 +17,8 @@ railway agent [OPTIONS] |------|-------------| | `-p, --prompt ` | Send a single prompt (omit for interactive mode) | | `--json` | Output response as JSON | -| `--thread-id ` | Continue an existing chat thread | +| `--list` | List existing agent threads for the current environment | +| `--thread-id ` | Continue an existing chat thread (replays recent history) | | `-s, --service ` | Service to scope the conversation to (name or ID) | | `-e, --environment ` | Environment to use (defaults to linked environment) | @@ -77,12 +78,22 @@ railway agent -p "what environment variables are set on my project?" railway agent -p "list my services and their status" --json ``` +### List previous conversations + +```bash +railway agent --list +``` + +Returns the agent threads tied to the current environment, with their thread IDs, titles, and last-updated timestamps. Add `--json` for a machine-readable list. + ### Continue a previous conversation ```bash railway agent --thread-id ``` +When you resume a thread, the agent replays the recent message history before dropping you into interactive mode, so you can pick up where you left off. Pair with `--list` to find the thread ID you want. + ## Interactive mode When run without `-p`, the agent starts an interactive session where you can have a back-and-forth conversation: