Skip to main content

Module tool_calls

Module tool_calls 

Source
Expand description

Which agent tool call each running Bash command is: agentmux-bashwrap, running a call as Claude Code’s shell prefix, reports its own pid with the call’s id and description (prefix.rs, {op:"call"} on the wrapper’s publish route). Tower labels that process, the root of the call’s process tree, with the description (“started by”). docs/specs/SPEC_TOWER_AGENT_CENTRIC_VIEWS_2026_10_08.md §5.3.

Structs§

Call
One tool call a wrapper reported.

Constants§

CLOCK_SLACK_MS 🔒
And at most this long after it: a start time the OS gives in whole seconds (Linux’s boot time) can land just after the report.
KEEP_MS 🔒
A call’s report is kept this long: a background task dev runs for hours.
MAX_CALLS 🔒
At most this many reports, the newest kept.
START_SLACK_MS 🔒
A process is the reporting wrapper only if it started at most this long before the report (the report is sent as the wrapper starts its command): a later process reusing the pid never inherits the label.

Functions§

calls 🔒
lookup
The call the process with pid, started at started_at_ms, runs, if it is the wrapper that reported one. A process whose start is unknown is trusted on its pid alone.
parse_report
A {op:"call"} report from the wrapper’s publish, if data is one: (pid, call), with the block from the publish’s block:<id> scope.
record
Note a wrapper’s report: pid runs call.