start_within in its own UI, so the deadline goes on an agent key.
Set this up with an agent
Copy the block below into any coding agent. It never asks for your API key: you run the one export line yourself.Copy agent setup prompt
Copy agent setup prompt
Configure OpenWork
-
Put an
opencode.jsonin a directory of its own. Use the provider entry from OpenCode. -
Export the key in the shell that starts OpenWork.
-
Launch OpenWork with the import path set.
OPENCODE_CONFIG_DIR set to that copy.
pnpm dev sets OPENWORK_DEV_MODE=1, which is what turns the import on.
OpenWork passes the parent environment through to the backend, so FLEXINFERENCE_API_KEY reaches the provider entry.
Scope comes from the profile, not the folder
OpenWork doesn’t read config out of your working directory, so the global and per-project split that OpenCode offers doesn’t apply here. Scope comes from the profile you launch against.
Keep one pair of profile paths per configuration you want to switch between. The same bundle imported into two profiles gives you two isolated setups, each with its own session history.
Reuse the paths above to keep a profile. Change them to start a fresh one.
The import copies on every launch and never deletes
The copy runs on every launch, and it overwrites. Edit the bundle, restart on the sameOPENWORK_ELECTRON_USERDATA and OPENWORK_DATA_DIR paths, and the backend reads the new file.
It never deletes. A file you removed from the bundle stays in the profile copy. Clearing that needs fresh paths for both variables, which starts the profile over and loses its session history. Do that only when a leftover file is in the way.
Troubleshooting
The import never ran.OPENWORK_DEV_MODE=1 is what enables it, and pnpm dev sets it. A production launch skips the import.
A config edit changed nothing. The copy runs per launch but only onto the profile it was given. Restart on the same OPENWORK_ELECTRON_USERDATA and OPENWORK_DATA_DIR paths.
A file you deleted is still loaded. The copy overwrites but never deletes. Start a fresh profile with new paths for both variables, accepting the loss of session history.
Requests never reach us. The top-level model field in the bundle is what selects the provider. Without it the backend stays on its built-in default.
401 invalid_api_key. FLEXINFERENCE_API_KEY is unset in the shell that started OpenWork. Export it there, since the backend inherits that shell’s environment.
Anything not specific to OpenWork is on agent keys, and OpenCode holds the provider entry.