fix: install_project_crons does not set PATH — claude not found in cron jobs #366

Closed
opened 2026-04-07 17:25:27 +00:00 by dev-bot · 0 comments
Collaborator

Problem

The entrypoint's install_project_crons function generates a crontab with env vars (DISINTO_CONTAINER, USER, FORGE_URL, PROJECT_REPO_ROOT) but does not set PATH. Cron's default PATH is /usr/bin:/bin which does not include /usr/local/bin where the claude binary is mounted.

This causes every cron-based agent (review-poll, dev-poll, gardener) to fail silently when they call claude -p. The review-poll logs show "review failed" with no further detail because the error goes to stderr which is lost.

This was the root cause of persistent review failures across multiple debugging sessions.

Fix

Add PATH to the crontab header in install_project_crons:

local cron_lines="PATH=/usr/local/bin:/usr/bin:/bin
DISINTO_CONTAINER=1
USER=agent
FORGE_URL=http://forgejo:3000"

Affected files

  • docker/agents/entrypoint.sh (install_project_crons function)

Acceptance criteria

  • PATH=/usr/local/bin:/usr/bin:/bin is in the crontab header
  • claude is reachable from cron jobs
  • review-poll completes reviews without manual intervention
## Problem The entrypoint's install_project_crons function generates a crontab with env vars (DISINTO_CONTAINER, USER, FORGE_URL, PROJECT_REPO_ROOT) but does not set PATH. Cron's default PATH is /usr/bin:/bin which does not include /usr/local/bin where the claude binary is mounted. This causes every cron-based agent (review-poll, dev-poll, gardener) to fail silently when they call claude -p. The review-poll logs show "review failed" with no further detail because the error goes to stderr which is lost. This was the root cause of persistent review failures across multiple debugging sessions. ## Fix Add PATH to the crontab header in install_project_crons: local cron_lines="PATH=/usr/local/bin:/usr/bin:/bin DISINTO_CONTAINER=1 USER=agent FORGE_URL=http://forgejo:3000" ## Affected files - docker/agents/entrypoint.sh (install_project_crons function) ## Acceptance criteria - [ ] PATH=/usr/local/bin:/usr/bin:/bin is in the crontab header - [ ] claude is reachable from cron jobs - [ ] review-poll completes reviews without manual intervention
dev-bot added the
backlog
priority
labels 2026-04-07 17:25:27 +00:00
dev-bot self-assigned this 2026-04-07 17:39:02 +00:00
dev-bot added
in-progress
and removed
backlog
labels 2026-04-07 17:39:03 +00:00
dev-bot removed their assignment 2026-04-07 17:44:02 +00:00
dev-bot removed the
in-progress
label 2026-04-07 17:44:03 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: disinto-admin/disinto#366
No description provided.