Skip to content

fix: fix the CLI bugs an insights report surfaced - #1545

Merged
edenreich merged 5 commits into
mainfrom
fix/insights-findings
Oct 6, 2026
Merged

edenreich merged 5 commits into
mainfrom
fix/insights-findings

Conversation

@edenreich

@edenreich edenreich commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes the real CLI bugs behind the failures in an infer insights report. Each item was checked against the code first. The rest of the report was environment issues, expected behaviour or the model misusing a tool, and is not touched here.

  • A2A agents on a reassigned port. The supervisor moves a run: true agent to the next free host port when the configured one is taken. Readiness, liveness and every A2A request kept using the configured port. A gateway on that port answered /health, so the agent looked ready while /a2a returned 404. Requests are now routed to the port the container was given, and the configured URL stays the agent's identity for the model, the task tracker and auth. The route table is per process: an agent started detached with infer agents start on a reassigned port is still reached on its configured port from another process.
  • A2A readiness timeouts report the container's last log lines, or that it exited, before --rm deletes it.
  • A2A_SubmitTask returns an agent's direct Message reply as the answer instead of failing with "no task ID received".
  • Method not found (-32601) tells the model that the agent speaks another protocol version and that retrying will not help.
  • A missing .env is no longer reported on every agent start.
  • Shared container network. Another session could remove the network while this one pulled an image, so docker run failed with network infer-network not found. EnsureNetwork checks on every call, and agents, MCP servers and the gateway ensure it right before they run.
  • Error messages keep their case. fang title-cased the first word, which turned --serve into --Serve.
  • Grep head_limit caps the total on the ripgrep path like | head -N, not matches per file. The description says the syntax is RE2.
  • SendSubagentInput no longer claims submit waits for the subagent.
  • Insights. The log section carries each line's level and is named "Log warnings and errors". The prompt no longer counts tool failure lines twice.
  • Bash. A dropped live preview chunk is logged at debug. The full output still reaches the tool result.

Test plan

  • task precommit:run
  • go test -race ./...
  • Golden tool definitions regenerated for the manifest wording
  • A real build under a TTY prints --serve takes no task, where main prints --Serve
  • Manual: occupy an agent's configured port, start a run: true agent and delegate a task to it

…reply

The supervisor moves a run: true agent to the next free host port when the
configured one is taken, but readiness, liveness and every A2A request kept
using the configured port. Another service on that port answered /health,
so the agent looked ready while requests got a 404. Requests are now routed
to the port the container was given, and the configured URL stays the
agent's identity for the model, the task tracker and auth.

- A readiness timeout reports the container's last log lines, or that it
  exited, before --rm deletes the container.
- A2A_SubmitTask returns an agent's direct Message reply as the answer
  instead of failing with "no task ID received".
- A JSON-RPC method-not-found error tells the model the agent speaks another
  protocol version and that retrying will not help.
- A missing .env file is no longer reported on every agent start.
- The container network is ensured right before docker run, since another
  session may remove it while an image is pulled.
… run

Every session removes the shared network on shutdown when no container is
attached. A session that ensured it before a long image pull could then fail
with "network infer-network not found". EnsureNetwork now checks on every
call, and MCP servers and the gateway ensure it after pulling.
fang title-cases the first word of an error, which turned flags such as
--serve and --model into --Serve and --Model.
…tions

- On the ripgrep path head_limit became --max-count, a per-file cap, while
  the description promises "| head -N". It now caps the total like the Go
  fallback does.
- Grep says its regex syntax is RE2, without lookaround or backreferences.
- SendSubagentInput no longer claims submit waits for the subagent, which
  led the model to pass submit=false to headless subagents.
The log section listed every warn-level line as a failure the sessions never
recorded, although tool failure lines repeat the failed tool calls already
counted. The table and digest now carry each line's level, the section is
named "Log warnings and errors", and the analysis prompt is told not to
count tool lines twice.

A dropped live preview chunk of bash output is logged at debug. The full
output still reaches the tool result.
@edenreich
edenreich requested a review from a team as a code owner October 6, 2026 09:51
@edenreich
edenreich merged commit 64b0890 into main Oct 6, 2026
12 checks passed
@edenreich
edenreich deleted the fix/insights-findings branch October 6, 2026 12:59
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.226.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant