Skip to content

Title: get_job and job_logs return "not found" for jobs visible via list_jobs --allScopes #11

Description

@caleb-reyes-op

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

  1. 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
  2. Run list_jobs with allScopes=true and includeLegacy=true.
  3. Confirm the job appears in the output.
  4. 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:

  1. get_job/job_logs should resolve uniquely across scopes (when name is unique), or
  2. get_job/job_logs should accept scopeRoot / scopeId / allScopes parameters similar to list_jobs, or
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions