To fill the gap: Context at Runtime

Today my daily drivers are Claude Code (primary) and OpenCode (secondary). The problem I face is that whenever an agent changes my backend code, I have to run it manually, hit the endpoint to test it, and paste the logs back to the agent if the service gives error/warning. Today agents rely on unit tests to check the validity of their implementation, and if they are also using HTTP integration tests, then most of this work is already handled and you probably don’t need this tool. But that’s not the case for most legacy services and tough for multiple services interconnected.

Today, an application is divided into multiple services and sub-modules, and most commonly they all have their own repo, e.g. 3 API services and 2 UIs (customer + admin). Running an HTTP integration test is very tough needs to much setup on local systems, because you have to manually run every service needed for that specific test otherwise its resource heavy.

Also, I don’t have proof, but many times I have seen an agent build an application and pass all the unit tests, and then when I run the actual service myself it gives errors like: this API provider’s v2 api version is deprecated may misbehave or its response format changed, or this email service needs a flag in the header to work. So there is a big gap between how an application passes unit tests and how it behaves at runtime with intercommunication of services in real time or in production.

Agents today can run the application and see its behaviour at runtime by creating a shell, but the problem is that the shell only returns results to the agent when it exits. Only after that does the agent have access to the logs to process and make a decision. But I have seen many systems (take a currency exchange module, for example) where there is a fallback to another currency. It’s a very dumb decision, but it exists. The service never fails and the API response is always a success, but under the hood it’s wrong. From the logs we can detect that the API used a fallback and that the fallback is incorrect. Since agents don’t have access to logs at runtime, when the user asks “why is my API giving a wrong result?”, they have to dig through every file instead of jumping directly to the fallback implementation through the context they got from the logs.

My point is: today we can only give log context to an agent at the exit of the process, and this skips many unusual things happening at runtime.

Like us humans: how we used to develop and test applications, we check unit tests, then manually hit the APIs (e.g. Postman) and check the logs to confirm that the request, all the way to the response, has hit all the important methods before giving the result. The agent should do this automatically, leaving humans to focus on more features and ideas.

Unit tests are good, but runtime behaviour tells how the application actually behaves in real time.

Edit: Today I saw one more slipping error. In my backend, customer address is an optional field. When I sent the address from the frontend, the request contained the address but it was not saved in my docker Postgres. I only got to know when I checked the customer table while testing. If my agent had had access to the request/response logs, I am sure it would have detected this misbehaviour, and could have started clearing the doubt by itself, for example by querying Postgres, without my interaction. I can say this because it happened to me while using my own tool.

Problems agents and you face #

#The problemHow jack-ketch solves it
1Agents run the application in a shell and can read its output only after it has finished. If the shell is detached, all logs are lost and the port is orphaned.jack-ketch runs as a daemon and starts your applications as child processes. Logs are captured live and exposed to agents via MCP tools. Processes outlive agent sessions, so multiple agents can share one instance.
2Your agent works while you keep the application running in a separate terminal. After the agent finishes, you restart the app, and if an error occurs, you copy and paste it back to the agent manually.The agent starts, restarts and watches the app itself via MCP tools. It reads the logs, fixes the error and restarts, so nothing gets copy-pasted between terminal and chat.
3Agents rely on unit tests. Every method can pass on its own, but an endpoint touches many methods and the pipeline can break in their combination. The endpoint responds incorrectly and the user ends up catching it in production.Since the app is running, the agent sends real requests with probe and sees the response plus the log lines each request produced. Useful probes are saved as checks and re-run with run_checks.
4To check endpoints, you have to manually paste curl commands that contain a secret token, which exposes it to the agents.Tokens, cookies and API keys are encrypted in jack-ketch’s secret manager. The agent calls your API by profile name and never sees the values, which are scrubbed from every result and log.

Profiles, Probe and Secret Manager #

Applications profiles #

The details of the application run by the agent are saved locally in jack-ketch’s database and stay on your system, e.g. .env.local, command to run, path of the app etc. So in between restarts, the agent doesn’t have to pass all arguments again to jack-ketch to run the application. This is saved by the agent and can be retrieved by any agent, in any session, at any time.

Probe #

Probe is a built-in request/response client which exposes MCP tools to hit APIs, so agents can test their implementation by hitting real endpoints. After changing code, the agent sends a real request to the running application with probe and gets back the response along with the log lines that request produced. Useful probes are saved as checks, and run_checks re-runs them after every later change, so they work like HTTP integration tests. For private API endpoints, the agent uses the secret manager provided tokens, cookies and API keys to hit the endpoint with probe.

Secret Manager #

Most real endpoints need a JWT, a cookie or an API key, and pasting the curl including these to the agent is a security risk. With the secret manager, you store these values encrypted, and the agent only refers to them by profile name, for example “call this endpoint as the admin user”. jack-ketch injects the real token/cookie/API key at request time and scrubs it from every result and log, so the agent can test authenticated flows as a real user without ever knowing the token. This is what makes it safe to let the agent probe on its own.

Setup and Installation #

GitHub: github.com/anshiq/jack-ketch

Linux and macOS:

curl -fsSL https://raw.githubusercontent.com/anshiq/jack-ketch/master/scripts/install.sh | bash

Windows (PowerShell):

irm https://raw.githubusercontent.com/anshiq/jack-ketch/master/scripts/install.ps1 | iex

The installer picks the latest release, verifies its SHA-256 checksum and places two binaries in ~/.local/bin (%LOCALAPPDATA%\jack-ketch\bin on Windows):

  • jackketchd: the always-on daemon, one per OS user. It owns all processes, the log index and the state.
  • jack-ketch: the CLI and MCP bridge your agents talk to.

You can pin a version or change the directory with -v/--version and -d/--dir. A Nix flake is also available under packaging/nix/.

Then connect your agents and open the web UI:

jack-ketch integrate install --detected   # connects every detected MCP client (shows the diff and asks first)
jack-ketch web                  # opens the web UI (very friendly and you can configure everything from here)

Claude Code, OpenCode, Codex (has some issues), Cursor, Gemini CLI, Zed and many other MCP clients are supported. To connect one specifically, use jack-ketch integrate install claude-code or jack-ketch integrate install opencode.

Most Common Commands #

Setup and health

jack-ketch web                           # web UI: processes, logs, config, credentials

Tools your agent calls over MCP (you don’t run these yourself)

ToolWhat it does
list_processesLists managed processes. Called first to re-attach to what’s already running.
start_process / restart_process / stop_processLifecycle control of your app.
get_logs / search_logs / wait_for_logRead, search or wait on live logs.
get_errorsGroups errors by type with file and line.
diagnose_processExplains why a process failed and who has to act.
probeSends a request to the running app and returns the response plus its log lines.
run_checksRe-runs saved probes.
verify_changeRestarts, waits until the app is live, runs checks and reports a pass or fail verdict.
list_credentialsLists credential profile names (never the values).