Repository navigation
Conversation
finance_agent's episode is seed, one /v1/responses loop, verify, which is
what single_agent_turn runs, but it served no agent sessions, so it could
run only behind the legacy_agent relay, where a crash repeats the whole
episode and run() turns any exception into reward 0.
- _seed_agent_session_state takes the session's one direct HTTP grant;
every tool, submit_final_result included, is behind it. A seed with no
grant, more than one, a required MCP grant or sandbox access is refused
with AgentSeedRejectedError (a final 422).
- In a session, tool calls go to the grant's base URL with its headers and
the resources cookie jar, and close returns the updated jar. Model calls
carry the Environment Server's rollout prefix, so captured calls join the
episode, and with model-call capture on, close returns the loop's
observations: one invocation and a record per tool call.
- In a session, a failed model call marks the response failed with its
cause through classify_outcome: model_request_error with the HTTP status,
model_transport_error for a timeout or connection failure, else unknown.
The Environment Server's outcome policy then grades a 400/413/422,
retries a 408/425/429/5xx or transport failure, and fails other 4xx,
instead of scoring an outage 0. Tool errors and the
abort_on_tool_error_types abort are graded as before.
- The legacy /run path is unchanged, and so are the existing configs. New
configs run each relay pairing behind single_agent_turn_legacy with
resources_tool_transports: [direct_http], keeping the relay's instance
names: finance_sec_search_single_agent_turn.yaml,
finance_agent_v2_single_agent_turn.yaml and, for the benchmarks,
config_single_agent_turn.yaml (FABv2) and
config_{no_,}web_search_single_agent_turn.yaml (finance_sec_search).
- The agent README documents the session path and how outcomes differ;
the benchmark and resources server READMEs say how to run it.
Closes GYMINT-134.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
This was referenced Nov 3, 2026
Contributor
Author
|
/ok to test 9c4e196 |
…mint-134-finance-agent-sessions
…mint-134-finance-agent-sessions Brings in main via #4948 and #5491 (511e5ed). Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
Contributor
Author
|
/ok to test 80abd08 |
This was referenced Nov 4, 2026
…-sessions' into fix/pr-5492
…s servers finance_agent seeds agent sessions, so list it in AGENT_SESSION_AGENT_TYPES. Name the Resources Server in the five finance single_agent_turn_legacy configs, which main now requires of every step environment. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
Contributor
Author
|
/ok to test 67f09be |
…ck-expiry-routing Signed-off-by: yaoyu-33 <[email protected]>
…ck-expiry-routing Signed-off-by: yaoyu-33 <[email protected]>
Contributor
Author
|
/ok to test 95a4866 |
6 tasks done
7 tasks done
Preserve finance session execution alongside main’s resources retry and masked verification options. Retain both test suites and clarify the options apply to the agent /run path. Signed-off-by: yaoyu-33 <[email protected]>
Contributor
Author
|
/ok to test 62b7146 |
Contributor
…finance-agent-sessions Signed-off-by: yaoyu-33 <[email protected]>
Contributor
Author
|
/ok to test dc1d3fb |
Signed-off-by: yaoyu-33 <[email protected]>
Contributor
Author
|
/ok to test 46840a7 |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Main integration after the fix
Final head:
95a486692; integrated stack head:95a486692, including main72275b85d. Resolved the routing conflict by preserving main's pending-cleanup ownership behavior and the new expiration deadline. Both regression suites remain. Independent source recheck found no conflict-induced regression.Post-merge workstation checks: SEC resources 118 passed, v2 resources 240 passed, finance agent + routing + base resources + new resources lifecycle/policy tests 383 passed (741 total). Full pre-commit was rerun on this tree. The real-model smokes below ran at
c3dc26098before this main integration; they have not been rerun on95a486692. Fresh GitHub CI is required for the published heads.AI review follow-up (November 8)
Inherited the expiration-routing fixes from #4948 and #5491; this PR's agent/config delta is unchanged.
Revision:
c3dc26098; integrated validation tree:c3dc26098. The stack was updated with signed additive commits/merges, preserving its bases.Workstation validation (Python 3.13.14):
python -m pytest resources_servers/finance_sec_search/tests -q -o addopts= -o log_cli=false: 117 passed.python -m pytest resources_servers/finance_agent_v2/tests -q -o addopts= -o log_cli=false: 238 passed.python -m pytest responses_api_agents/finance_agent/tests tests/unit_tests/server_runtime/test_session_routing.py tests/unit_tests/server_runtime/test_base_resources_server.py -q -o addopts= -o log_cli=false: 296 passed.python -m pre_commit run --all-files: passed, including guardwords and import-linter. Pre-commit 3.8.0 was used for workstation Git compatibility.The shared routing change makes #4948 full-scope for CI. Full repository suites and benchmark score parity were not run locally. Earlier no-real-model statements below are historical; they were already superseded by the November 6 evidence.
Fresh bounded real-NIM smokes at the integrated fixed tree passed for both canonical resources configs (model
nvidia/nemotron-3.5-lightning-30b-a3b, temperature 0, max 8192 output tokens, 8 agent steps). Each ran one controlled-report task through real HTTP policy/tools/retrieval/judge: rewards 1.0 / 1.0, 0 failures / 0 masked rows, expected parse/retrieve/submit calls (plus calculator for v2), both close endpoints HTTP 200, and zero document/time/episode-seed/active-agent state afterward. All task HTTP servers stopped. This does not establish full benchmark parity, CLI collection, or live SEC/Tavily/Tiingo coverage. Machine-local evidence:ws:/home/yuya/finance-ai-20261109/(audit.json,runs/fixed-sec/,runs/fixed-v2/, test/hook logs); source/patch hashes are recorded.What and why
The finance agent can now serve agent sessions, and all five existing
finance_sec_search/finance_agent_v2resources and benchmark YAMLs selectsingle_agent_turn_legacydirectly. Existing--resources-serverand--benchmarkcommands use session execution. The five alternative session YAMLs are removed; instance names, dataset paths and benchmark identities stay unchanged.The Environment Server seeds resources and agent sessions, calls the agent's tool loop, closes the agent, verifies, then closes resources. The agent and these resources servers are
restart_only: a retry starts the episode again from its input.resources_tool_transports: [direct_http]. Benchmark configs rename the environment's resources reference alongside its agent reference. Resolution tests cover all five canonical paths and require exactly one correctly bound Environment Server.This implements one agent's part of the session migration described in #4679; a separate public issue is unnecessary. Aggregate metrics continue forwarding to the resources server and do not depend on #5455.
Compatibility and scoring
Existing finance commands change failure accounting. The direct agent
/runendpoint remains available, but the canonical configs now use Environment Server policy:RetryExhaustedErrorPreviously the relay verified model errors and converted run exceptions into reward zero. Failed episodes are now excluded from scores by default;
--resumeretries retryable failures within its configured attempt bound. Consequently coverage and aggregate scores can differ from historical runs.+count_failure_classes_as_zero=[environment_server_failed]counts that broad failure class as zero, including seed/judge/verify failures. This smoke does not establish benchmark score parity.Validation
Final source:
f0b200ce6568ff02cbc2d51a6dd5d46ccb3d6b5b, tree327cc3710857661f861b04f1b69169450228acf6.Linux, Python 3.13.14; each server suite ran in a separate Python process from the final checkout:
python -m pytest responses_api_agents/finance_agent/tests tests/unit_tests/config/test_global_config.py tests/unit_tests/environment/test_benchmarks.py -q -o addopts= -o log_cli=false --disable-warnings: 469 passed.python -m pytest resources_servers/finance_sec_search/tests -q -o addopts= -o log_cli=false --disable-warnings: 116 passed.python -m pytest resources_servers/finance_agent_v2/tests -q -o addopts= -o log_cli=false --disable-warnings: 237 passed.pre-commit run --all-filesandgit diff --checkpassed. The private guardwords hook skipped its unavailable private catalog; all other applicable hooks passed. DCO sign-off present.Real-model HTTP smokes used both canonical resources configs at this final source,
with stock Environment Server, agent, resources and
vllm_modelservers. Policy,retrieval and judge used NIM
nvidia/nemotron-3.5-lightning-30b-a3b; requests werepaced 30 seconds apart. A controlled annual-report fixture supplies 172.90 versus
150.00 million USD revenue.
finance_sec_search.yamlfinance_agent_v2.yamlBoth ended with
done_tool, successful agent/resources close responses, zeroactive agent states, empty captured document/start-time maps and stopped HTTP
servers. The renamed resources
_episode_seedsmap is covered by source reviewand session tests; this driver did not directly capture that map. Both controllers
and the separate artifact/cleanup audit passed. Earlier provider failures and
source-path setup attempts were retained rather than counted as passes.
This is a bounded HTTP integration smoke, not a full
gym eval runor a liveSEC/Tavily/Tiingo benchmark. The three benchmark overlays have config/test coverage;
the model runs cover the two resources configs. No relay A/B or statistical score
parity is claimed.
Remaining scope
The three-PR stack is ready for review. Full benchmark/provider qualification and current CI remain separate from this bounded smoke.
Two existing follow-ups remain outside the config migration:
truncate_on_overflowdoes not inspect the propagated HTTP error body'sresponse_content; the session branch does.environment_server_failed, while the detailedmodel_request_errorcause remains in partial-response metadata. Sharedfailure_reportconstruction is follow-up work.