Skip to content

feat: otto conversation list/get#54

Merged
lostmygithubaccount merged 1 commit intomainfrom
cody/ws-toolsconvos
Mar 25, 2026
Merged

feat: otto conversation list/get#54
lostmygithubaccount merged 1 commit intomainfrom
cody/ws-toolsconvos

Conversation

@lostmygithubaccount
Copy link
Copy Markdown
Contributor

@lostmygithubaccount lostmygithubaccount commented Mar 25, 2026

Closes #53
Depends on https://github.com/ascend-io/ascend-backend/pull/1355

Problem

There was no way to list or retrieve Otto conversations programmatically. The CLI, SDKs, MCP server, and TUI all lacked conversation management, and the --thread flag required knowing raw thread IDs.

Summary

Adds otto conversation list/get commands and conversation support across all interfaces, using the public /api/v1/otto/threads endpoints.

CLI examples

$ ascend-tools otto conversation list
TITLE                                     ID                                    UPDATED
Greeting                                  019d25a3-d201-7673-ae58-7bff03aa1909  2026-03-25T15:36:29.743640
Determining current instance environment  019d0df2-f22a-7742-9a5a-a204b0c044a2  2026-03-21T01:12:10.505991
Recap of Recent Conversation              019d0cc0-ca9d-7f90-9d45-9c4c7134daec  2026-03-21T00:44:42.680626
Password recall test                      019d0cbf-1294-7811-b387-ae30e564b4d6  2026-03-20T19:35:53.607284
First Conversation                        019d0cbc-1300-7fb2-9c06-3a7216580548  2026-03-20T19:32:48.640461
Greeting                                  019d0cad-3f6f-7ca3-a3ae-6f58558e63e8  2026-03-20T19:32:14.521809
Showing 6/6 conversations
$ ascend-tools -o json otto conversation list --limit 3
{
  "threads": [
    { "id": "019d25a3-...", "title": "Greeting", "updated_at": "2026-03-25T15:36:29.743640" },
    { "id": "019d0df2-...", "title": "Determining current instance environment", "updated_at": "2026-03-21T01:12:10.505991" },
    ...
  ],
  "total": 7
}
$ ascend-tools otto conversation get "First Conversation"
ID:       019d0cbc-1300-7fb2-9c06-3a7216580548
Title:    First Conversation
Updated:  2026-03-20T19:32:48.640461Z
Tokens:   14565

user> hey wassup hello

assistant> Hey! 👋 I'm here to help you with your Ascend projects. What would you like to work on today?

user> what have we discussed so far?

assistant> We haven't discussed anything substantial yet! ...
$ ascend-tools otto conversation get "Greeting"  # ambiguous title (non-interactive)
Error: multiple conversations match 'Greeting', use --id to disambiguate

Key Changes

  • CLI: otto conversation list (paginated), otto conversation get (by title with interactive picker on ambiguity, or by ID with --id), --conversation/--resume flags on otto run and otto tui
  • Core SDK: list_conversations() with offset/limit/title filters, get_conversation(), resolve_conversation_id() using server-side title filter instead of client-side 200-thread scan, skip_serializing_if on messages/context_window_stats for clean list JSON
  • Python SDK: list_conversations(limit=N), get_conversation(title=..., id=...)
  • JavaScript SDK: listConversations(), getConversation()
  • MCP: list_conversations, get_conversation tools; conversation param on otto tool
  • TUI: --conversation/--resume flags load thread history in background; stop_pending changed from bool to Option<u64> for correct generation tracking during cancellation

🤖 Generated with Claude Code

Adds conversation management commands that go through the public
/api/v1/otto/threads endpoints.

CLI:
- `otto conversation list` with --limit/--offset pagination
- `otto conversation get <TITLE>` with interactive picker on ambiguity
- `otto conversation get <ID> --id` for direct ID lookup
- `--conversation` and `--resume` flags on `otto run` and `otto tui`

Core SDK:
- list_conversations() with offset/limit/title filters
- get_conversation(), get_conversation_by_title(), resolve_conversation_id()
- Server-side title filter (no more client-side 200-thread scan)
- skip_serializing_if on messages/context_window_stats (clean list JSON)

Bindings:
- Python: list_conversations()/get_conversation() with keyword-only args
- JavaScript: listConversations()/getConversation() returning Promises
- MCP: list_conversations/get_conversation tools
- All otto/otto_streaming methods accept conversation param

TUI:
- --conversation/--resume flags load history in background
- conversation_to_messages() converts thread messages to TUI Messages
- stop_pending changed from bool to Option<u64> for correct generation tracking

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@lostmygithubaccount
Copy link
Copy Markdown
Contributor Author

merging...shouldn't release until backend PR is in production

@lostmygithubaccount lostmygithubaccount merged commit 98a3a02 into main Mar 25, 2026
1 check passed
@lostmygithubaccount lostmygithubaccount deleted the cody/ws-toolsconvos branch March 25, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

programmatic conversations

1 participant