Summary
When a job is created with a workdir in another scope, list_jobs --allScopes correctly shows the job, but get_job and job_logs fail with not found in the current session scope.
This makes it hard to inspect or run jobs from a control-plane repo that intentionally schedules jobs for a different runtime repo.
Environment
- Scheduler plugin:
opencode-scheduler@1.3.0
- Opencode binary:
/Users/caleb/.nix-profile/bin/opencode
- Opencode version:
1.2.27
- OS: macOS (darwin)
Reproduction
- From a control-plane directory/session, create a job with a different runtime
workdir:
- name:
weekday-standup-10am
- command:
/Users/caleb/Coding/opencode-scheduler/jobs/weekday-standup-10am/run.sh
- workdir:
/Users/caleb/Coding/web
- Run
list_jobs with allScopes=true and includeLegacy=true.
- Confirm the job appears in the output.
- Run:
get_job name=weekday-standup-10am
job_logs name=weekday-standup-10am
Actual Behavior
Both commands return:
Job "weekday-standup-10am" not found.
Even though list_jobs --allScopes shows the job.
Expected Behavior
One of the following:
get_job/job_logs should resolve uniquely across scopes (when name is unique), or
get_job/job_logs should accept scopeRoot / scopeId / allScopes parameters similar to list_jobs, or
- Error should indicate the job exists in a different scope and show that scope explicitly.
Additional Context
list_jobs with scopeRoot=/Users/caleb/Coding/web shows the job.
- Job definition exists on disk under scheduler scope storage (e.g.
~/.config/opencode/scheduler/scopes/<scope-id>/jobs/weekday-standup-10am.json).
- This currently blocks lifecycle checks like "get details", "run immediately", and "view logs" from a central scheduler repo.
Summary
When a job is created with a
workdirin another scope,list_jobs --allScopescorrectly shows the job, butget_jobandjob_logsfail withnot foundin the current session scope.This makes it hard to inspect or run jobs from a control-plane repo that intentionally schedules jobs for a different runtime repo.
Environment
opencode-scheduler@1.3.0/Users/caleb/.nix-profile/bin/opencode1.2.27Reproduction
workdir:weekday-standup-10am/Users/caleb/Coding/opencode-scheduler/jobs/weekday-standup-10am/run.sh/Users/caleb/Coding/weblist_jobswithallScopes=trueandincludeLegacy=true.get_job name=weekday-standup-10amjob_logs name=weekday-standup-10amActual Behavior
Both commands return:
Job "weekday-standup-10am" not found.Even though
list_jobs --allScopesshows the job.Expected Behavior
One of the following:
get_job/job_logsshould resolve uniquely across scopes (when name is unique), orget_job/job_logsshould acceptscopeRoot/scopeId/allScopesparameters similar tolist_jobs, orAdditional Context
list_jobswithscopeRoot=/Users/caleb/Coding/webshows the job.~/.config/opencode/scheduler/scopes/<scope-id>/jobs/weekday-standup-10am.json).