Repository navigation
Description
User Story
I work at Anaconda, which owns Kilo, the open-source coding agent CLI this proposal is about. I'd like Kilo to become one of the agents OpenShell supports, starting with the example profile proposed here. To write it, I ran Kilo in OpenShell myself and reviewed every connection the sandbox denied, and the findings below come from those runs.
Problem Statement
OpenShell ships example profiles for Claude Code, Codex, GitHub Copilot, Cursor and OpenCode, whose profile is openrouter.yaml, and none for Kilo. Kilo's default model service is the Kilo Gateway at ai-gateway.kilo.ai, with account lookups at api.kilo.ai, and no example profile covers either host, and nothing in the repository says which other hosts Kilo contacts or how Kilo's own sandbox behaves inside an OpenShell sandbox.
Impact / Why This Matters
Without an example, an operator writes a Kilo profile by trial and error from the denials OpenShell records, as I did to find the hosts below. Besides the two gateway hosts, two of them receive KILO_API_KEY when a policy allows them:
| Host | Kilo's use | Receives the key |
|---|---|---|
api.kilo.ai |
Kilo Gateway, account lookups | yes |
ai-gateway.kilo.ai |
Kilo Gateway, inference and model list | yes |
us.i.posthog.com |
CLI telemetry | no |
models.dev |
model catalog, Kilo falls back to a bundled copy | no |
ingest.kilosessions.ai |
cloud session upload | yes |
events.kiloapps.io |
presence service, seen in the stock image's interactive interface | yes |
The less obvious failure comes from Kilo's own sandbox. It uses bubblewrap, which cannot create its namespaces under OpenShell's seccomp filter. Kilo leaves it off by default, but when a project's kilo.jsonc turns it on, tool calls fail with bubblewrap errors, and kilo run still exited 0 in both of my runs, which recorded 100 and 82 of them while the test failed. In a script, the run looks successful.
Proposed Design
Operators would import and use providers/kilo.yaml like the existing example profiles:
openshell provider profile lint -f providers/kilo.yaml
openshell provider profile import -f providers/kilo.yaml --global
openshell provider create --name kilo --type kilo --from-existing
openshell sandbox create --provider kilo \
--from ghcr.io/kilo-org/kilocode:latest-openshell -- \
kilo run --model kilo/nvidia/nemotron-3.5-lightning:free 'reply with OK'The profile declares KILO_API_KEY as a bearer credential, allows api.kilo.ai, ai-gateway.kilo.ai and the telemetry host with L7 enforcement, and limits all three to /usr/local/bin/kilo, the path in the published images. Its header follows the standard block and adds what the problem statement describes: the hosts the profile leaves blocked, and the published ghcr.io/kilo-org/kilocode:latest-openshell image, which keeps Kilo's own sandbox off whatever a project says and stops Kilo from trying the blocked hosts. The header also says that the image's environment reaches the sandbox's main command only, and how to get the same behavior with another image through /etc/kilo/kilo.json and the Kilo settings. Following #3904 and #3906, the change adds the YAML file and its entry in the profile listing test, with no docs or telemetry change.
Acceptance Criteria
-
openshell provider profile lint -f providers/kilo.yamlpasses, and the file imports at platform scope. - The header's smoke test replies
OKwith the publishedghcr.io/kilo-org/kilocode:latest-openshellimage, and Kilo's model calls go through the profile's endpoints. - Inside the sandbox,
KILO_API_KEYholds an OpenShell placeholder, and no environment variable holds the real key. - The header names the Kilo hosts the profile leaves blocked and how to keep Kilo's own sandbox off and the published image that keeps it off.
- The tests that load the example profiles pass with the new file.
Alternatives Considered
- The existing
openrouterprofile. Kilo supports OpenRouter directly, so an operator can copyopenrouter.yamland changebinariesto/usr/local/bin/kilo. Such a copy serves OpenRouter users only. Kilo Gateway users still need a profile forapi.kilo.aiandai-gateway.kilo.ai, and the copy would say nothing about Kilo's other hosts or its sandbox. - A tutorial like Run Pi with OpenRouter. It would reach more readers, but Remove the inference provider table and provider profile telemetry buckets #3906 keeps contributed profiles to the YAML, so the operator notes go in the header. A tutorial can follow if maintainers want one.
- Middleware or an interceptor. The need is a credential bound to Kilo's endpoints and binary, which is what a provider profile does, so neither applies.
Agent Investigation
I used a coding agent to script and record the runs, and checked the results myself.
- Kilo 7.8.27 reads
KILO_API_KEYand sends it as a bearer token, and the published image installs the CLI at/usr/local/bin/kilo. With the profile attached, the sandbox seesopenshell:resolve:env:v<digits>_KILO_API_KEY, and no environment variable holds the real key. - In OpenShell 0.1.8, the seccomp filter returns
EPERMforunshareandclonewithCLONE_NEWUSER, returnsENOSYSforclone3, and blocksmount,pivot_root,umount2andsetns. With Kilo's sandbox on, two runs recorded 100 and 82 bubblewrap errors, the test failed in both, andkilo runexited 0 both times. - Kilo loads
/etc/kilo/kilo.jsonafter project configuration, so a project cannot override{"sandbox": {"enabled": false}}there. With that file in a derived image, Kilo completed the task with the project'skilo.jsoncturning its sandbox on. KILO_DISABLE_MODELS_FETCH=1,KILO_DISABLE_SESSION_INGEST=1,KILO_DISABLE_PRESENCE=1andKILO_TELEMETRY_LEVEL=offleft no denied connection in the sandbox log, and withKILO_DISABLE_PRESENCE=1the interactive interface made no presence attempt.
Checklist
- I've reviewed existing issues and the published docs
- This is a design proposal, not a "please build this" request
Activity
purp commentedon Nov 17, 2026
Assessment: technically valid and well evidenced; awaiting maintainer disposition.
What I checked:
main.providers/hasopenrouter.yaml,openai.yaml,copilot.yaml,cursor.yamland others, and no open or closed issue or PR covers Kilo. feat(providers): add a Vercel AI Gateway example profile (fx) #4440 (Vercel AI Gateway profile) is the same kind of request and is accepted, so there is precedent for single-YAML example profiles.openrouterprofile) are addressed, and the reasoning holds: the need is a credential bound to specific hosts and one binary, which is what a profile does.binaries: [/usr/local/bin/kilo], header with smoke test) matchesopenrouter.yamland the contribution rules inproviders/README.md.crates/openshell-sandbox/src/sandbox/linux/seccomp.rsblocksunshareandclonewithCLONE_NEWUSERand blocksclone3, so bubblewrap would fail inside a sandbox.Not verified:
ghcr.io/kilo-org/kilocode:latest-openshellimage, or the profile, so acceptance criteria 2 and 3 are unconfirmed.kilo runexiting 0 with failed tool calls is a Kilo behavior rather than anything OpenShell can change. It looks like the former, so the header note is the right place for it.Notes for the PR:
openshell provider create --type kilo --from-existingneeds the profile imported first, as the proposed commands order it.us.i.posthog.com) belongs in the allowed endpoints. The table says it does not receive the key, and the header should say why it is allowed while the other non-key hosts are blocked.Next human decision: a maintainer decides whether to mark this
state:accepted. I leftstate:triage-neededin place because thestate:validatedlabel has no description, so I could not confirm its meaning. Area/topic labels are deferred until acceptance.