Skip to content

Support cross-environment thread discovery and messaging #79

Description

@lastobelus

Problem

PR #52 added first-class Codex thread inspection, send, and wait commands within one LastCode environment. A Codex thread running in one environment still cannot discover or address a thread owned by another environment.

The generic use case is a deployment where GUI/controller nodes and server nodes own different LastCode environments. An agent in one environment should be able to find, inspect, message, and wait for a thread in another environment without ad hoc SSH or direct remote SQLite inspection.

Desired outcome

  • Discover configured LastCode environments and their reachable threads.
  • Resolve a thread by explicit environment plus thread ID, with a convenient unambiguous lookup path for user-directed queries.
  • Support the existing read, send, and wait operations across environments.
  • Reuse authenticated LastCode environment transport and scoped credentials rather than reading a remote database directly.
  • Preserve environment identity in command output so local and remote results cannot be confused.
  • Keep the design appropriate for small deployments with usually fewer than ten concurrent threads.

Example user-directed flows:

  • What is THREAD_ID up to?
  • Ask THREAD_ID some question.
  • Tell THREAD_ID to do something.
  • Do this, and when finished tell THREAD_ID to do that.

Scope constraints

  • Tracking only; do not implement yet.
  • Optimize for a small explicitly configured set of GUI/controller and server environments, not a general fleet or multi-tenant message bus.
  • User-initiated workflows are sufficient initially; autonomous agent-created workflow graphs can wait.
  • Avoid broad retry, reconciliation, or routing machinery unless a concrete failure requires it.
  • MCP may expose the capability, but should not force an unnecessary bridge if LastCode can directly serve the same authenticated environment operations.

Design questions for later

  • Should remote environment discovery come from configured LastCode connections, MCP configuration, or a small explicit environment registry?
  • Should the CLI extend lastcode-thread with an environment selector, or add a separate environment-aware entry point?
  • Can existing remote-link authentication issue the same read and operate scopes used by PR feat(lastcode): add Codex thread tools #52?
  • What is the smallest addressing syntax that remains unambiguous when thread IDs or prefixes overlap across environments?

Dependency

Build on the local-environment primitives merged in PR #52. This issue intentionally defers implementation until we choose the transport and addressing model.

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions