exec tool: witnessed shell execution#2
Merged
systemic-engineer merged 2 commits intomainfrom Mar 2, 2026
Merged
Conversation
Tests reference tools.exec_schema() which doesn't exist yet. Compilation fails as expected. RED phase complete. Co-Authored-By: Reed <reed@systemic.engineer>
- gall_ffi.erl: exec/2 runs shell command in work_dir, captures stdout+stderr - tools.gleam: exec_schema/0, exec_tool_names/0, added to daemon_tools_json - daemon.gleam: exec handler with record_exec (@exec fragment in session trace) - Fragment data: command + output_sha (not full output — could be huge) - Works without active session (returns output, no fragment) - 44 tests green (4 new exec tests + 40 existing) Co-Authored-By: Reed <reed@systemic.engineer>
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
execMCP tool — agents execute shell commands through gall instead of raw bash. Every execution is witnessed as an@execfragment in the session trace.gall_ffi.erl:exec/2— runs command in work_dir viaos:cmd, captures stdout+stderr.record_exec— follows therecord_readpattern. Fragment data carriescommand: <cmd>\noutput_sha: <hash>(not full output — could be huge).4 new tests (44 total). TDD arc: red then green.
Test plan