FAQ

Common questions are arranged as Qn, and each one gives the symptom, cause, and action.

Start with Help and troubleshooting to locate a problem by symptom; this page is better for looking up "why" and "what to do" for a specific question. For error codes, see Error code dictionary.

Prerequisites: what preparation is needed before creating a task, and why does it report "no available engine"?

Before a new Issue triggers a Pipeline, you must configure and apply the Scene. Otherwise the Agent reports engine_unavailable (no available engine).

  1. Enter Scene Center: after you select a repository, open Scene Center → Project scenes in the left navigation.
  2. Select a scene: choose one from the drop-down. The default scene is "General development" (internal id default), which includes the full VOD→Issue→Coding→QA→SRE node chain.
  3. Configure engines: click Configure engines and assign an engine instance to each Agent node (choose from the engines registered by Workers):
    - VOD Agent → hermes
    - Issue Agent → opencode
    - Coding Agent → opencode
    - QA Agent → opencode
    - SRE Agent → hermes
  4. Save the engines: click Save engines after configuration.
  5. Apply the scene: click Apply to bind the scene to the current repository.

Notes

  • If you do not click Apply, the scene configuration does not take effect, and webhook events are still handled with the default configuration.
  • If an engine is not configured (engine_runtime_ids is empty), the Agent reports "no available engine" and fails.
  • A node with engine_runtime_ids set is a hard dispatch constraint: the task lands only on the configured engines; if all candidate engines are offline or deregistered, the task fails explicitly and does not fall back to the global pool.
  • After you add a Worker, reassign engines in Scene Center.
  • Different repositories can apply different scenes (for example, a development repository uses the default "General development" scene, and an operations repository uses a custom SRE scene).
  • Custom scene: select Create custom scene in the drop-down and configure each Agent's Skill (skill), trigger mode (mode), and downstream routing (next) item by item.

Q1: The pipeline is not triggered after an Issue is created?

