Worker sandbox issues: missing task context in record_coverage, incorrect workspace paths, and inaccessible proxy CA certificate
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- docker, docker-compose, go, postgresql
- Domain
- ai-infra-agents, backend, infrastructure
Research direction
Start by tracing tool construction and injection across agent/worker.go, agent/tools.go, agent/coverage_ledger.go, and server/assembly.go, then follow workspace and CA certificate paths through the Docker Compose runner and worker configuration. Reproduce the targetless diagnostic described in the issue with coverage disabled and inspect worker instructions and tool availability. Done means the reported task context, shared workspace, sandbox-local paths, and CA access failures are addressed and the worker reports incomplete checks without looping.
Written by the indexing model from the issue text.
Description
Bug report
I have spent several hours troubleshooting ARTEX on macOS with Docker Desktop and a local LM Studio instance. Despite updating to the latest available commit, several issues persist and prevent reliable task execution.
- Environment
- ARTEX commit: c985c830
- Previous commit: 048e8a84
- Branch: main
- Host: macOS, Apple Silicon M3 Max, 64 GB RAM
- Docker Engine: 29.7.2
- Docker Compose: 5.4.0
- LLM provider: LM Studio (OpenAI-compatible API)
- Model: qwen3.8-27b-uncensored-mlx
- Model context length: 65,536 tokens
- Parallel predictions: 3
- ARTEX workers: 3
- Sandbox mode: required
- Deployment: Docker Compose with the Docker Desktop overlay
The backend, PostgreSQL and runner are operational. The executor isolation self-test passes successfully.
- Issue: record_coverage requires a task context
Workers repeatedly call record_coverage, which consistently returns:
record_coverage requires a task context
The model acknowledges the failure and states that it will use record_fact instead, but repeatedly calls record_coverage again.
This results in excessive token consumption, repeated failed tool calls and eventual worker timeouts.
The issue also occurred in a strictly local, targetless diagnostic task with Coverage Enabled explicitly disabled. I verified directly in PostgreSQL that coverage_enabled was correctly stored as false.
Suspected root cause
After reviewing the source code, I suspect an issue in the interaction between the per-task ToolSet and the server-level domain tool injection mechanism.
Relevant files:
- agent/worker.go
- agent/tools.go
- agent/coverage_ledger.go
- server/assembly.go
In agent/worker.go, coverage tools are filtered through:
tsx.DropCoverageTools(tsx.WorkerTools())
However, the resolver in server/assembly.go can subsequently inject domain tools that are absent from the incoming tool list.
The server-level registry is constructed using:
serverTS := agent.NewToolSet(nil, "")
serverTS.SetAssetStore(as, as.Companies())
These tool instances are task-less by construction.
It appears possible that record_coverage is correctly removed from the task-specific tool list but subsequently reintroduced through domainReg as a task-less instance.
This would explain both the availability of the tool when coverage is disabled and the missing task context error.
This is a suspected root cause, not a verified source-level fix.
- Issue: Docker Desktop workspace inconsistency
The Docker Desktop overlay uses a named volume for the ARTEX application data:
artex_data -> /app/data
However, the runner originally used host bind mounts for:
./data/tasks -> /app/data/tasks
Consequently, the backend created task directories inside the named volume, while worker containers received a different, empty host directory.
The original error was:
OCI runtime exec failed:
chdir to cwd ("/workspace/i15") set in config.json failed:
no such file or directory
I implemented a local Compose override to make the runner and worker use the same underlying task storage.
After this change, a local diagnostic successfully executed Bash, created a file inside the assigned worker workspace, and read it back. The backend could also access the same file.
However, the default Docker Desktop deployment appears to require further investigation to ensure consistent workspace storage across the backend, runner and worker containers.
- Issue: incorrect workspace paths in worker instructions
Even after resolving the storage inconsistency, workers frequently attempt to use backend filesystem paths such as:
/app/data/tasks/8/i26
instead of their actual sandbox working directory:
/workspace/i26
This produces errors such as:
bash: cd: /app/data/tasks/8/i26:
No such file or directory
and:
mkdir: cannot create directory '/app':
Read-only file system
The read-only filesystem protection is working correctly. The problem appears to be that worker instructions expose or encourage the use of paths that belong to the backend container rather than the worker sandbox.
Workers should receive workspace paths appropriate to their actual execution environment.
- Issue: proxy CA certificate inaccessible inside worker sandbox
HTTPS requests from workers also fail with:
curl: (77) error setting certificate file:
/app/data/traffic/_ca/mitmproxy-ca-cert.pem
The configured CA certificate path appears to reference the backend container filesystem and is not accessible from the worker sandbox.
Please investigate whether the proxy CA certificate is correctly provisioned inside worker containers and whether the corresponding environment variables reference a valid sandbox-local path.
TLS verification and sandbox isolation should remain enabled.
- Excessive token consumption and failed-tool retry loops
During one task, ARTEX consumed approximately:
- Input tokens: 1.6 million
- Output tokens: 126,600
- LLM calls: 95
- Reported cache hit rate: 0%
Despite this consumption, the task remained incomplete.
Several workers spent substantial time repeating failed tool calls rather than terminating or reporting incomplete checks.
I would also appreciate investigation into:
- Repeated identical failed tool calls
- Worker termination and write-back behavior
- Task-context preservation during termination
- Prompt/context growth and cache utilization
- Timeout handling when workers cannot make progress
- Steps to reproduce the task-context issue
The issue can be reproduced without accessing any external target.
- Deploy ARTEX on macOS using Docker Desktop.
- Configure LM Studio as the LLM provider.
- Create a targetless local diagnostic task.
- Disable Coverage Enabled.
- Ask the planner to delegate a single worker intent that calculates 25 * 16, writes the result to a relative workspace file, reads it back, and completes the task.
- Observe the worker’s write-back and termination behavior.
In my environment, the local file operation succeeded, but the worker repeatedly attempted to call record_coverage and received the missing task context error.
I also tested basic tool selection directly through the LM Studio API. The model correctly selected record_fact when explicitly requested, so basic function calling works outside ARTEX.
- Expected behavior
- Coverage-disabled tasks must not receive coverage-only tools.
- Task-specific tools must retain their task context.
- Backend and runner must share consistent task storage on Docker Desktop.
- Workers must receive valid sandbox-local workspace paths.
- Proxy CA certificates must be accessible inside the sandbox without disabling TLS verification.
- Repeated identical tool failures should terminate gracefully instead of consuming tokens indefinitely.
- Incomplete checks must be reported accurately without being marked as successfully completed.
- Current status
All of these issues were observed during troubleshooting. The record_coverage failure was reproduced again after updating to commit c985c830.
I would appreciate guidance on whether these are known issues, configuration problems, or implementation bugs.
Is there a recommended stable release or supported Docker Desktop configuration that addresses these problems?
Thank you.
- Dominant language
- Go
- Stars
- 18.7k
- Forks
- 7k
- Avg merge
- 10h 57m
- Merged PRs (30d)
- 494
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from BaaRai/ARTEX
-
bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
BaaRai/ARTEX#981 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
BaaRai/ARTEX#980 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
BaaRai/ARTEX#812 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
question
Difficulty 4/5 1-2 days Newbie friendliness 35/100
BaaRai/ARTEX#983 · 4 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
bug P2
Difficulty 3/5 1-2 days Newbie friendliness 20/100
BaaRai/ARTEX#977 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
agent:ready
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
turbot/flowpipe#1162 · 1 comment ·
Maintainers usually reply within 1 day
-
LifetimeRemaining divides by zero when expireAfter is 0s, producing NaN disruption costsPossibly taken @weirong-ui claimed this today. Openkind/bug needs-priority needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
kubernetes-sigs/karpenter#3728 · 1 comment ·
Maintainers usually reply within 1 day
-
compaction: redundant exclusion checks after inRangePossibly taken @moodbased claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day