Skip to content

Send commands (clear, context) to running Claude process from phone app #35

@michal-franc

Description

@michal-franc

Summary

Add the ability to send control commands like clear and context to the running Claude process directly from the phone app. Currently, these commands can only be issued from the terminal — the app should expose them as well.

Motivation

When using Claude Watch hands-free or away from the terminal, there's no way to:

  • Clear the conversation history to start fresh
  • Check context window usage
  • Issue other slash commands that Claude supports

Having to switch to a terminal to manage the Claude session defeats the purpose of the mobile interface.

Proposed Solution

  • Add a command palette or action buttons in the phone app UI for common commands:
    • Clear — reset conversation context
    • Context — show current context usage / token stats
    • Other useful commands as needed
  • Server needs a new endpoint (or extend POST /api/message) to distinguish between regular messages and control commands
  • The command results should be displayed in the chat or as a notification/toast

Implementation Notes

  • claude_wrapper.py manages the persistent Claude process — commands need to be routed through it
  • Could use a dedicated POST /api/command endpoint or a prefix convention (e.g., /clear, /context)
  • The WebSocket usage event already provides context stats — context command could trigger a fresh emit

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions