-
Notifications
You must be signed in to change notification settings - Fork 123
Open
Labels
Description
Problem
Amp stores threads entirely server-side on Sourcegraph's infrastructure. Resume uses amp threads continue [threadId], which is a subcommand rather than a flag. The module currently creates a new thread on every startup by piping the prompt via echo "$PROMPT" | amp. There is no mechanism to capture or reuse a thread ID across restarts.
--type amp is already present. No --type change needed.
Desired outcome
- On cold start: Amp starts a new thread. The thread ID is captured and persisted.
- On warm start: Amp continues the prior thread via
amp threads continue <threadId>. The prompt delivery mechanism changes entirely (from stdin pipe to subcommand). - After feat(coder/modules/agentapi): add state persistence #736 lands:
enable_state_persistence = true.
Investigation needed first
Test these approaches for capturing the thread ID:
- Check if Amp sets an
AMP_THREAD_IDenvironment variable. - Parse
--stream-jsonoutput for a thread/session identifier. - Use
amp threads listafter the first run. Check if it supports machine-readable output.
Also verify:
- What happens with
amp threads continue <invalidId>? - Does
amp threads continuework reliably in headless mode via agentapi?
Thread resume requires network connectivity to Sourcegraph servers. Air-gapped environments cannot use it.
Version bump
minor
Reactions are currently unavailable