What the CLI keeps on disk
The Orka CLI keeps its state in two files under$HOME:
~/.config/configstore/orka-cli.jsonholds the Orka API URL, set byorka config set --api-url.~/.kube/configholds the cluster connection and token, set byorka loginororka user set-token.
orka command reads orka-cli.json, and orka config set rewrites it in place. If one job reads the file while another is rewriting it, the reading job gets an empty or partial file and fails with:
orka command in any job can hit it, including the delete at the end of a job.
Jobs that use different clusters or service accounts have a second problem. The CLI stores one Orka connection in ~/.kube/config, so the last job to run orka user set-token decides which token every job on the machine uses.
Give each job its own HOME for the Orka CLI
PointHOME at a directory of the job’s own, for orka commands only:
orka-cli.json and ~/.kube/config, and the directory is removed when the job exits.
Change HOME for orka only, not for the whole job. SSH agents, Git, cloud CLIs, and CI hooks keep their own files under HOME and expect the real one.
If your CI runs later steps or hooks in child shells, export the function so they inherit it:
export -f works in bash only. In other shells, put the same one-line wrapper in a script on the job’s PATH ahead of the real orka binary.
When you need this
- Several CI agents or executors on one machine under one user account, such as multiple Buildkite agents, a GitLab Runner with the shell executor and
concurrentabove 1, or a Jenkins agent with more than one executor. - Jobs on one machine that talk to different Orka clusters or use different service accounts.
HOME and aren’t affected.

