Skip to content

Agent OOM score adjustment blocks rootless Podman children #41079

Open

Description

@galel12

Area

packages/shared / agent process launching

Steps to reproduce

  1. Run T3 Code on Linux with rootless Podman.
  2. Launch an agent that runs an integration test using testcontainers/Podman; the test asks the container runtime to use oom_score_adj=200.
  3. Inspect the agent shell: it inherits oom_score_adj=800 from T3's launcher.
  4. Podman/crun tries to lower the inherited score for the child container and fails.

Expected behavior

The agent scope should preserve the inherited OOM score. The kernel's normal per-process OOM selection, plus the existing systemd scope isolation, should remain in effect, and descendants should still be allowed to request a lower score.

Actual behavior

Both the shared agent launcher and the ACP cgroup wrapper manually write 800 to /proc/self/oom_score_adj. Every descendant inherits that value. An unprivileged Linux process cannot lower an inherited OOM score, so rootless Podman/crun fails with:

crun: write to /proc/self/oom_score_adj: Permission denied

This blocked a rootless Podman integration suite until the test shell's score was manually reset to 0.

Impact

Blocks work completely for rootless Podman-based integration tests launched from T3 Code.

Version or commit

v0.1.11 AppImage, commit 59651c1761f6; the manual raise is still present on current main.

Environment

Linux, rootless Podman 6.1.3, crun, systemd user scopes.

Diagnosis

packages/shared/src/AgentScope.ts and packages/provider-acp/src/server/AcpSessionRuntime.ts both write oom_score_adj=800 before exec. Removing those writes preserves the inherited score while retaining the existing systemd scope and memory limits.

Related

Workaround

Temporarily reset the affected shell's oom_score_adj to its original inherited value before running the Podman test.

Filed by

GLM-5.3 in Codex via T3 Code.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions