Troubleshooting
Rewyyn uses a client-server architecture. A background server owns sessions, plugins, permissions, and other application state. Start by determining whether an issue is in a client, the shared server, or a specific project.
Check the background service
Show the current server information:
rewyyn service status
Verify that its API is healthy:
rewyyn api get /api/info
If the service is stuck or unhealthy, restart it:
rewyyn service restart
You can also stop and start it explicitly:
rewyyn service stop
rewyyn service start
Allow a browser origin
If a browser client on another origin cannot connect because of CORS, add the client’s origin to the service configuration:
rewyyn service set cors http://192.168.1.10:3001
rewyyn service get cors
Use an exact HTTP or HTTPS origin, including the port when needed, without a path or trailing slash. To allow multiple origins, pass a comma-separated list as one argument; whitespace around each origin is trimmed:
rewyyn service set cors "http://192.168.1.10:3001, https://app.example.com"
service get cors prints a JSON array. Remove the configured list with:
rewyyn service unset cors
Setting or unsetting service configuration stops the background service. Its next start picks up the new configuration;
use rewyyn service start to start it explicitly.
For a foreground server, repeat --cors for each additional allowed origin:
rewyyn serve --cors http://192.168.1.10:3001 --cors https://app.example.com
With serve --service, supplied --cors flags override the persisted list for that process. Without those flags, service
mode uses the persisted list. CORS does not change the listening address or bypass server authentication.
Inspect the API
The api command uses the local service discovery and authentication flow. It accepts either an HTTP method and path or an
OpenAPI operation ID.
See the API reference for all endpoints and operation IDs.
Pass a JSON request body with --data or -d, and add headers with --header or -H.
Read logs
Installed builds write logs to:
~/.local/share/rewyyn/log/rewyyn.log
Follow the log while reproducing the problem:
tail -f ~/.local/share/rewyyn/log/rewyyn.log
Each line includes a process run ID and a role field. Use role=server for session, provider, plugin, permission, and
tool activity.
grep 'role=server' ~/.local/share/rewyyn/log/rewyyn.log
grep 'run=8fc3b1d5' ~/.local/share/rewyyn/log/rewyyn.log
Capture a heap snapshot
Write a memory (heap) snapshot of the running background server on any platform:
rewyyn debug heap-dump
The command waits until the snapshot is complete, then prints its path:
/home/me/.local/share/rewyyn/log/heap-48213-2026-10-23T013012345Z.heapsnapshot
Write it somewhere else with --directory. The server creates the directory when it is missing:
rewyyn debug heap-dump --directory ./snapshots
- It only uses a server that is already running. It never starts, replaces, or restarts one.
- Use
--server <url>to capture a server you started withrewyyn serve. SetREWYYN_PASSWORDif it has one.--directoryis then a path on the server’s machine. - Open the file in the Memory panel of Chrome DevTools.
In the desktop app
Run Capture heap snapshots from the command palette. It writes one folder in your Downloads folder with a snapshot of each part of the app, plus a breakdown of the memory a snapshot cannot show:
rewyyn-heap-2026-10-23T013012345Z/
memory.json where the memory is, per process, in MiB: start here
memory-infra.json Chromium's memory dump trace; open it in https://ui.perfetto.dev
heap-48213-….heapsnapshot the desktop's own server
window-1-48390.heapsnapshot one per app window
main-48102.heapsnapshot the desktop main process
gpu.json the GPU and driver
manifest.json processes, PIDs, and memory before and after; written last
- A heap snapshot holds only JavaScript objects and the page. Images, layout, compositor layers and GPU memory are in
memory.jsonandmemory-infra.jsoninstead. - Remote servers are not captured. Use
rewyyn debug heap-dumpon that machine instead. - The server writes its snapshot straight into the folder, so nothing large is moved or copied.
- Browser tabs are not included, because their snapshots contain the content of the pages you visited.
Capture CPU and memory profiles
On macOS and Linux, you can signal a running Rewyyn process to capture diagnostic data. Get the background server PID from the health endpoint:
rewyyn api get /api/info
Use the pid from the response with one of these signals:
-
SIGPROFcaptures a ten-second CPU profile:kill -SIGPROF <pid>The result is written to the log directory as
cpu-<pid>-<timestamp>.cpuprofile. -
SIGUSR1captures a memory (heap) snapshot:kill -SIGUSR1 <pid>The result is written to the log directory as
heap-<pid>-<timestamp>.heapsnapshot.
Wait for CPU profile written or heap snapshot written in rewyyn.log before opening the file. The corresponding
log entry includes its complete path. You can inspect both file types in Chrome DevTools.
Service files
The shared server registers itself at:
~/.local/state/rewyyn/service.json
Its private service configuration is stored separately at:
~/.config/rewyyn/service.json
The database normally lives at:
~/.local/share/rewyyn/rewyyn.db
REWYYN_DB can override the database location.
Report an issue
Include the following when reporting a reproducible problem:
- Output from
rewyyn --version - Output from
rewyyn service status - The smallest sequence of steps that reproduces the issue
- Whether the issue affects the shared service, a specific client, or one project
- Relevant log lines, including their
runandrolefields
Remove API keys, authorization headers, prompts, file contents, and other sensitive data before sharing logs.
File reproducible problems in desktop feedback.