Skip to content

Add "launch" subcommand to launch coding agents - #1307

Merged
jeremyfowers merged 10 commits into
lemonade-sdk:mainfrom
sawansri:launch
Mar 9, 2026
Merged

jeremyfowers merged 10 commits into
lemonade-sdk:mainfrom
sawansri:launch

Conversation

@sawansri

@sawansri sawansri commented Mar 5, 2026 •

Copy link
Copy Markdown
Collaborator

Implements lemonade-server launch for easy integration of lemonade with coding agents like Claude Code and Codex.

Review checklist

Clarity

  • Does the pr description and title explain the change fully?
  • Are UI/UX changes displayed with screenshots/videos/terminal blocks?

Completeness

  • Are changes documented in markdown and help menus (if appropriate)?
    • For example: cli.md, spec.md, dev-getting-started.md, lemonade-server --help
  • Do new endpoints have example requests/scripts so others can reproduce?

UI/UX review

Are the UI/UX changes (if any)...

  • visually cohesive with the rest of the experience?
  • a cohesive part of existing workflows, or do they introduce a new workflow (justify)?
  • discoverable by new users?
  • usable without documentation, or is new documentation needed (justify)?
  • tested on both Windows on Linux (if needed)?

Note: UI/UX includes installers, app, tray, and CLI.

Code quality

  • Is the change maintainable (does it introduce redundancy)?
  • Are there any security or licensing issues?

@superm1 superm1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General comment - I am wondering if we actually want a compatibility symlink for /usr/bin/lemonade and /usr/bin/lemonade-server and then in docs tell people to use lemonade instead.

Comment thread src/cpp/tray/tray_app.cpp Resolved
Comment thread src/cpp/tray/tray_app.cpp Resolved
Comment thread src/cpp/tray/tray_app.cpp Resolved
Comment thread src/cpp/server/cli_parser.cpp Resolved
@sawansri

sawansri commented Mar 5, 2026

Copy link
Copy Markdown
Collaborator Author

General comment - I am wondering if we actually want a compatibility symlink for /usr/bin/lemonade and /usr/bin/lemonade-server and then in docs tell people to use lemonade instead.

I think that makes sense. In my mind, launch is less of a "server" feature and fits better with the "lemonade" binary.

@sawansri

sawansri commented Mar 5, 2026

Copy link
Copy Markdown
Collaborator Author

Hey guys, something I want to get thoughts on is when the model should be loaded in llama-server. The current implementation loads the model asynchronously while the agent is launched (versus an earlier implementation when it was blocking agent startup). Is this a good approach?

@superm1

superm1 commented Mar 5, 2026

Copy link
Copy Markdown
Member

I guess what happens if the model load isn't done by the time the agent starts up? Race? Chaos? If so synchronous is the right way.

@sawansri

sawansri commented Mar 5, 2026 •

Copy link
Copy Markdown
Collaborator Author

I guess what happens if the model load isn't done by the time the agent starts up? Race? Chaos? If so synchronous is the right way.

Based on the testing I did, seems like the processing of the query is just delayed until the model is finished loading. Imo, async leads to a smoother experience since the user can potentially start typing out their prompt while the model is simultaneously loading in the backend.

@sawansri
sawansri marked this pull request as ready for review March 5, 2026 22:29
@superm1

superm1 commented Mar 5, 2026

Copy link
Copy Markdown
Member

I guess what happens if the model load isn't done by the time the agent starts up? Race? Chaos? If so synchronous is the right way.

Based on the testing I did, seems like the processing of the query is just delayed until the model is finished loading. Imo, async leads to a smoother experience since the user can potentially start typing out their prompt while the model is simultaneously loading in the backend.

Yeah I tend to agree with you from that description. People expect the first query is slow anyways.

@sawansri

sawansri commented Mar 6, 2026 •

Copy link
Copy Markdown
Collaborator Author

