Repository navigation
Releases
v2.13.0
agy-mcp v2.13.0
Fixes and behavior
-
Runs with refused tool actions fail as
agy_error, notdone. When agy refuses tool actions under its permission policy, a headless run can still exit 0 with aSUCCESSresult carrying a non-emptydenied_actionsarray. agy-mcp now decodesdenied_actionsand reclassifies clean-exit and payload-recoveredSUCCESSruns (includingjson_schemaruns missingstructured_output) with refused actions tostate: failedandfailure_reason: agy_error, ordered afterbackground_abortedandprint_timeoutso those more specific reasons keep precedence. Any text the run produced is kept as a partialresult(partial: falsewhen empty),errornames the deduplicated refused actions, and the generic continuationrecoveryhint is suppressed becauseerroralready explains why the run stopped. (#246)- Behavior change: a headless run where agy refused tool actions now reports
failed/agy_error(withpartial: trueif it produced text) instead ofdone.
- Behavior change: a headless run where agy refused tool actions now reports
-
Empty-config sign-in recovery note and OAuth URL omission. On a host with no stored sign-in,
agy -pprintsAuthentication required. Please visit the URL to log in:followed by an indented OAuth URL on stderr, waits 60s, and exits 1 with anERRORresult whose error isauthentication failed or timed out(measured against agy 1.4.8 and 1.5.16). agy-mcp now matches that line-scoped prompt so failedagy_errorruns surface the sign-inrecoverynote. The HTTP/HTTPS OAuth URL line immediately following that prompt is omitted across every stderr-echo path (failed job stderr tails, spawn failures,list_models,list_agents,agy_usage, and version-check errors), includingerrTailByteswindow cuts, without stripping unrelated URLs. A jobtimeoutof60sor less still fires before agy's 60s auth wait and reportstimeoutinstead. (#247)
Documentation
- Recorded agy 1.5.4 through 1.5.16 changes (including Auto default for headless runs, retry and stall waits,
/usageunder an API key,ERRORstatus after retried requests, conversation pruning, and--resume) and new measurements against agy 1.5.16: under--dangerously-skip-permissions, each measured run reportedpermission_mode: always-proceed, could create files outsidecwdanddirsby absolute path, still respected user deny rules, and on a host where agy's terminal sandbox cannot run,--sandboxrestricted nothing. Updated MCP tool descriptions, server instructions,internal/agyvernotes, and the README to match.- Upgrading: restart the agy-mcp server so clients pick up the updated tool descriptions and server instructions.
- The minimum agy version is unchanged at 1.1.15.
Full changelog: v2.12.0...v2.13.0
v2.12.0
agy-mcp v2.12.0
Features
xhighreasoning effort.agy_runandagy_run_syncnow accepteffort: xhigh, forwarded to agy as--effort xhigh. agy 1.5.8 added it with Gemini 4 Hydrogen (gemini-4-hydrogen); agy refuses a level the chosen model does not offer.maxis still rejected: agy lists it in its own--efforthelp, but refuses it forgemini-4-hydrogen(measured against agy 1.5.8). The accepted levels are one list in the code, and the validation error names every accepted level. The tool schema and README state the model requirement. (#242)- Upgrading: restart the agy-mcp server so clients pick up the new
effortschema text.
- Upgrading: restart the agy-mcp server so clients pick up the new
Documentation
- The minimum agy version is unchanged at 1.1.15.
xhighneeds a model that offers it, which agy 1.5.8 introduced with Gemini 4 Hydrogen (per agy's changelog).
Internal quality
Full changelog: v2.11.0...v2.12.0
v2.11.0
agy-mcp v2.11.0
Fixes and behavior
-
agy 1.5's expired
--print-timeoutistimeout, notagy_error. From agy 1.5.0 an expired--print-timeoutexits 3 with an ERROR result whosefinished_reasonisprint_timeout(a field agy added in 1.4.11), where agy 1.1.28 through 1.4.x exited 0 with a SUCCESS result. agy-mcp now readsfinished_reasonand reports that run astimeout, or asbackground_abortedwhen the deadline cut a background-task wait short, because continuing the conversation would launch the same background command again. agy's own message is appended toerror, any text the run produced is kept as a partialresult, and therecoverynote still advises continuing the conversation even though agy marks the errorretryable: false. A SUCCESS result that carriesprint_timeoutis reported as a timeout too. Measured against agy 1.5.3, 1.4.11 and 1.4.12. (#236, #240)- Behavior change: on agy 1.5, a run whose own print timeout wins the race against the supervisor's deadline now reports
timeoutorbackground_abortedinstead ofagy_error. Anyfinished_reasonmarks the resultpartial.
- Behavior change: on agy 1.5, a run whose own print timeout wins the race against the supervisor's deadline now reports
-
partialis never true without aresult. A failed or cancelled job that kept no text no longer reportspartial: true, and a response that is only line breaks (including CRLF) counts as no text, so the streamed text is used instead. (#239) -
A structured quota status outranks a print timeout. When agy's
AGY_ERRORline carries a quota status together withprint_timeout, the run staysquota_exhausted. Text in a terminated command that merely mentions quota does not block the relabel. The canonical status is read from theshort_errorprefix, and from the line's ownstatuskey when that prefix is missing. (#239) -
Background-abort markers survive long stderr. The two background-abort markers are now looked for in the last 64 KiB of stderr instead of the last 2000 bytes, so a run that terminated several tasks keeps its
background_abortedclassification. (#239)
Documentation
- Measured agy behavior is recorded in the README, code comments and tests: a SIGTERM to agy exits 1 with
finished_reason: interruptedwhile a cancel through agy-mcp stayscancelled; background commands that agy turns into daemon tasks are terminated at exit without a wait, so the run isdone; an unknown--modelis a local exit 1 with noAGY_ERRORline; a model the region does not serve exits 3 with theNOT_FOUND (code 404):prefix kept; a two-task background wait counts both tasks. (#239, #240) - Not measured: a quota status together with a print timeout.
- The minimum agy version is unchanged at 1.1.15.
Internal quality
golang.org/x/oauth20.37.0,golang.org/x/sync0.24.0 andgolang.org/x/time0.16.0. (#238)
Full changelog: v2.10.0...v2.11.0
v2.10.0
agy-mcp v2.10.0
Features
-
Structured agy errors:
retryableanderror_id. Since agy 1.2.6 a headless run that fails a model or API request writes anAGY_ERROR: {...}line to stderr and exits 3. agy-mcp now reads the last such line and reports agy'sretryableflag and a validatederror_idas two new optional fields onagy_status,agy_waitandagy_run_sync, omitted when no line was parsed. ARESOURCE_EXHAUSTEDstatus promotes the failure toquota_exhausted. Whenretryableis false,recoveryno longer advises continuing with theconversation_id. A missing, cut or malformed line leaves the status as before. Measured against agy 1.3.1. (#207) -
A sign-in recovery note. A run that fails because agy is not signed in, or because its sign-in expired, now carries a
recoverynote saying a person must sign agy in on the host running agy-mcp, or check the Application Default Credentials when the server setsAGY_ADC_AUTH.failure_reasonstaysagy_error. The not-signed-in wording was measured against agy 1.4.8; the expired wording is quoted from agy's changelog. (#226) -
agy-mcp doctorchecks the ADC sign-in environment. A newADC sign-in envcheck warns whenUSE_ADCis set withoutAGY_ADC_AUTH(agy does not readUSE_ADC, measured against agy 1.4.8), and whenAGY_ADC_AUTHis on with an agy below 1.4.7, which per agy's changelog did not load skills, rules, custom agents, plugins or hooks under ADC sign-in. The check only warns, so the exit code is unchanged. (#225) -
list_agentstakes acwd. Measured against agy 1.3.1,agy agentslists a project's.agents/agents/only when that directory is passed as a workspace. Withcwd, the listing sees the same workspace a run with thatcwdgets; without it, the command line is unchanged. (#204)
Fixes and behavior
-
The AI credits wall is
quota_exhausted. A run stopped by agy's "Your AI credits balance is too low to continue." (agy 1.2.15 and later, per its changelog) was reported asagy_error. Thequota_exhaustedtext no longer promises thaterroralways carries a reset time;agy_usageshows it. (#204) -
mode: planis refused. agy ignores--mode planwhile--disable-slash-commandsis set, and agy-mcp passes that flag on every run so a prompt starting with/stays literal. Aplanrun therefore applied edits while reporting a normal success. It is now refused at the tool boundary with an error that says why; omitmodeand tell the agent in the prompt not to edit files. Measured against agy 1.1.15, 1.1.27, 1.4.6 and 1.4.8. (#220, #232, #234)- Behavior change: callers that pass
mode: plannow get a tool error instead of a run that edits files.
- Behavior change: callers that pass
-
agy's pre-1.1.28 print-timeout expiry is
timeout. Before agy 1.1.28 an expired--print-timeoutends as an ERROR result withtimeout waiting for response. It is now reported astimeout, the same reason a newer agy's expiry gets, but only when the job also ran for its full recorded timeout. Measured against agy 1.1.15 and 1.1.27. (#229) -
A recovered job reports its real run time. A job whose supervisor died after agy finished, for example across a reboot, measured
elapsedto the spawn time when the run streamed no text, so it read as near zero. It now measures toresult.json, written once agy has been reaped. (#235) -
An unknown agent no longer reads as a quota wall. agy's unknown-agent error lists every available agent, so an agent named like
quota-watcherturned any agent typo intoquota_exhausted. That line is now left out of the quota check. (#217) -
Cloud project ids stay out of errors. An
AGY_ERRORline'sshort_errorcarries the cloud project id and region. It is reduced to its status (for exampleAGY_ERROR: NOT_FOUND (code 404)) wherever agy-mcp quotes agy's output: the stderr copied into a failed run'serror, the errors oflist_models,list_agentsandagy_usage, and the version text quoted by the version gate anddoctor. Classification still reads the unreduced text. (#208, #210, #213)
Internal quality
- Tests that kill a job's process group now wait for the group to exit, and pin the SIGKILL sent to the group leader. (#201)
go.modnames only the Go minor version and CI picks up the latest patch release. CI pinsgolangci-lintv2.15.0. GoReleaser action 7.3.0 andgolang.org/x/sys0.49.0. (#215, #216, #227)
Documentation
- The README names
AGY_ADC_AUTHfor ADC sign-in instead ofUSE_ADC, which agy does not read. (#223) - Measured agy 1.4.8 behavior is recorded for project rules and hooks:
project_rules: falsedoes not keep a repository's rules or hooks out of a run, and the README describes the one shape measured to do so. (#230) - The minimum agy version is unchanged at 1.1.15; the floor rationale now covers agy up to 1.4.8.
Full changelog: v2.9.0...v2.10.0
v2.9.0
agy-mcp v2.9.0
Features
-
agy quota tracking: the new
agy_usagetool. It runsagy --output-format json -p /usage, a slash command that starts no agent turn and spends no quota (measured against agy 1.2.16). It returns each quota group (the shared Gemini pool, and the Claude and GPT models) with its windows and a level ofok,low,criticalorexhausted, set by the group's tightest window.max_agebounds how old a cached reading may be (default 60s, minimum 10s). Readings are cached per server process, concurrent callers share one probe, and a failed probe is remembered for 30s. A background refresher keeps the reading fresh (AGY_MCP_USAGE_INTERVAL, default 5m,0disables it). If agy ever answers/usagewith a model turn, probing stops for the rest of the process so it cannot keep spending quota. (#198) -
A
quotafield on run results.agy_run,agy_run_sync,agy_statusandagy_waitresults carry a compactquotasummary read from that cache. It never waits on agy and is absent when there is no recent reading. (#198) -
priority: optionalonagy_runandagy_run_sync. The default isnormal. An optional run on a Gemini model is refused before any job starts while the Gemini group islowor worse, as a tool error that names the group, level, remaining percent and reset time. The guard fails open on an unknown or omitted model, a missing or stale reading, or a probe failure with no earlier trusted reading. It runs after theidempotency_keyreplay check, so a retry of an existing job always gets that job back. Thresholds areAGY_MCP_USAGE_LOW(default 25 percent) andAGY_MCP_USAGE_CRITICAL(default 5); a bad value fails startup. (#198) -
Project rule files load by default. agy-mcp now passes the run's
cwdto agy as an--add-dir, so the project'sAGENTS.mdapplies to a delegated run, including one at the repository root whencwdis a subdirectory. A caller dir that already namescwdis not duplicated. The newproject_rulesinput onagy_runandagy_run_sync(defaulttrue) omits that implicit--add-dir. (#190, #199)- This is not an isolation switch. Measured against agy 1.2.9, rules and workspace hooks loaded only with
--add-dir. Measured against agy 1.2.16,cwdis a workspace either way: itsAGENTS.mdis applied and its.agents/hooks.jsonhooks run with or without the flag. So on current agy,project_rules: falsedoes not keep a repository's rules or hooks out of a run, and it is no longer recommended for untrusted repositories. A working opt-out is tracked in #200.
- This is not an isolation switch. Measured against agy 1.2.9, rules and workspace hooks loaded only with
Fixes and behavior
-
No redundant hook-wait wake for a job the session already collected.
agy_wait,agy_statusandagy_run_syncrecord acollectedmarker when they return a terminal state, andhook-waitexits silently when it finds one, allowing up to one second for it to appear. Anything uncertain still wakes: a job nobody collected, a wait that overran while the job was still running, andagy_statuson a running job.agy_cancelrecords a separatedismissedmarker that suppresses the wake only when the job then endscancelled. A job that had already produced its full answer and then exits under the cancel signal also reads ascancelledand gets no wake, so read a job you cancelled withagy_statusbefore re-running it. (#195, #199) -
Wake messages name the calling subagent. When the PostToolUse payload carries
agent_type, the finish and still-running wake messages say which subagent started the job. Measured against Claude Code 2.1.289: the field is absent on a main-thread call and holds the subagent type inside a subagent. (#195, #199) -
Recovered jobs get the same stderr checks as a clean exit. A job whose supervisor died after writing agy's result but before its exit-code sentinel is now checked for the background-abort and print-timeout notices, so a cut-short
SUCCESSreads asfailed(background_abortedortimeout,partial: true) instead of a completedone. (#193) -
idempotency_keyretries compare the request, not the agy argv. A job with anidempotency_keyrecords a hash of its normalized request, so a change to how agy args are built no longer refuses a retry that spans an upgrade. The hash uses the conversation id the caller gave, not onecontinue_latestresolved, so a retry is not refused because the first run's conversation became the latest. Jobs written by v2.6.0 through v2.8.1 are still compared by args, and also match the argv those releases wrote before the implicit--add-dir <cwd>. (#193, #199)- Behavior change: a retry that switches between
continue_latestand an explicitconversation_idfor the same conversation is now refused as a different request.
- Behavior change: a retry that switches between
-
Stricter matching of a caller dir against
cwd. A caller--add-dircounts as namingcwdonly when it is the same directory as resolved as written, solink/..no longer drops the implicit workspace when the link points elsewhere, and a letter-case variant counts only where the filesystem treats it as the same directory. On Windows, a rooted path without a volume (\x,/x) or a drive-relative path (C:repo) never counts ascwd, and acwdof/no longer produces//dir. Any doubt keepscwd. (#193, #199)
Internal quality
- A test checks that every
failure_reasonvalue appears in both the tool schema text and the README, and another that every field of the request-key encoding isomitempty. The stored request-key encoding is unchanged. (#199) AGENTS.mddocuments the layout, the build and test commands, the job directory contract and the public contract rules. CI pinsgolangci-lintv2.14.0. (#193, #195)
Documentation
- The README, tool descriptions and server instructions cover
agy_usage, thequotafield,priority, the new environment variables,project_ruleson both agy versions, and the narrow cancel case. Comments record that agy 1.2.6's unlimited default headless timeout does not affect agy-mcp, since it always passes an explicit--print-timeout, and that a Windows child gets a windowless console and Windows has no SIGTTOU equivalent. The minimum agy version is unchanged at 1.1.15. (#190, #193, #198, #199)
Full changelog: v2.8.1...v2.9.0
v2.8.1
agy-mcp v2.8.1
Fixes and behavior
-
A run cut short by agy's own
--print-timeoutis reported as a timeout, notdone. Since agy 1.1.28, when agy's own--print-timeoutexpires mid-turn it returns whatever it has, exits 0 (usually with aSUCCESSpayload) and writes aprint timeout ... turn in progress; returning partial outputnotice to stderr. agy-mcp passes the job timeout as--print-timeoutand the supervisor arms the same deadline, so the two timers race. When the supervisor's hard kill won, the run was already reported astimeout; when agy's timer won, the run was reported asdonewith a truncated or empty answer. A clean exit whose stderr carries that notice is now reportedfailedwithfailure_reason: timeout, and any text agy returned is kept and flaggedpartial. The reclassification applies only to the shapes the background-abort check already accepts (a done run, a json-schemaSUCCESSwithoutstructured_output, a json-schema run with no terminal payload); anERRORpayload, a quota wall, an unrecognized status or unreadable output keeps its own reason. (#187) -
Background-abort advice takes precedence over the timeout hint. If a run's stderr carries both the background-abort markers and the print-timeout notice, it is reported as
background_aborted, so the caller is told to run verification in the foreground rather than to continue a conversation that would relaunch the killed task. (#187) -
Near-tie timeouts are flagged
partial. When the supervisor's hard kill (exit 124) lands just after agy's own print timeout already fired, aSUCCESSresponse is now flaggedpartial. (#187) -
Upgrade note: job status is derived from the job files on every read, so an existing job whose stderr carries the notice and that was previously reported
doneis reportedfailed/timeoutafter upgrading, for the rest of its retention period. This is the intended correction.
Documentation
- The
timeoutparameter,failure_reasonandpartialdescriptions and the README now cover both ways a run can time out. They also note agy 1.2.9's change to headless background-task waiting (now until the--print-timeoutdeadline, capped at 30 minutes, instead of about 5 seconds;background_abortedstill fires when a task outlives that budget) and its conversation-database lock fix. The minimum agy version is unchanged at 1.1.15. (#187)
Full changelog: v2.8.0...v2.8.1
v2.8.0
agy-mcp v2.8.0
Fixes and behavior
-
Inline waits are capped below the MCP client's per-call timeout.
agy_run_syncandagy_waitblocked inline for up to a 2m default and a 10m clamp, but common MCP clients (Claude Code included) abandon a single tool call at roughly 120s and synthesize their own timeout, discarding the server's response and orphaning the running job so it could not be reconciled. The inline-wait ceiling is now 90s, used as both the default and the clamp, keeping a wide margin under that client cap so the still-running result (which carries thejob_idto reconcile withagy_waitoragy_status) is delivered inline. A newAGY_MCP_SYNC_WAIT_CAPenvironment variable overrides the ceiling for a client with a different per-call timeout; a value that is not a positive Go duration is ignored. Longer runs useagy_runplus repeatedagy_waitoragy_status, which the tool descriptions and README now spell out. (#181) -
A json-schema run that idle-kills its background tasks is reported as
background_aborted, not a genericagy_error. Whenagygoes idle with an outstanding background shell command and terminates it at exit (the same headless limitation behindbackground_aborted), a json-schema run can exit 0 without ever producing usablestructured_output. That was classified asagy_error; it is now reclassified to the more actionablebackground_aborted, which tells the caller to re-run with verification in the foreground, wheneveragy's stderr carries the abort markers. This covers both shapes such a run takes: aSUCCESSpayload that carries nostructured_output, and a clean exit that wrote no terminal payload at all. The reclassification stays evidence-gated on the stderr markers and narrowly scoped, so an indeterminate payload or an unrecognized status keeps its existing reason. (#181, #182) -
The subagent-delegation limitation is documented. When
agy's agent delegates to an internal subagent, the subagent's output is not streamed on the parent run's stdout, so the run can report aSUCCESSpayload whose response is only the parent's progress narration while the real result is lost. There is no reliable structural signal to detect this: the parent's token accounting counts the subagent's generation as ordinary output tokens, indistinguishable from a normal tool-heavy run that ends in a short answer. The README documents the limitation and the workaround, which is to instruct the agent to write its findings directly, or to continue the sameconversation_idwith that instruction. (#182)
Full changelog: v2.7.0...v2.8.0
v2.7.0
agy-mcp v2.7.0
Fixes and behavior
- Idle-killed background runs are reported as failed, not a phantom success. In headless
-pmodeagywaits only briefly after its agent goes idle for an outstanding background shell command (a build, a test suite, a typecheck), then terminates it and exits 0 with aSUCCESSpayload whose response is only progress narration. agy-mcp used to map that clean exit tostate: done, so a caller trusting the state consumed an answer that reflected no completed work. Such a run is now reported asfailedwith a newfailure_reason: background_aborted, detected fromagy's own stderr, with the narration kept as apartialresult and theconversation_idpreserved so the thread can be continued. Detection requires both ofagy's markers, each matched on a single stderr line, so a genuinely complete run that merely left a stray background task is not downgraded. When such a run returns no narration at all it is also excluded from the generic continuation hint, since re-running the same background command would just abort again; the guidance to run any verification in the foreground is carried inerrorinstead. The README documents the headless background-command limitation. (#175)
Dependencies
- Bump
github.com/modelcontextprotocol/go-sdkfrom 1.7.0 to 1.8.0. (#169) - Bump
golang.org/x/sysfrom 0.47.0 to 0.48.0. (#170)
Full changelog: v2.6.1...v2.7.0
v2.6.1
agy-mcp v2.6.1
Fixes and behavior
- agy runs no longer stall at 0 bytes when launched from a terminal. agy 1.2.x opens
/dev/ttyand switches it to raw mode at startup, even under-p/--output-format stream-json. The supervisor spawned agy in its own process group but the same session, so agy kept the launching terminal as its controlling terminal while sitting in the background, and a background process performing a terminal-modifying ioctl is stopped bySIGTTOU. Every run launched from a real terminal therefore hung at 0 bytes of output until the print-timeout fired (exit 124). agy is now started in its own session (Setsidon POSIX) with no controlling terminal, so itsopen("/dev/tty")returnsENXIOand it skips the raw-mode setup instead of stopping. Process-tree termination is preserved (a session leader haspgid == pid, so the existing group kill still tears the whole tree down), and Windows is unaffected. (#171) - Unfiltered
list_sessionsno longer returns ephemeral shim workspaces. agy's shared conversation cache is dominated by the per-callagy-openai-shim/agy-call-<n>workspaces the OpenAI shim creates; agy-mcp never starts a run in one, so they can never be a thread you resume here and were pure noise that crowded out the real workspaces and ballooned the response. An unfiltered listing now drops them. Detection requires both signals (theagy-openai-shimparent segment and anagy-call-leaf), so a legitimate workspace that merely shares one of those names is never dropped. An explicitdirfilter is still honored verbatim, so a specific per-call dir stays reachable, andcontinue_latestis unaffected. (#168)
Docs
- Noted the agy 1.1.26/1.1.27 conversation-store durability fixes above the agyver floor.
Full changelog: v2.6.0...v2.6.1
v2.6.0
agy-mcp v2.6.0
Fixes and behavior
- Structured schema results are now preserved. A run started with
json_schemareturns agy's terminalstructured_outputas the authoritative result instead of the free-textresponsechannel, and a successful schema run that produced nostructured_outputnow fails closed rather than silently returning response-only text. Non-schema runs are unchanged. agy stays responsible for schema conformance; agy-mcp only preserves and selects the correct terminal result channel. (#164, by @deepfriedrabbit) - Safe retries via an idempotency key. Delegated runs can carry an
idempotency_key, so a transport failure onagy_run/agy_run_syncdoes not spawn a duplicate job when the call is retried. (#164, by @deepfriedrabbit) doctorprobesagy --versiononce per run instead of twice, by priming its in-process version cache on the version check's success path. (#166)
Internal quality
- Shared the
AGY_MCP_*environment-variable names between config resolution and thedoctorcommand's source reporting, so a rename cannot drift between them. (#166) - Consolidated the models and agents JSON listing-envelope framing checks into one shared validator. (#166)
- Fixed test-fixture cleanup races surfaced by the race detector, including a flaky wait-test family that now stops its fake job at cleanup instead of polling for completion. (#164, #166)
- Added coverage for concurrent same-key idempotency and conversation-serialization independence, and for the
doctorversion and reachability failure branches. (#165, #166) - Bumped golangci-lint to 2.13.2 to match the local toolchain, and noted the agy 1.1.23/1.1.24 stdin and CLOEXEC fixes above the agyver floor. (ci, docs)
Full changelog: v2.5.0...v2.6.0