Skip to content

feat(cloud-agent): new worker for new kilo cli based on focus-week branch#14

Merged
pandemicsyn merged 3 commits intomainfrom
florian/feat/add-cloud-agent-next
Feb 4, 2026
Merged

feat(cloud-agent): new worker for new kilo cli based on focus-week branch#14
pandemicsyn merged 3 commits intomainfrom
florian/feat/add-cloud-agent-next

Conversation

@pandemicsyn
Copy link
Copy Markdown
Contributor

@pandemicsyn pandemicsyn commented Feb 4, 2026

This is the same as the https://github.com/Kilo-Org/kilocode-backend/tree/kilo branch we've been hacking on since focus-week, just with the cloud-agent v2 routes changes broken out into a new dedicated worker cloud-agent-next.

The only difference is that this does also have the userId encoding fix that landed in main today yesterday, and that this worker has none of the legacy routes.

https://www.loom.com/share/9ee9ace2883f4dc9ae8266e3c3d339e8

@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented Feb 4, 2026

Code Review Summary

Status: 1 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
cloud-agent-next/wrapper/src/utils.ts 25 Unquoted workspacePath interpolated into sh -c command (potential injection / path breakage); and exec() resolves on non-zero exit so catch won’t run for command failures
Files Reviewed (2 files)
  • cloud-agent-next/wrapper/src/utils.ts - 1 issue
  • cloud-agent-next/src/auth.ts - 0 new issues (existing inline comments cover runtime validation + ticket expiry)

Fix these issues in Kilo Cloud

@pandemicsyn pandemicsyn requested a review from eshurakov February 4, 2026 14:33
Comment thread cloud-agent-next/src/index.ts
Comment thread cloud-agent-next/src/auth.ts
Comment thread cloud-agent-next/src/auth.ts
Comment thread .github/workflows/deploy-cloud-agent-next.yml
@pandemicsyn
Copy link
Copy Markdown
Contributor Author

Same caveat about kilo review items as on the original PR. They're valid, but trying to avoid introducing new changes in this pr since this pr is mostly existing code. I can idle a cloud agent to fix items kilo review flagged after this lands.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is probably the most important bit of this whole PR and the only thing that really warrants close 👁️ by reviewers.

Big thing to look out for is accidental references to the same resources as the original cloud-agent worker.

name is unique/new
dev.port is unique across the repo
workers using a new subdomain
callback queue is a new one

"preview_urls": false,
"workers_dev": true,
"dev": {
"port": 8794,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

i actually found an issue in the current repo: "port": 8792 exists in 2 wrangler.jsonc files.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

But this is using 8794 ?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

i mean its not a problem for this PR. I just found this as an existing issue.

"containers": [
{
"class_name": "Sandbox",
"image": "./Dockerfile.dev",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

maybe this is too nitpicky but these dockerfile names can be confusing.

Dockerfile => old CLI
Dockerfile.next => new CLI

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

else then it should be more obvious between the wrangler.jsonc of cloud-agent in the KILOCODE_CLI_VERSION should be the old version and in here the next (as it is done)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Theres no distinction between old and new cli in this worker. Its only new cli.

Copy link
Copy Markdown

@dagadbm dagadbm left a comment

Choose a reason for hiding this comment

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

i left some non blocking comments in wrangler.jsonc file.
I approved to not block but I dont have enough context to decide if there are other things that should be looked at more carefully.

@pandemicsyn pandemicsyn merged commit 5a6a962 into main Feb 4, 2026
10 checks passed
@pandemicsyn pandemicsyn deleted the florian/feat/add-cloud-agent-next branch February 4, 2026 17:55

export async function getCurrentBranch(workspacePath: string): Promise<string> {
try {
const result = await exec(`cd ${workspacePath} && git branch --show-current`);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

WARNING: Potential shell injection / path breakage via unquoted workspacePath

exec() runs via sh -c, and this line interpolates workspacePath without quoting/escaping. If workspacePath can be influenced (or even just contains spaces), the command can break or allow arbitrary shell execution. Also note exec() resolves on non-zero exit, so failures won’t hit the catch here.

Consider avoiding sh -c entirely and running git with spawn(..., { cwd: workspacePath }), or at minimum properly quote/escape and check exitCode.

jrf0110 added a commit that referenced this pull request Apr 22, 2026
Executed via three sub-agent runs:

1. Browse (Flow 2) — sub-agent verified browse-direct matches upstream count
2. Full lifecycle (Flows 3, 4, 6, 7) — sub-agent verified post -> claim -> done
   -> accept on item w-870be07fbc through PRs #8-11. Stamp s-35e8a923...
   issued with author=jrf0110, subject=jfawcett.
3. Branches (Flows 5, 8, 9) — sub-agent verified unclaim (item
   w-68aa4ab1dd, PR #14), reject (w-d2cf6acf6a, PR #18), and close
   (w-89e6720ca4, PR #22) on fresh items.

Only Flow 10 (disconnect) remains — it is a pure gastown operation and
doesn't touch upstream DoltHub state, so lower priority.

Total: 19 PRs merged, 4 rigs in play (jfawcett contributor, jrf0110
maintainer), full lifecycle graph exercised.
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.

2 participants