Failing test seems to be related to a missing windows import (processenv.h which is properly located in the header guards).
image

sawansri added 6 commits March 6, 2026 12:46
Signed-off-by: Sawan Srivastava <sawan1210@gmail.com>
Signed-off-by: Sawan Srivastava <sawan1210@gmail.com>
Signed-off-by: Sawan Srivastava <sawan1210@gmail.com>
Signed-off-by: Sawan Srivastava <sawan1210@gmail.com>
Signed-off-by: Sawan Srivastava <sawan1210@gmail.com>
… does

Signed-off-by: Sawan Srivastava <sawan1210@gmail.com>
@jeremyfowers

Copy link
Copy Markdown
Member

General comment - I am wondering if we actually want a compatibility symlink for /usr/bin/lemonade and /usr/bin/lemonade-server and then in docs tell people to use lemonade instead.

@bitgamma is looking into this!

@superm1

superm1 commented Mar 6, 2026

Copy link
Copy Markdown
Member

@jeremyfowers can you help figure out the Windows issue? If we can I'd like to see this in 10.0.0!

sawansri added 2 commits March 6, 2026 15:59
…uments, and --use-recipe flag to prioritize model recipe

Signed-off-by: Sawan Srivastava <sawan1210@gmail.com>
Signed-off-by: Sawan Srivastava <sawan1210@gmail.com>
Comment thread docs/server/lemonade-server-cli.md Resolved
The lemonade-server target defines UNICODE/_UNICODE, which causes
GetEnvironmentStringsA to be undefined (it's only a macro when UNICODE
is not set). Switch to explicit wide-string versions (GetEnvironmentStringsW/
FreeEnvironmentStringsW) with UTF-8 conversion via WideCharToMultiByte.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jeremyfowers

Copy link
Copy Markdown
Member

@claude review

@claude

claude Bot commented Mar 9, 2026

Copy link
Copy Markdown

Claude Code is working…

I'll analyze this and get back to you.

View job run

@jeremyfowers jeremyfowers left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

Works great for me! Agreed to two followups. Thanks @sawansri!

@jeremyfowers
jeremyfowers merged commit 3cf6e25 into lemonade-sdk:main Mar 9, 2026
38 checks passed
meghsat pushed a commit that referenced this pull request Jul 10, 2026
* basic launch implementation

Signed-off-by: Sawan Srivastava <sawan1210@gmail.com>

* added asynchronous loading of model when agent is launched

Signed-off-by: Sawan Srivastava <sawan1210@gmail.com>

* switch to LOG and use helper for host normalization

Signed-off-by: Sawan Srivastava <sawan1210@gmail.com>

* add some docs for launch subcommand

Signed-off-by: Sawan Srivastava <sawan1210@gmail.com>

* missing header file?

Signed-off-by: Sawan Srivastava <sawan1210@gmail.com>

* improve prompt caching by disabling system prompt changes claude code does

Signed-off-by: Sawan Srivastava <sawan1210@gmail.com>

* implements sensible llamacpp defaults, user configurable llamacpp arguments, and --use-recipe flag to prioritize model recipe

Signed-off-by: Sawan Srivastava <sawan1210@gmail.com>

* disable telemetry and other non-essential traffic

Signed-off-by: Sawan Srivastava <sawan1210@gmail.com>

* Fix UNICODE build error in process_manager for lemonade-server

The lemonade-server target defines UNICODE/_UNICODE, which causes
GetEnvironmentStringsA to be undefined (it's only a macro when UNICODE
is not set). Switch to explicit wide-string versions (GetEnvironmentStringsW/
FreeEnvironmentStringsW) with UTF-8 conversion via WideCharToMultiByte.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Signed-off-by: Sawan Srivastava <sawan1210@gmail.com>
Co-authored-by: Jeremy Fowers <80718789+jeremyfowers@users.noreply.github.com>
Co-authored-by: Jeremy Fowers <jeremy.fowers@amd.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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.

3 participants