Repository navigation
feat(agent): passthrough AgentLoopConfig fields via AgentConfig (#32) - #33
Merged
Merged
Conversation
Add max_tool_result_bytes, subagent_runner, and subagent_depth to AgentConfig as #[serde(skip, default)] passthroughs, mirroring the existing memory/todo/agent_pool pattern. Thread them through both AgentLoopConfig construction sites in agent.rs so library consumers building agents via AgentBuilder (or Agent::new) can configure gaps 1 and 3 from #28 without reaching AgentLoopConfig internals. Also update the four exhaustive AgentConfig construction sites in oxi-cli to use ..Default::default(), absorbing the new fields (CLI keeps its no-op defaults: subprocess subagent + env-var depth).
a7garden
added a commit
that referenced
this pull request
Jul 5, 2026
PR title and body were interpolated via ${{ github.event.pull_request.* }}
directly into run: bash heredocs. PR bodies containing markdown backticks
(e.g. `AgentConfig`, `#[serde(skip, default)]`) triggered command
substitution, and unbalanced parens inside backticks produced an
'unexpected end of file' syntax error → exit code 2 → PR gate failure
on otherwise-correct PRs (e.g. #33).
Move both values to env: indirection (PR_TITLE / PR_BODY). GitHub sets
env values safely without shell evaluation, so the script sees them as
plain strings regardless of markdown content. This also closes a
script-injection vector where a malicious PR title/body could execute
arbitrary commands in the gate job.
Pushed directly to main because pull_request workflows run from the
base branch's workflow file, not the PR head — patching inside a
feature-branch PR would not unblock that same PR.
Collaborator
Author
|
Re-triggering PR gate after fix c57b73a landed on main (workflow runs from base branch). |
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.
Summary
Closes #32. Adds
max_tool_result_bytes,subagent_runner, andsubagent_depthtoAgentConfigas#[serde(skip, default)]passthroughs, mirroring the existingmemory/todo/agent_poolpattern, and threads them through bothAgentLoopConfigconstruction sites inagent.rs.This unblocks library consumers (e.g. Oxios) that build agents via
AgentBuilder/Agent::newfrom configuring #28 gaps 1 & 3 — previously the fields existed only onAgentLoopConfig, which is constructed internally with no injection point.Changes
oxi-agent/src/config.rsAgentConfig: +3#[serde(skip, default)]fields (max_tool_result_bytes: Option<usize>,subagent_runner: Option<Arc<dyn SubagentRunner>>,subagent_depth: u8).Default for AgentConfig: +3 entries (None/None/0).oxi-agent/src/agent.rsrun_with_channel_inner(site 1,self.config().config.*): threads the 3 fields.run_tokio_stream(site 2,inner.config.*): threads the 3 fields.oxi-cli/(4 exhaustiveAgentConfigsites →..Default::default())lib.rs,app/agent_session.rs,app/agent_session_runtime.rs×2.OXI_SUBAGENT_DEPTH) — behavior unchanged.Verification
cargo build --workspace✅cargo clippy --workspace --all-targets -- -D warnings✅cargo fmt --all -- --check✅cargo nextest run -p oxi-agent✅ (693 passed, +3 new)Non-breaking
#[serde(skip, default)]means existing serializedAgentConfigvalues are unaffected;..Default::default()at consumer construction sites absorbs the new fields.