Summary
Moving an inbox task to a project via ofocus task update <id> --project <project> consistently fails with:
Error: JXA error: execution error: Error: Error: AppleEvent handler failed. (-10000)
Other updates on the same task (--flag, --note, --name) succeed, so the task reference resolves correctly. Only the --project assignment fails.
Reproduction
- Create a new project inside an existing folder:
ofocus project create "HUFL household data" --folder "Urban science"
# → id: akTq1ik9d-S
- Pick an inbox task id (e.g.
pwyeARZ8Xyk) via ofocus inbox --json.
- Try any of these — all fail with the same error:
ofocus task update pwyeARZ8Xyk --project akTq1ik9d-S
ofocus task update pwyeARZ8Xyk --project akTq1ik9
ofocus task update pwyeARZ8Xyk --project "HUFL household data"
- But these succeed on the same task:
ofocus task update pwyeARZ8Xyk --flag # Updated
ofocus task update pwyeARZ8Xyk --note "..." # Updated
The project itself is valid — ofocus project ls "Urban science" lists it.
Verified the task stays in the inbox (project: null) after each failed attempt.
Context
- macOS: 15.5 (Darwin 25.5.0)
- OmniFocus: 4 (current)
- Fresh project creation + inbox-task reassignment. The project was created in the same session a few seconds prior.
Likely cause
The current JXA path (src/ofocus/commands/task.py lines 180–192) uses:
projLookup.match.tasks.push(task);
to move the task. With OmniFocus 4's JXA surface, .tasks.push() on a project has been flaky for inbox-originated tasks — -10000 is the generic "AppleEvent handler failed" and is commonly what OF returns when the sender/receiver container relationship can't be resolved for inbox tasks specifically.
Possible alternatives worth trying:
app.moveTasks([task], {to: projLookup.match.tasks.beginning}) (or .ending)
- Setting
task.assignedContainer = projLookup.match then task.inInbox = false
app.move(task, {to: projLookup.match})
moveTasks is generally the documented way to reassign and seems to work for inbox → project reliably.
Workaround
Drag the task in the OmniFocus UI.
Summary
Moving an inbox task to a project via
ofocus task update <id> --project <project>consistently fails with:Other updates on the same task (
--flag,--note,--name) succeed, so the task reference resolves correctly. Only the--projectassignment fails.Reproduction
pwyeARZ8Xyk) viaofocus inbox --json.ofocus task update pwyeARZ8Xyk --project akTq1ik9d-S ofocus task update pwyeARZ8Xyk --project akTq1ik9 ofocus task update pwyeARZ8Xyk --project "HUFL household data"The project itself is valid —
ofocus project ls "Urban science"lists it.Verified the task stays in the inbox (
project: null) after each failed attempt.Context
Likely cause
The current JXA path (
src/ofocus/commands/task.pylines 180–192) uses:to move the task. With OmniFocus 4's JXA surface,
.tasks.push()on a project has been flaky for inbox-originated tasks —-10000is the generic "AppleEvent handler failed" and is commonly what OF returns when the sender/receiver container relationship can't be resolved for inbox tasks specifically.Possible alternatives worth trying:
app.moveTasks([task], {to: projLookup.match.tasks.beginning})(or.ending)task.assignedContainer = projLookup.matchthentask.inInbox = falseapp.move(task, {to: projLookup.match})moveTasksis generally the documented way to reassign and seems to work for inbox → project reliably.Workaround
Drag the task in the OmniFocus UI.