Look at https://github.com/moltis-org/moltis/issues/616 and plan for a fix
- User
Look at https://github.com/moltis-org/moltis/issues/616 and plan for a fix
Assistant
Now let me explore the relevant code to understand the current state and plan the fix.
Assistant
Plan for #616: Exec tool ignores
default_timeout_secsconfigRoot cause:
ExecTool::default()hardcodes 30s timeout and 200KB max output. The config values from[tools.exec]are parsed but never wired to the tool instance.Changes needed (3 files, ~20 lines)
1.
crates/tools/src/exec.rs— Add two builder methodsrustpub fn with_default_timeout(mut self, timeout: Duration) -> Self { ... } pub fn with_max_output_bytes(mut self, max_bytes: usize) -> Self { ... }Follows the existing
with_*pattern (7 methods already exist).2.
crates/gateway/src/server.rs~line 3530 — Wire config at constructionChain
.with_default_timeout(Duration::from_secs(config.tools.exec.default_timeout_secs))and.with_max_output_bytes(config.tools.exec.max_output_bytes)into the builder.- User
proceed
Assistant
Now let me read the test area at the end to find the right insertion point.
Assistant
Now I have everything I need. Let me create the beads issue and implement the fix.
Assistant
Now let me implement the fix — adding builder methods and wiring them in server.rs.
Assistant
Now let me verify
Durationis imported in server.rs and check theExecConfigfield types.Assistant
Durationisn't directly imported in server.rs. Let me check how it's used there.Assistant
Uses
std::time::Durationfully qualified. Let me update my edit to match that convention.Assistant
Now add tests. Let me find the end of the test module in exec.rs.
Assistant
Now let me compile and run the tests.
Assistant
All 4 tests pass. Let me run formatting and clippy.
Assistant
Formatting diff in server.rs for our line (the providers one is pre-existing). Let me fix it.
Assistant
The only remaining fmt diff is pre-existing in
providers/src/lib.rs(not our change). Now let me wait for clippy.Assistant
That's the pre-existing
llama-cpp-sys-2CMake build failure on macOS (matches the known issuemoltis-csq). Not related to our changes.Let me run clippy on just the crates we changed to verify our code is clean.
Assistant
Clean. Let me also run the existing exec tests to verify no regressions.
Assistant
All 40 exec tests pass, including the 4 new ones. Now let me close the beads issue and commit.
Assistant
Done. Here's what was changed:
crates/tools/src/exec.rs— Added two builder methods:with_default_timeout(Duration)— overrides the 30s defaultwith_max_output_bytes(usize)— overrides the 200KB default- Plus 4 tests (builder setters, timeout behavior, output truncation)
crates/gateway/src/server.rs~line 3530 — Wired config values into the ExecTool builder chain:rust.with_default_timeout(std::time::Duration::from_secs(config.tools.exec.default_timeout_secs)) .with_max_output_bytes(config.tools.exec.max_output_bytes)All 40 exec tests pass, clippy clean. This is an ephemeral branch — ready for local merge to main when you're set.
Assistant
The background
just lintresult was the pre-existing llama-cpp CMake build failure on macOS (tracked asmoltis-csq). Not related to our changes — clippy onmoltis-toolsandmoltis-gatewaypassed clean.- User
create a PR
Assistant
PR created: https://github.com/moltis-org/moltis/pull/617
- User
Fix and resolve PR comments
Assistant
Greptile found one actionable issue: the
parameters_schemamethod hardcodes "default 30" in the timeout description, but now the actual default comes from config. Let me fix that.Assistant
Now add a test to verify the schema reflects the configured timeout, then run tests and commit.
Assistant
41/41 pass. Let me check formatting and commit.
Assistant
Pushed. The Greptile comment about the stale hardcoded "default 30" in the tool schema description is now fixed —
parameters_schema()usesself.default_timeout.as_secs()so the LLM sees the actual configured value. Added a test to verify this.