Skip to content

Read a --foreground timeout as Signalling Only Its Direct Child #2078

Closed as not planned

Description

@ptr727

Problem

Rule 7 of host-setup/agent-safety/claude/gh-write-guard.py reads -f/--foreground on a timeout as an ordinary flag. With it, GNU timeout signals only its direct child rather than the child's process group, so a loop run by a grandchild outlives the deadline while the check reads the run as bounded.

Allowed today, and it leaks:

timeout --foreground 900 bash -c 'bash -c "until [ -f x ]; do sleep 60; done"; true'

A bounded probe of the same shape, timeout --foreground 1 bash -c "sleep 9; true", left the sleep running after the timeout exited. The same holds where a forking prefix such as time sits between a --foreground timeout and the wrapper.

Found

A local strict review pass on the #1634 lane (feature/auto-1634). The verdict is the same on develop, so it is pre-existing and blocks nothing there.

Done looks like

A --foreground timeout bounds a wrapper only where the wrapper is its direct child and runs the loop itself, or the shape is declared in host-setup/agent-safety/README.md requirement 7's limitations.

Activity

  1. added
    bug
    agents
    pre-existing
    on Sep 29, 2026
  2. ptr727 commented on Oct 8, 2026

    @ptr727
    OwnerAuthor

    Declined per #2517, approved by the maintainer, under GOVERNANCE.md "Trust Boundaries and Hardening Effort": The guard backstops an agent's own mistakes, and this is a command shape built to defeat it rather than one an agent session writes, so a miss does not realistically occur. See #2517 for the per-issue reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentsbugpre-existing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions