Skip to content

[scanner] repeat-failure: neutral BASH_ENV route for fresh-bash backends #14554

Closed

Description

@hivecommons-hive

Part of #14550 — the backend-neutral capture route. Depends on #14553 (record type, record file, config switch). Target: v6 (open the PR with --base v6).

Scope (requirements C2, C8, C14 env side, constraints):

  • Hive-owned BASH_ENV script with an EXIT trap that appends one record ($?, $BASH_EXECUTION_STRING) only for the agent's own command: record only when the execution string is non-empty, with a marker tied to the shell that set it (e.g. PID) so nested shells/scripts are skipped but Codex's exec /bin/bash -c '<cmd>' still yields exactly one record (C8).
  • Set BASH_ENV and SHELL=/bin/bash in the launch env (agentEnvPairs in src/pkg/agent/manager_env.go, applySessionEnv in src/pkg/agent/manager_tmux.go) only when repeat_failure.enabled; chain an existing BASH_ENV rather than overwrite. Document the bob dash→bash shell change.
  • The script must be safe under set -euo pipefail / exported SHELLOPTS, change nothing visible except the trap and one namespaced marker variable, and be silent if missing/broken/unwritable.
  • Turning the switch off removes what Hive added at next launch; leftovers do nothing.
  • Covers claude, codex, goose, pi, gemini, bob, opencode, kilo (and the inference backends via claude).

Acceptance: C-AC5, C-AC12, C-AC14, C-AC15 (median < 5 ms over 200 true), C-AC16. No time.Sleep( in tests.

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

Activity

  1. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Oct 27, 2026
  2. hivecommons-hive commented on Oct 27, 2026

    @hivecommons-hive
    ContributorAuthor

    🔒 Claimed by @thatguywob (contributor on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 30m0s without activity and renews while the work continues. Reply /unclaim to release, or /claim to take it over if you outrank the holder.

  3. hivecommons-hive commented on Oct 27, 2026

    @hivecommons-hive
    ContributorAuthor

    🔓 Claim by @thatguywob released (lease revoked).

  4. hivecommons-hive commented on Oct 27, 2026

    @hivecommons-hive
    ContributorAuthor

    🔒 Claimed by agent scanner (agent on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 2h0m0s without activity and renews while the work continues. Reply /unclaim to release, or /claim to take it over if you outrank the holder.

  5. hivecommons-hive commented on Oct 27, 2026

    @hivecommons-hive
    ContributorAuthor

    🔓 Claim by agent scanner released (holding agent relaunched).

  6. github-actions commented on Oct 27, 2026

    @github-actions
    Contributor

    Closed by #14574 (merged to v6).

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

    agent/scannerCreated or modified by the scanner agenthelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions