Skip to content

Point the worker's agent at the web service inside the compose network - #130

Closed
xrendan wants to merge 2 commits into
mainfrom
fix/worker-agent-api-url
Closed

Point the worker's agent at the web service inside the compose network#130
xrendan wants to merge 2 commits into
mainfrom
fix/worker-agent-api-url

Conversation

@xrendan

@xrendan xrendan commented Sep 10, 2026

Copy link
Copy Markdown
Member

Summary

The agent jobs run in the worker container and shell out to the claude CLI, which writes evidence, criteria and evaluation runs back through the Rails agent API using RAILS_API_URL. That variable was never set for the worker, so the subprocess fell back to http://localhost:3000, which inside the worker container is nothing. Every production agent run since the agent shipped, including the Sunday AgentWeeklyScanJob, would have failed to write results.

Sets RAILS_API_URL=http://web:3000 on the worker service. The web service listens on 3000 in-container and is reachable by service name on the default compose network.

Testing

Static change only. To confirm after deploy, from the host:

docker compose -f docker-compose.prod.yml exec worker \
  sh -c 'curl -s -o /dev/null -w "%{http_code}\n" $RAILS_API_URL/up'

should print 200.

AgentEvaluateCommitmentJob and AgentProcessEntryJob shell out to the claude
CLI, which writes results back via RAILS_API_URL. The worker container never
had that variable, so the subprocess defaulted to http://localhost:3000 and
could not reach the web service.
GoodJob drops enqueues beyond enqueue_limit without raising. With 598
non-broken commitments and a limit of 550, AgentWeeklyScanJob silently
skipped the tail of every full scan.
@xrendan xrendan closed this Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant