Language agents in complex environments like NetHack often struggle with long sequences of low-level actions. This paper introduces CodeHack, a library of code-based skills with natural-language descriptions, and systematically compares agents that use only primitive actions, only semantic skills, or a combination of the two. In zero-shot tests, skill-based agents nearly tripled game progression while cutting inference cost by 86% compared to primitive-only agents. Combining skills with primitives retained most of this benefit while preserving access to low-level control.
These results are interesting because they show that supplying a well-designed skill library can dramatically improve both performance and efficiency without sacrificing flexibility. The same pattern held in , where skill-based agents learned significantly faster, achieving 7.2x larger average dungeon level gains over the same training budget. This suggests that action abstraction is a practical lever for making language agents more capable in long-horizon, real-world-like tasks.