Conversations, Traces, and Saved Queries
Continue a conversation, inspect a trace of exactly what ran, and save intents you use often.
Longer agent sessions leave a trail you can resume and audit. The CLI stores conversations, execution traces, and optional named queries on disk under ~/.postsale/.
In this article, we will list and continue conversations, inspect and export traces, and save and re-run named intents.
Before We Begin
This article assumes that:
- You have run
postsale runat least once if you want sample conversation or trace data
Conversations
Here's how:
postsale conversations
postsale conversations -n 20 --human
postsale run --continue "follow-up question"
postsale run --continue <id> "..."
postsale continue <id>Default directory: ~/.postsale/conversations/ (POSTSALE_CONVERSATIONS_DIR to override).
For a longer back-and-forth in one sitting, postsale run --interactive keeps the session open: after each envelope, the CLI prompts on stdin for your next message until you exit. postsale continue <id> reopens a stored conversation the same way.
continue supports the same authorization and model flags as run. Check postsale continue --help.
When to continue vs start fresh
| Situation | Prefer |
|---|---|
| Follow-up on the same orders or partial ship | --continue / postsale continue |
| New unrelated task | New postsale run (cleaner context) |
| Money still needed | Pass --yes or --authorize again; history does not grant spend |
| Confused model after many errors | Start fresh |
Traces
Here's how:
postsale traces list
postsale traces show <id-or-prefix>
postsale traces export <id>
postsale traces purge --yesAgent tool: query_trace.
Every trace records which credential ran it as identity: { kind, id }: kind is session or api_key, and id is the session's subject or the key's 8-character display id. postsale traces export <id> --format markdown renders it as a Credential line.
| Variable | Effect |
|---|---|
POSTSALE_TRACE_DISABLED=1 | Do not write traces |
POSTSALE_TRACE_FULL=1 | Full bodies and unredacted sensitive outputs |
POSTSALE_TRACE_DIR | Storage location |
POSTSALE_TRACE_ID | Correlation id |
Warning
POSTSALE_TRACE_FULL=1 can write credentials to disk. Use only when you accept that risk.
Saved queries, stored on this machine
These are local named intents, not server-side Postsale filters (postsale filters).
Here's how:
postsale saved-queries save weekly "how many orders last week"
postsale saved-queries list
postsale saved-queries run weekly
postsale saved-queries delete weekly --yesAlias: postsale sq. Money-moving still requires --yes or --authorize on run.
Good to Know
| Symptom | Likely cause | What to do |
|---|---|---|
| Unknown continue id | Stale or mistyped id | Run postsale conversations and retry; expect empty stdout with a stderr error |
| Huge traces | TRACE_FULL | Disable; purge carefully |
| saved-queries run blocked | Money tools | Pass authorization flags |
Additional Reading
On this page
Related