Possible causes and checks:

  • Webhook not configured: check the webhook settings of the GitCode repository and confirm that they point to the Grape webhook URL (https://<your-domain>/webhook/gitcode).
  • Repository not authorized: on the Repositories page of the Grape console, confirm that the repository has been imported.
  • Webhook secret mismatch: the secret in the GitCode webhook settings must match the Grape configuration.
  • Event types not selected: the GitCode webhook must have the Issue and PR events selected.
  • Check the webhook log: view the delivery result on the GitCode webhook management page (HTTP 200 means delivered).

Q2: The task status shows "failed". How do I troubleshoot it?

  1. Click the failed task in Issue Center or Pipeline and read the detailed log.
  2. Use exit_code to narrow down the cause:
  • exit_code=-1, duration about 30s: engine startup failed (for example, a missing Hermes ACP dependency or a wrong CLI path)
  • exit_code=-15: the task was terminated by a signal (service restart, timeout kill)
  • exit_code=1: the Agent failed during execution (code compilation failure, API call failure)
  • "no available engine": no online Worker runs the required engine
  1. In Observability → Devices and engines, check the engine health status of the corresponding Worker.
  2. SSH to the Worker and read the log: journalctl -u runtime-agent -n 100 --no-pager. The unit name may be runtime-agent-<instance-hash>; run systemctl list-units 'runtime-agent*' first to confirm.

A Worker can register and come online without any engine (normal state): a brand-new Worker registers successfully even when no engine is installed, and RuntimeAgent registered: [] in the log is normal. Installing an engine afterwards does not require a Worker restart — the Worker periodically rediscovers local engines and registers them automatically (within 5 minutes).

Installing engines (installed by the user; the Worker discovers and registers them at startup):

  • opencode: install Node.js, then run npm install -g opencode-ai
  • hermes: install it through the official Hermes Agent channels. Note that hermes on PyPI is an unrelated package with the same name; do not run pip install hermes.
  • codearts: provided by the Huawei Cloud CodeArts CLI; install it through the official channels.

The one-click installation script installs no execution engine: install-worker.sh only installs and registers the Worker itself.

Folder trust (codearts, fatal exit without a TTY): in environments without a terminal such as systemd or nohup, the folder-trust gate in the codearts CLI exits directly (exit 1) when it encounters an untrusted directory. The Grape Worker handles most of this automatically: per-task data directories and engine probes pre-write the settings.json trust configuration, and the one-line installation script also merges the Worker directory into trustedFolders in ~/.codeartsdoer/cli-data/settings.json.

After installing codearts manually, if it still reports "directory not trusted", run:

python3 - ~/.codeartsdoer/cli-data/settings.json ~/grape /var/cache/codearts-tasks <<'EOF'
import json, os, sys

path, dirs = sys.argv[1], sys.argv[2:]
s = {}
try:
    s = json.load(open(path, encoding="utf-8"))
except Exception:
    pass
sec = s.get("security") if isinstance(s.get("security"), dict) else {}
ft = sec.get("folderTrust") if isinstance(sec.get("folderTrust"), dict) else {}
ft.setdefault("enabled", True)
folders = sec.get("trustedFolders") if isinstance(sec.get("trustedFolders"), list) else []
for d in dirs:
    if d and d not in folders:
        folders.append(d)
sec["folderTrust"], sec["trustedFolders"] = ft, folders
s["security"] = sec
json.dump(s, open(path, "w", encoding="utf-8"), indent=2)
EOF

Worker cannot connect (server_base_url dual meaning): a single server_base_url is both the "browser callback address" and the "Worker callback address". In a dual-address deployment (the browser uses the public domain, the Worker uses an internal address), one of them is necessarily wrong. Configure them separately in configs/server-config.json (if omitted, it falls back to server_base_url):

{
  "browser_callback_url": "https://<your-domain>",
  "worker_connect_url": "https://<worker-reachable-address>"
}

Restart the service after the change. For a self-check, read browser_callback_url, worker_connect_url, and url_split_warning from the GET /api/health response. Configuring only these two split fields without server_base_url also counts as having a base address configured, and the health check and startup log no longer report "server_base_url is not configured"; if a split field points to a loopback address such as localhost, a warning is emitted for that side (browser callback or Worker callback).

Q4: The console page stays on "loading…" and does not disappear?

  • Force refresh: Ctrl+Shift+R to clear the cached old JS.
  • Check the network: confirm that the Grape domain is reachable (for example, grape.example.com).
  • Check the login state: an expired token redirects to the login page.
  • Check the backend service: open https://<your-domain>/api/health; it is online only when it returns 200 with server=ok.
  • Check the browser console: F12 → Network to see which request times out.

Q5: A task executed by the Agent stays stuck in "running"?

  • Task timeout: the Worker default single-task timeout is 60 minutes (120 minutes for coding), and the task is marked failed only after the timeout. Adjust it with RUNTIME_TASK_TIMEOUT / task-timeout.json.
  • Worker offline: in Observability → Devices and engines, check whether the Worker is online (whether the heartbeat is normal).
  • Engine hung: possibly model API rate limiting or a network interruption; check the Worker log.
  • Manual handling: click Retry on the Pipeline page, or trigger again in the Issue comments.
  • Clean up zombie tasks: ask the administrator to mark them failed as needed (records in the events table with status='running' and an expired started_at).

Q6: How do I add a new Worker machine?

  1. Install Python 3.10+ and the required AI CLI (opencode / hermes / codearts) on the target machine.
  2. On the Agent Runtime page of the Grape console, generate a new Worker credential (runtime parameters are configured in General settings).
  3. Run the one-click installation command on the target machine:

bash curl -fsSL https://<grape-domain>/api/runtime/install | bash -s -- --token <rta_...> --server https://<grape-domain>

  1. The Worker registers automatically after installation and is visible on the Runtime page.
  2. Confirm that the engine health check passes.

Q7: The engine health check shows "pending" or "fail"?

pending: a newly registered engine enters a 60-second first-probe window and retries automatically within it; if it still does not pass after the window, it returns to the periodic probe every 10 minutes. A pending state in the first few minutes after installation is normal; if it stays pending for a long time, check the Worker side instead of waiting.

fail:

  • Check whether the engine CLI is installed: which opencode / which hermes
  • Run it manually: opencode run "hello" or hermes chat -q "hello" --yolo
  • Check whether the model API key is correct (/etc/grape/grape.env or ~/.grape/runtime.env)
  • When using the hermes engine, confirm that the ACP dependency is installed: hermes acp should output "ACP client connected".

Q8: What should I watch out for when the SRE Agent destroys cloud resources?

Safety notice: the SRE Agent must obtain user confirmation before executing resource destruction. The flow is:

  1. The user creates an Issue requesting resource destruction.
  2. The SRE Agent queries and lists all resources to destroy in the Issue comments.
  3. The user replies "destroy all" in the comments or confirms specific resources.
  4. The SRE Agent executes the destruction after confirmation.
  5. After destruction completes, the SRE Agent posts the verification result in the Issue comments.

To abort, close the Issue before confirmation or reply "cancel".

Q9: How do I view the detailed execution log of an Agent?

  • Console: on the Issue Center / Pipeline page, click a task row to open the log details, which show the reasoning and tool calls of each step; you can also check Observability → Tasks and logs.
  • Worker log: SSH to the Worker and run journalctl -u runtime-agent -n 100 --no-pager. A newly installed Worker uses the unit name runtime-agent-<instance-hash>; run systemctl list-units 'runtime-agent*' first to confirm the actual unit name.
  • Server log: SSH to the main server and read <installation-directory>/data/logs/devops-bot.log (for example, /opt/grape/data/logs/devops-bot.log).
  • Database: the result field of the event contains a summary of the Agent's final output.

Q10: Does a PR submitted by the Coding Agent need to be merged manually?

Yes. After the Coding Agent submits a PR, the QA Agent reviews it automatically and provides comments, but merging the PR requires manual action by the repository maintainer. This is a deliberate safety mechanism — AI can write code and submit PRs, but merging into the mainline always requires human confirmation. On the GitCode PR page you can review the QA Agent's comments and the code changes, then click Merge after confirmation.

Q11: How do I configure the API key for an AI model?

AI model configuration lives in three places:

  • Main server: HERMES_CUSTOM_API_DEEPSEEK_COM_API_KEY in /etc/grape/grape.env
  • Worker: HERMES_CUSTOM_OPENGW_CLOUDDEVELOPER_CLUB_API_KEY in ~/.grape/runtime.env
  • opencode: apiKey in ~/.config/opencode/opencode.json

Restart the services that read these files after the change:

# Server (systemd; the user-facing and webhook processes in the four-process layout)
sudo systemctl restart grape-server grape-event-server

# Docker deployment
cd deploy && docker compose --env-file ../.env restart grape-server grape-event-server

# Worker: the unit name may be runtime-agent-<instance-hash>
systemctl list-units 'runtime-agent*'
sudo systemctl restart runtime-agent-<instance-hash>

Q12: How do I create a custom Skill for a repository?

Use Scene Center → Grape Skill development workflow. Do not write SKILL.md by hand or build a ZIP package first.

  1. In Scene Center, find Grape Skill development workflow and apply it to the current repository.
  2. Create a Skill requirement Issue that states the problem to solve, the input and output, the files involved, the acceptance criteria, and the prohibited operations.
  3. The Pipeline generates a repository-level Skill and writes the Skill into the repository.
  4. Return to Project scenes and select this Skill on the corresponding Agent node.
  5. Click Save and apply, then create a task to verify that the Skill takes effect.

Skills are isolated by Agent type: VOD, Issue, Coding, QA, and SRE Skills cannot be mixed; repository scenes cannot reference personal Skills. For details, see Skill management and Step 3: Customize an SRE Skill.

Q13: The tmp percentage of a Worker in observability is very high. What should I do?

The /tmp of a Worker can be filled up by JIT caches (hidden .so files) generated by AI engines at runtime. Symptom: scp reports No space left on device when transferring files, while the Worker otherwise looks normal.

Cleanup (run on the Worker):

find /tmp -maxdepth 1 -name ".*.so" -delete

Clean the /tmp of all Workers periodically; if it fills up often, add a scheduled cleanup job to crontab.

Q14: The scene is already applied. Why does the pipeline still run with the old configuration?

Distinguish two cases first:

  • An Issue that has already started: the task used the scene snapshot from when it started; changing the scene afterwards does not change this running task.
  • A new Issue still follows the old configuration: usually the scene was not really applied, or it was applied to a different repository.

Check in order:

  1. Whether the currently selected repository is the target repository.
  2. Whether the status of that scene in Project scenes is Applied.
  3. Whether Apply was clicked again after changing nodes, Skills, or engines.
  4. Whether the new Issue was created after the apply.

Verification: create a new Issue and check whether the pipeline nodes start with the new scene; do not use an old Issue to judge a new configuration.

Q15: QA did not review the PR, or the PR is stuck?

QA is usually triggered by the PR creation event, and can also be assigned by the Coding Agent through A2A. Check in order:

  1. Whether the PR was really created, and whether the repository and branch are correct.
  2. Whether the events page received the PR event.
  3. Whether the QA node is bound to a Skill and an online engine.
  4. Whether the QA task log has output or an error.

PR merging still requires human confirmation; this is a deliberate safety mechanism, not a QA failure; see Q10.

Q16: I replied in the Issue comments, but the Agent does not continue?

  1. Check whether the events page received the issue_comment event.
  2. Confirm that the comment is under the target Issue of the current repository, not another repository.
  3. Confirm that the comment was not posted by the Bot itself (self-replies are filtered).
  4. Check whether the task is in awaiting_input; if so, it should resume execution after the comment.
  5. Check the node log and the engine health status to rule out a failed task or an offline engine.

If the event was received but the task did not start, first check whether the scene is applied and whether the node has an online engine.

Q17: The webhook returns 200, but the events page has no record?

A webhook 200 only means the request was delivered, not that the event was accepted by the business logic. Check:

  1. Whether the repository is hosted in Grape.
  2. Whether the event types selected in the webhook include the current action (Issue, PR, comment).
  3. Whether the repository, time range, and status filters on the events page filtered it out.
  4. Whether the webhook secret matches the Grape configuration.
  5. Whether the delivery was duplicated and merged by idempotency logic.

Create a new Issue as a minimal verification; this is more reliable than digging through old events.

Help and troubleshooting | Error code dictionary | Runtime and Worker