Skip to content

[Feature] Agent-callable tools to start a new session and to send a prompt to another session #275

Closed

Description

@kojilab-dev

Version: @kahme247/ompweb 0.5.1 (omp 18.12.3).

Summary

I would like an agent running inside ompweb to be able to (1) start a new ompweb session and (2) send a prompt to another existing session by its session ID, without a person doing either step in the browser.

omp itself covers only part of this. Its task tool starts subagents, and write agent://<id> messages them, but both work only inside the same omp process. An agent cannot reach a separate top-level session that ompweb runs. ompweb already starts and keeps several omp RPC processes, so it seems to be the right place to connect them.

Use cases

  • A coordinating session splits a large job and starts one new session per part, each in its own project directory, so that each part has its own history the user can open in the sidebar later.
  • A session finishes a step and hands the next step to a session that already holds the needed context (for example, "the build passed, continue the release checklist" sent to the release session).
  • A session asks another session a question and uses the answer.

Proposed tools

  1. new_session
    • Input: cwd (project directory, optional, defaults to the caller's), prompt (first message), model (optional), name (optional).
    • Result: the new session ID, and the session appears in the ompweb sidebar like any other session.
  2. send_to_session
    • Input: sessionId, message, delivery: prompt | steer | followUp (how to deliver it while the target is running), and wait (boolean).
    • Result: with wait: false, an acknowledgement as soon as the target accepts the message. With wait: true, the target's final assistant response for that turn (based on prompt_result / session_settled), with a timeout.
    • If the target session is not running, ompweb resumes it first, as it does when a user opens it.

A list_sessions tool (ID, name, cwd, running or idle) would make send_to_session usable without the user copying IDs, but the two tools above are the core of the request.

Implementation notes

The existing host-tool bridge (set_host_tools / host_tool_call / host_tool_result in lib/rpc-manager.ts) routes a call to an attached browser and rejects it when no browser is attached. These two tools would be more useful if the ompweb server answered them itself, so they keep working while no tab is open (for example, when a long run started from a phone continues after the phone is locked).

Safety

  • Off by default, enabled in Settings.
  • The target session's transcript should show which session sent each message, so the user can see where a prompt came from.
  • A limit against loops (for example, a maximum chain depth or a rate limit per session), because two sessions could keep messaging each other.
  • Optionally, a limit to projects the user allows.

Thank you for ompweb. I use it every day.

Activity

  1. kahme247 commented on Oct 23, 2026

    @kahme247
    Collaborator

    This is not a simple future to ask.. @andrebrait what do you think ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions